Re: a library I'm working on for generating PDFs from Clojure

2012-04-20 Thread Tim Robinson
Also, wkhtmltopdf has worked well for me. http://code.google.com/p/wkhtmltopdf/ On Apr 20, 4:06 am, Patrick Wright wrote: > Dmitri, > > you might look at delegating some of the effort to Flying Saucer, which can > generate PDFs when given clean HTML and > CSS.http://code.google.com/p/flying-sa

Sumo: A new clojure client for the Riak datastore

2011-12-22 Thread Tim Robinson
I'm not involved in the development of this client library - I'm just glad to see it get started. Many thanks to the folks a basho for considering a Clojure client worthy of being on their roadmap. https://github.com/reiddraper/sumo Tim -Original Message- From: "Reid Draper" Sent: Thurs

How do I identify Clojars clojure libraries that are 1.3 compatible?

2011-12-03 Thread Tim Robinson
Hello, I'm just starting to upgrade to 1.3 ( I know, I know I should have done this before :) Like many of you, I am using lein, only I'm just starting to update the dependency list. Clojure contrib seems pretty straight forward and documented, but for what about libraries that are found on C

Re: Avout: Distributed State in Clojure

2011-11-29 Thread Tim Robinson
Fantastic !!! I'm looking forward to giving this a try. It has the potential to solve some problems I am currently working on. so thanks for your efforts. Tim On Nov 29, 10:38 am, liebke wrote: > Today we are releasing Avout, which brings Clojure's in-memory model > of state to distributed

Re: Code problem: setting an atom from a deref'd atom that's inside a let.

2011-10-25 Thread Tim Robinson
Never mind... I just used 'count'. And sorry to spam the group. On Oct 25, 10:44 am, Tim Robinson wrote: > Good question. > > Also, I wonder if there are any existing realize type functions? > i.e. > (realize (filter ...)) > > or how would I realize without print

Re: Code problem: setting an atom from a deref'd atom that's inside a let.

2011-10-25 Thread Tim Robinson
Good question. Also, I wonder if there are any existing realize type functions? i.e. (realize (filter ...)) or how would I realize without printing? Tim On Oct 25, 10:12 am, "Marshall T. Vandegrift" wrote: > Tim Robinson writes: > > => (defn oops! [] > >  

Re: Code problem: setting an atom from a deref'd atom that's inside a let.

2011-10-25 Thread Tim Robinson
Yes, that does. Thanks to both of you. Tim On Oct 25, 10:16 am, Chris Perkins wrote: > On Tuesday, October 25, 2011 12:00:04 PM UTC-4, Tim Robinson wrote: > > > This code probably will not make a whole lotta sense since I reduced > > it down to show only the problem at ha

Code problem: setting an atom from a deref'd atom that's inside a let.

2011-10-25 Thread Tim Robinson
This code probably will not make a whole lotta sense since I reduced it down to show only the problem at hand, but I'm hoping someone can explain why this doesn't work the way I expected it would: => (def data (atom {:k1 "v1" :k2 "v2" :k3 "v3"})) #'user/data => (def flag (atom nil)) #'user/flag

Is Clojure Simple?

2011-10-22 Thread Tim Robinson
So I've read the previous post > Rich Hickey: "Simple Made Easy" from Strange Loop 2011, but I wanted to ask some simple questions not complected by the interweaving path the other has post followed (is 'complected' even a word? - lol) . I know the presentation was, while inclusive of Clojure, no

Re: Question:Multi-Core processor affinity for load balancing Clojure Web apps

2011-10-21 Thread Tim Robinson
significant cache misses > after being "moved". > > Andy > > On Thu, Oct 20, 2011 at 11:41 AM, Tim Robinson wrote: > > > > > > > > > This may not be a Clojure specific kind of question, but this is for > > my Clojure web app(s) so hopefully it

Question:Multi-Core processor affinity for load balancing Clojure Web apps

2011-10-20 Thread Tim Robinson
This may not be a Clojure specific kind of question, but this is for my Clojure web app(s) so hopefully it's not too far off. Currently when I deploy my web apps I run 1 app instance on 1 app server. Given these are multi-core servers I am thinking about running 4 app instances on a server to get

Re: about the lazy-seq

2011-08-24 Thread Tim Robinson
There's a pretty good explanation here: http://stackoverflow.com/questions/4992298/clojure-lazy-sequence-usage On Aug 23, 11:48 pm, xiaoguizi87 wrote: > I feel it is too difficult to understand the 'lazy-seq'.Can someone > recommend something may help me? I have goolge it, but found nothing > hel

Re: FleetDB or other "NoSQL" store for Clojure?

2011-07-17 Thread Tim Robinson
Could be that I am using the wrong wording with "conflict resolution". Tim On Jul 17, 1:53 pm, Tim Robinson wrote: > I wasn't saying that MongoDB was similar in terms of master-master vs. > master-slave, I was saying MongoDB was similar in that it implements > conflic

Re: FleetDB or other "NoSQL" store for Clojure?

2011-07-17 Thread Tim Robinson
ich indeed is "master-master". MongoDB is > extended "master-slave". > > On Sun, Jul 17, 2011 at 6:45 PM, Tim Robinson wrote: > > > > > > > > > MongoDB is similar, in that it supports conflict resolution, only I > > believe you only hav

Re: FleetDB or other "NoSQL" store for Clojure?

2011-07-17 Thread Tim Robinson
- it should support transactions I love the word *should* :) Question: Do you really need transactions? or is that you just need conflict resolution? I ask because many No-SQL datastores support the later which often is good enough (or even better in my opinion). For example look at the descrip

