Re: namespace :as vs :require

2015-06-06 Thread Todd Stout
brary that > provides defsomething forms (because we're used to (def ..), (defn ..), > (defmacro ..) etc). > > On Fri, Jun 5, 2015 at 8:33 PM, Todd Stout > wrote: > >> What is considered idiomatic when using :as and :require in your >> namespace declarations? I u

namespace :as vs :require

2015-06-05 Thread Todd Stout
What is considered idiomatic when using :as and :require in your namespace declarations? I understand that :as will require everything in the namespace to use symbol/fn syntax. The :require usage will mandate more verbose symbol references in the ns declaration, but your code in that namespace

namespace scope

2015-06-04 Thread Todd Stout
What are the scope rules of a namespace? For example, can a single file define multiple namespaces? Can multiple files contribute to the same namespace? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

ClojureScript UI binding library

2012-07-27 Thread Matthew Todd
Hi, I am looking for some feedback on my ClojureScript library cljs-binding. If you haven't already seen it, it’s a library that aims to make it easier to bind html elements to ClojureScript functions. It allows jQuery functions to be called on

Re: circular references

2010-12-29 Thread Todd
Ken - > {:a (ref (some-object-mentioning :b)) > :b (ref (some-object-mentioning :a))} That is cool, I'll try it. Thanks for the tip! -Todd On 12/29/10 7:27 PM, Ken Wesson wrote: On Wed, Dec 29, 2010 at 9:26 PM, Alex Osborne wrote: Todd writes: 3. alter ref2 to have

circular references

2010-12-29 Thread Todd
previous thread once I understand how to handle (or not handle, perhaps) circular references. -Todd -- 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 m

Re: Speed of clojure hash map vs java hash map

2010-12-28 Thread Todd
par w/ yours, and I don't see any significant change in insertion times as a fx of map size up to 1e5. Overall, NonBlockingHashMap insertions to take ~10x longer than the SynchronizedHashMap. I think your idea of measuring under heavy contention would be very useful. -Todd On 12/28/1

From Binary Search Trees to the Dining Philosopher

2010-12-28 Thread Todd
e Management of Practical Clojure was particularly helpful to me for figuring out the syntax for refs and agents.) Anyone feel like tearing my code apart? I'd like to make it as clean and clojure-ish as possible. -Todd -- You received this message because you are subscribed to the Googl

Writing apps in clojure and/or java : Binary Search Trees

2010-12-14 Thread Todd
resting algorithms/datatypes in java and then surface them to clojure. BTW - I've documented the links I've found useful along the way in the README. I've ordered 'Land of Lisp', so I'll report back how that works w/ Clojure. -Todd -- You received this message b

binary search tree in clojure

2010-12-04 Thread Todd
As an exercise in learning clojure, I implemented a basic binary search tree in clojure: https://gist.github.com/727982 Any feedback would be appreciated. -Todd -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

clojure eval + records + protocols

2010-09-17 Thread Todd
ss of encapsulating api details like this in the data? As the Protocol and Record implementations are rev'd, how would one make the underlying data flexible to this (backwards compatible?) -Todd - CODE - $ cat context.clj (def dsl-

leiningen seems broken on clojure 1.2 beta 1

2010-07-15 Thread Todd
isted, now upgrade to clojure 1.2 beta 1 cat project.clj (defproject test02 "1.0.0-SNAPSHOT" :description "FIXME: write" :dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]]) lein

clojure + voltdb

2010-07-09 Thread Todd
I've created a basic project to show how to create a voltdb database, and then to create java and clojure clients for this database: http://github.com/ToddG/clojure-voltdb Any feedback would be most welcome. There's a tutorial and ant tasks for each step. -Todd -- You received th

Re: Question: pmap + number of threads + number of cpus

2010-06-29 Thread Todd
=== toddg=> (show (into () (range 10))) === public clojure.lang.PersistentList === Q: Where are the clojure.lang classes documented? I see the classes in the source, but they do not appear to have javadocs. BTW - I really enjoyed your book. -Todd On 6/28/10 6:45 AM, Chouser wrote: On Sat, Jun 26, 2010

Question re: pmap and the number of available processors

2010-06-27 Thread Todd
if-let [s (seq fs)] (cons (deref x) (step xs (rest s))) (map deref vs] (step rets (drop n rets -Todd -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goog

Re: compiling clojure for a servlet container (tomcat)

2010-06-23 Thread Todd
Adrian/Alex - Thank you for both of your responses. As I'm new to clojure (and lisp in general), it'll take me a bit to puzzle through your code and links. However, I'll use it as an example to study the language. Thanks again! -Todd -- You received this message because you

Re: Clojure script in the classpath : + Servlet Container Question

2010-06-20 Thread Todd
while back about integrating spring with clojure. Is it possible to autowire either proxy or gen-class clojure classes? If so, does anyone have any experience with this scenario? -Todd On 6/19/10 10:39 AM, Paul Moore wrote: On 19 June 2010 17:22, Chas Emerick wrote: If you're just lookin

newbie: simple histogram problem

2010-06-14 Thread Todd
#x27;f', is expected to be a file of words, as you'd get from '/usr/share/dict/words'. I don't see how to accumulate the results in the map, 'histo'. This is really a question of how does one map a function to a collection and accumulate the results..

Re: Which Java book(s) to order

2009-03-19 Thread Todd Fincannon
For the Java libraries, I like Java Cookbook 2ed by Ian Darwin. It doesn't spend much time on the language. It includes introductions to Swing, network clients and servers, regular expressions, introspection, and JDBC. It was published in 2004, so it doesn't cover Java 6. Todd