Re: meta data question

2011-07-13 Thread Tim Robinson
e-arities #{2 3}, :inline > > #, :doc "Returns > > the value mapped to key, not-found or nil if key not present."} > > > works because a contains the fn object (get in this case). > > > If your intent is to get the meta data of an unnamed fn at runtime > >

meta data question

2011-07-13 Thread Tim Robinson
I know I can get the meta data using the following form: => (meta #'get) {:ns #, :name get, :file "clojure/ core.clj" Is there a means to get the meta data from the stored function without using its identifier? ie. knowing this result: => get # Can I somehow do this: =>(meta #) java.lang.

Re: Correct way to define the else clause of a cond form?

2011-07-06 Thread Tim Robinson
, Ken Wesson wrote: > On Wed, Jul 6, 2011 at 11:06 PM, Tim Robinson wrote: > > You have some rogue text cluttering your cond statement. > > Remove the question mark... or whatever this is... > > >  > > > and you'll be fine. > > Whatever WHAT is? There&

Re: Correct way to define the else clause of a cond form?

2011-07-06 Thread Tim Robinson
You have some rogue text cluttering your cond statement. Remove the question mark... or whatever this is...  and you'll be fine. On Jul 6, 8:58 pm, Conrad Taylor wrote: > On Jul 6, 7:33 pm, Benny Tsai wrote: > > > Could you please post the entire form, including the code surrounding the > > c

Re: Correct way to define the else clause of a cond form?

2011-07-06 Thread Tim Robinson
In addition to Benny's suggestion - I will suggest, for future reference, that the ClojureDocs website does an brilliant job in showing some examples. It really is a valuable resource that I've come to rely on. http://clojuredocs.org/clojure_core/clojure.core/cond And what's interesting to note

Guide to Programming in Clojure for Beginners

2011-06-28 Thread Tim Robinson
I'm fairly new to Programming, Clojure and Blogging, but I did manage to write a few posts about Clojure in my spare time. http://blackstag.com/blog.posting?id=5 I have now have a newly found appreciation for how much effort this kind of stuff can be :) Feedback is always welcome. Regards, Tim

Re: Cons vs List vs. ISeqs

2011-06-24 Thread Tim Robinson
Makes sense - Thanks (to all)! Tim On Jun 24, 8:29 pm, David Sletten wrote: > On Jun 24, 2011, at 7:35 PM, Tim Robinson wrote: > > > I'm under the impression that traditional lisps have a greater > > distinction between a cons operation vs. a list operation. > > Spe

Cons vs List vs. ISeqs

2011-06-24 Thread Tim Robinson
I'm under the impression that traditional lisps have a greater distinction between a cons operation vs. a list operation. Specifically I had believed that consing was a more efficient and better performing operation than using list. Is this true? and if so, given both the Cons and Lists are actual

Re: Jesus, how the heck to do anything?

2011-03-23 Thread Tim Robinson
> From what I've read and heard, TextMate would probably do exactly what I > want, but that only runs on Mac. Note there is a Windows version of textmate. http://www.e-texteditor.com/ And I've been able to use the bundles from the mac version in the windows version (for other languages at least

Re: Jesus, how the heck to do anything?

2011-03-23 Thread Tim Robinson
I suggest skipping right to leiningen: https://github.com/technomancy/leiningen Once you spend a few minutes creating a project template, you can then run a simple command to create a jar file and run it. Tim On Mar 23, 1:50 am, ultranewb wrote: > Short version:  How do I just open an editor,

Re: complication using re-gsub having special chars in replacement string

2011-03-22 Thread Tim Robinson
; "\\$@sub") > "stuff$@substuff" > > On Mar 22, 8:05 pm, Tim Robinson wrote: > > > I'm not well versed in regex functions., so I'm probably missing > > something really obvious. > > > => (re-gsub #"\$@" "--"

complication using re-gsub having special chars in replacement string

2011-03-22 Thread Tim Robinson
I'm not well versed in regex functions., so I'm probably missing something really obvious. => (re-gsub #"\$@" "--" "stuff$@stuff") "stuff--stuff" =>(re-gsub #"\$@" "$@" "stuff$@stuff") java.lang.IllegalArgumentException: Illegal group reference (NO_SOURCE_FILE:0) Anyone run into this and have a

Re: Metadata on symbols differ with caret reader

2011-01-19 Thread Tim Robinson
I upgraded lein from 1.3.1 to 1.4.2, which fixed the problem. :) On Jan 10, 6:47 am, Stefan Kamphausen wrote: > Hi, > > I can't verify that a REPL created by lein behaves differently.  Did you > perhaps update an old project.el without running lein deps? > > In addition to that: your defproject h

Re: Metadata on symbols differ with caret reader

2011-01-10 Thread Tim Robinson
ng :) Cheers Tim On Jan 9, 11:40 pm, Meikel Brandmeyer wrote: > Hi, > > On 10 Jan., 04:17, Tim Robinson wrote: > > > How does this happen when :tag is not even in the expression? > > If you launch a brand new repl and run it what happens? > > What I posted in the pr

Re: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
user=> (meta '^:k o) {:tag :k} How does this happen when :tag is not even in the expression? If you launch a brand new repl and run it what happens? On Jan 9, 5:17 pm, Meikel Brandmeyer wrote: > Hi, > > Am 10.01.2011 um 01:10 schrieb Tim Robinson: > > > You mus

Re: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
ing something? On Jan 9, 5:17 pm, Meikel Brandmeyer wrote: > Hi, > > Am 10.01.2011 um 01:10 schrieb Tim Robinson: > > > You must have something messed up: > > > In line 1 (meta ^:k []) does not return {:tag :k}  it returns nil and > > I am using Clojure 1.2. &

Re: Metadata on symbols differ with caret reader

2011-01-09 Thread Tim Robinson
You must have something messed up: In line 1 (meta ^:k []) does not return {:tag :k} it returns nil and I am using Clojure 1.2. Both lines 1 and 2, shouldn't return meta, because 'meta' only takes an object as an input argument. And only if the object already has metadata will metadata will retu

Re: ANN: ClojureQL 1.0.0 now released

2011-01-08 Thread Tim Robinson
Thank you for making this. It's a great idea and really enjoyable to use. Tim On Jan 5, 7:14 am, LauJensen wrote: > Hey everybody, > > Just a quick heads up that ClojureQL 1.0.0 is now released. All > interfaces should be final and there are no known bugs. Works out of > the box with PostgreSQL a

Re: Community attitude

2010-12-21 Thread Tim Robinson
ot doing it at all. On Dec 21, 6:39 pm, Ken Wesson wrote: > On Tue, Dec 21, 2010 at 7:47 PM, Tim Robinson wrote: > > In my humble opinion, I don't think what you're experiencing will get > > any better, but here are a few thoughts: > > > 1. You can still enjoy the c

Re: Community attitude

2010-12-21 Thread Tim Robinson
I think it's a pretty complex problem to solve. Although one could re- word a statement to be polite, it's still just window dressing what are still potentially just thoughtless arrogant statements that still insult people within the community. In other words, I'd rather someone say "Why would you

Re: Out of memory

2010-12-21 Thread Tim Robinson
You may want to consider the heap size you have allocated to java. I believe the default is 128. For example you can set this yourself: java -Xms256m -Xmx1024m This provides 256mb initial heap and permits heap to grow to 1024mb. I've been using Leiningen, so in my case I just changed the settin

Re: Ah-hah! Clojure is a Lisp

2010-12-20 Thread Tim Robinson
Hi Ken, I'd like to nominate you on behalf of the Clojure community to convert all non-text resources into text only resources. You officially have my vote. I think your passion makes you the perfect candidate to do this work. In the mean time I'd like to extend a thanks to all the folks having ta

Re: Ah-hah! Clojure is a Lisp

2010-12-20 Thread Tim Robinson
I think too many posters here are equating Clojure with Lisp. Clojure is a LISP, but it is not LISP itself. * Mutability is not a given in all LISP implementations, only some of them. * STM transactions (i.e. state and time management upon non-mutable objects) is a Clojure concept, that no other L

Re: Free Compojure Hosting? (or mostly free)

2010-12-18 Thread Tim Robinson
Free for 1 year: http://aws.amazon.com/free/ On Dec 18, 10:55 am, Alex Baranosky wrote: > Hi guys, > > I've got a simple toy app I'm writing wrote for fun to help my friend figure > out where in the Boston area he should move to.  If I was using Rails I > could throw it up on Heroku, essentially

Re: Unable to run Clojure (jline is missing)

2010-12-08 Thread Tim Robinson
Did you download jline and put it in a location where it can been accessed with the classpath? http://jline.sourceforge.net/ On Dec 8, 6:47 pm, HB wrote: > Hi, > I downloaded Clojure > 1.2https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip > and extract it. > I created CLOJURE_HOME

Re: String-friendly first/rest?

2010-12-08 Thread Tim Robinson
Laurent is right. Best to use substring: > (.substring test 1 (count test)) "bc" On Dec 8, 12:43 pm, Surgo wrote: > To help myself learn Clojure, I figured I would write a pattern > matching / destructing macro to better look like languages I'm more > familiar with; i.e., destructuring by [firs

Re: Creating map from string

2010-12-04 Thread Tim Robinson
Using 'apply hash-map' doesn't handle the transformations. Note the original post requested keywords for keys and integers for vals in the output. On Dec 4, 11:49 am, Tyler Perkins wrote: > How about just > > (apply hash-map (split (slurp "data") #",")) -- You received this message because you

Re: why not change > < type compare functions do a compare on strings as well?

2010-12-03 Thread Tim Robinson
Hi ka, I do already use compare in my functions, but compare alone is costly to performance and isn't as meaningful given it doesn't evaluate true/ false. It's really just about convenience and code-readability while trying not to sacrifice too much speed. To give you an example here's my over-ri

Re: IDE and editors for Clojure

2010-12-02 Thread Tim Robinson
Textmate + Clojure Bundle. There was a Textmate bundle that came out about a month ago that allows the REPL to be called from within the editor. Really slick. There was a video demo and all, I don't remember the name. When I get home, if no one has posted it already, I will provide the link. On D

Re: why not change > < type compare functions do a compare on strings as well?

2010-12-01 Thread Tim Robinson
Actually, it was one of the features I liked about Arc, which is built on scheme. That being said Arc doesn't have as many data type's or structures, quite likely making it better suited for building generic functions, most of which can be applied across the majority of data types/structure's. Cl

Re: why not change > < type compare functions do a compare on strings as well?

2010-11-29 Thread Tim Robinson
ive language. i.e '=' works on strings, so why not > > '>' ? It's not like I don't get the benefits listed, but I think this > > group should also consider audiences outside the arena of expert > > language programmers (who are capable of maki

Re: why not change > < type compare functions do a compare on strings as well?

2010-11-29 Thread Tim Robinson
de the ones from core. > > I'm constantly excluding fns from core which have names I'd rather use > in my own source. > > David > > On Monday, November 29, 2010, Tim Robinson wrote: > > huh? Making a change to the > function  doesn't mean you *can't* wr

Re: why not change > < type compare functions do a compare on strings as well?

2010-11-29 Thread Tim Robinson
pm, David Nolen wrote: > On Mon, Nov 29, 2010 at 2:28 PM, Tim Robinson wrote: > > > I dunno, > > > Where is this arbitrary point people set where language improvements/ > > ease-of-use become less important than negligible performance impacts? > > I ran several bench

Re: why not change > < type compare functions do a compare on strings as well?

2010-11-29 Thread Tim Robinson
I dunno, Where is this arbitrary point people set where language improvements/ ease-of-use become less important than negligible performance impacts? I ran several benchmarks, with warm up and correct time measurements, and didn't get the impression the change was in anyway significant. Take the

why not change > < type compare functions do a compare on strings as well?

2010-11-28 Thread Tim Robinson
why not change > < type compare functions do a compare on strings as well? (defn > ([x] true) ([x y](if (string? x) (. clojure.lang.Numbers (isPos (.compareTo x y))) (. clojure.lang.Numbers (gt x y ([x y & more] (if (> x y) (if (next more)

Re: Understanding clojure bindings

2010-11-27 Thread Tim Robinson
This works as I would expect it to. 'rule' brings in 'state' from the global binding into it's scope giving it priority over the outer scope bindings found in the parent function. On Nov 27, 9:15 pm, Andreas Kostler wrote: > Is this a 'bug' with eval? > > On 28 November 2010 14:09, Ken Wesson w

Re: REQUEST for feedback on http://clojure.org

2010-11-15 Thread Tim Robinson
The main page link to API is a little confusing/annoying. I expect it to go here: http://clojure.org/api ( I expect this because doing a google search on "clojure api" brings it up) However the main page link to API goes directly to here: http://clojure.github.com/clojure/ It's kind of annoying/

Re: to macro or not?

2010-10-29 Thread Tim Robinson
> one is told to avoid macros as long as possible. I've heard this before, but I believe it's intended to be interpreted differently. I believe, it's meant to more like "don't use them unless you need them", which some people translate into "avoid them". I have heard, as a rule of thumb, that less

Re: Any Clojure2js Libraries?

2010-07-09 Thread Tim Robinson
t; On Thu, Jul 8, 2010 at 1:17 PM, Tim Robinson wrote: > > All I got from google was Clojurescript, but I'm wondering what > > options are out there. > > > I was looking for something like scheme2js[1] only in Clojure. > > > Thanks, > > Tim > > >

Any Clojure2js Libraries?

2010-07-08 Thread Tim Robinson
All I got from google was Clojurescript, but I'm wondering what options are out there. I was looking for something like scheme2js[1] only in Clojure. Thanks, Tim [1] http://www-sop.inria.fr/mimosa/scheme2js/ -- You received this message because you are subscribed to the Google Groups "Clojur

Re: Getting Clojure into the workplace, how do you do it?

2010-07-06 Thread Tim Robinson
I don't plan to let it stop me (def typical-estimated-cost 5) (defn propose-cost-with [choice] (if (= choice "Clojure") ( * typical-estimated-cost .7) typical-estimated-cost)) > (propose-cost-with "Clojure") ... > (propose-cost-with "Other") ... In my opinion man

Re: How to: an anonymous recursive function

2010-07-01 Thread Tim Robinson
unction recursively." `(letfn [(~'self ~parm-binds (do ~expr))] (~'self ~...@parms))) > (anaphoric-recur [x] (if (= x 0) 1 (* 2 (self (dec x 5) 32 On Jun 30, 2:13 pm, Tim Robinson wrote: > Thanks for all the replies. Sorry if my responses are dela

Re: How to: an anonymous recursive function

2010-07-01 Thread Tim Robinson
is is roughly equivalent to the arc 'afn' function (a scheme variation). Thanks everyone. Tim On Jun 30, 2:13 pm, Tim Robinson wrote: > Thanks for all the replies. Sorry if my responses are delayed. I'm > still on newb moderation mode, so I find my response can take 2 -

Re: How to: an anonymous recursive function

2010-06-30 Thread Tim Robinson
t; compile efficiently as a jmp. So it's a nice compromise. > > <http://clojure.org/special_forms#SpecialForms--(recur exprs*)> > > HTH, > > Dominic > > On Wed, Jun 30, 2010 at 2:44 PM, Tim Robinson wrote: > > So I am reading On Lisp + some blogs while learning

How to: an anonymous recursive function

2010-06-30 Thread Tim Robinson
So I am reading On Lisp + some blogs while learning Clojure (I know, scary stuff :) Anyway, I've been playing around to see if I can get an anonymous recursive function to work, but alas I am still a n00b and not even sure what Clojure's approach to this would be. How would I do this in Clojure?:

Re: Clojure's n00b attraction problem

2010-06-29 Thread Tim Robinson
Being a n00b, 1 year programming, not formally educated in such, 2 weeks with Clojure I am going to agree. Clojure is NOT n00b friendly. The easiest setup I have ever seen dealt with is python. * Most n00bs want a "hello world" in an application output (via script or compojure). Not in a repl. The

Re: Duplicate key bug in hash-maps

2010-06-27 Thread Tim Robinson
Can I change the title to: "Duplicate key error handling feature in hash-sets" ? I was using the '#' thinking it was short for a hash-map, rather than a hash-set. Clojure has more data structures available than I'm used to working with. So thanks for the error handling. Tim On Jun 25, 9:37 a

Duplicate key bug in hash-maps

2010-06-25 Thread Tim Robinson
I tried Clojure via Githhub today. Anyone notice this bug that hadn't existed in Version 1.1 user=> #{:item1 {:a "A" :b "B"} :item2 {:a "A" :b "B"}} java.lang.IllegalArgumentException: Duplicate key: {:a "A", :b "B"} Tim -- You received this message because you are subscribed to the Google Gro

Re: State of Clojure web development

2010-06-24 Thread Tim Robinson
searching :) This is a really niggly point since relatively speaking it's well done. As I said, I'm green. I'll get there soon I promise :) Tim On Jun 24, 1:48 pm, Meikel Brandmeyer wrote: > Hi, > > Am 24.06.2010 um 21:12 schrieb Tim Robinson: > > > I would like

Re: State of Clojure web development

2010-06-24 Thread Tim Robinson
1. Have you written, or are you writing, a web application that uses Clojure? What does it do? I am new to Clojure, I've ported over most of my code for an ad-hoc application creator / with reporting and GIS integration. I'm pretty much finished. I benchmarking speed. 2. Which libraries or fram

Re: Is it possible to define custom atom/data types?

2010-06-24 Thread Tim Robinson
g searches every string, js-fn or not. And since I have to check type already I can use that without adding any real overhead. Thanks. Tim On Jun 24, 11:42 am, Meikel Brandmeyer wrote: > Hi, > > Am 24.06.2010 um 07:36 schrieb Tim Robinson: > > > Is it possible to define custom at

Is it possible to define custom atom/data types?

2010-06-24 Thread Tim Robinson
Is it possible to define custom atom/data types? Example: I would like an atom prefixed with $ to maintain it's own type/class. i.e. > (class $myatom) clojure.lang.CustomeName Thanks, Tim -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to t

Re: I am unclear on how I can call an Ifn stored in a map usefully

2010-06-23 Thread Tim Robinson
Perfect! And Thanks! Tim On Jun 22, 7:00 pm, Michał Marczyk wrote: > Firstly, consider using Delays rather than IFn. See (doc delay) and > (doc delay?). In Clojure, many sorts of things are IFns, including > (among others) sets, vectors and maps, and you probably don't want to > call those. > > (d

I am unclear on how I can call an Ifn stored in a map usefully

2010-06-22 Thread Tim Robinson
Hello Folks, I'm a noob to both programming (1 year part-time) and to Clojure (1 week). I am unclear on how I can call an Ifn stored in a map usefully and I am hoping you can help me. I have stored data in a few maps (both functions and data): user=> (def uhoh* (ref {:event {:date #(date