Encapsulating Sub-Systems with Protocols

2016-09-15 Thread Cameron Barre
Has anyone used protocols to create explicit boundaries between the bigger pieces of their systems? We want to track/control the interactions between these sub-systems and are considering using protocols to define public APIs. Is this good practice? Would it be better to simply create our API l

:default catch blocks with core.async and clojurescript

2016-05-14 Thread cameron
ssing? I'm using clojurescript "1.8.51" and core.async "0.2.374" Cameron. -- 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 memb

Re: testing platform , midje or specjl ?

2014-10-26 Thread cameron
Id' second clojure.test, it's simple, tests are written in idiomatic clojure and has good tooling support (eg. run tests in cider). It's my go-to testing library now. On Monday, 27 October 2014 07:26:25 UTC+11, Ashton Kemerling wrote: > > Don't forget clojure.test! It's simple, but I've found

[JOB] - Clojure job in Melbourne, Australia - IOOF

2014-10-01 Thread cameron
Apologies for the job spam, there are still relatively few Clojure jobs so I hope people don’t mind. We're currently recruiting for an experienced polyglot developer familiar with Clojure (no commercial experience necessary) and Java in Melbourne, Australia. We have grand plans to transit

Re: abysmal multicore performance, especially on AMD processors

2012-12-30 Thread cameron
are taking longer in the parallel version than the serial and they all seem to be methods that have one or more instanceof or instance? calls but given the results above I'm not sure how much weight to give this. It's seems the elephant is still in the room and responsible to ~50% o

Re: abysmal multicore performance, especially on AMD processors

2012-12-28 Thread cameron
No, it's not the context switching, changing isArray (a native method) to getAnnotations (a normal jvm method) gives the same time for both the parallel and serial version. Cameron. On Saturday, December 29, 2012 10:34:42 AM UTC+11, Leonardo Borges wrote: > > In that case is

Re: abysmal multicore performance, especially on AMD processors

2012-12-28 Thread cameron
re to go from here, these functions are frequently used by clojure.core Perhaps someone with more JVM implementation knowledge can help? Cameron. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to c

Re: abysmal multicore performance, especially on AMD processors

2012-12-24 Thread cameron
fter the change above clojush.interpreter/execute_instruction is looking like a hotspot with clojure.lang.ArraySeq creation seeming to spend more time in java.lang.Class.getComponentType() in the parallel version than the serial one. Cameron. -- You received this message because you are su

Re: abysmal multicore performance, especially on AMD processors

2012-12-14 Thread cameron
#x27;ve uncovered. > > Agreed, I'd like clojure to be my preferred language when I have a 100 core machine, it's certainly something I'd like to get to the bottom of. Cameron. -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: abysmal multicore performance, especially on AMD processors

2012-12-14 Thread cameron
but there would seem to be a case for changing the PersistentList implementation in clojure.lang. Cameron. -- 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 n

Re: abysmal multicore performance, especially on AMD processors

2012-12-13 Thread cameron
t to your multiple jvm test. I just split the population into small blocks and had each map function calculate the fitness and return a map of individual-id -> fitness. Cameron. -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: abysmal multicore performance, especially on AMD processors

2012-12-12 Thread cameron
On Thursday, December 13, 2012 12:51:57 AM UTC+11, Marshall Bockrath-Vandegrift wrote: > > cameron > writes: > > > the megamorphic call site hypothesis does sound plausible but I'm > > not sure where the following test fits in. > > ... > > >

Re: abysmal multicore performance, especially on AMD processors

2012-12-12 Thread cameron
pact differed significantly between intel and amd hardware. Cameron. -- 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 pati

Re: abysmal multicore performance, especially on AMD processors

2012-12-10 Thread cameron
mory allocation. Cameron. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread cameron
I forgot to mention, I cut the number of reverse iterations down to 1000 (not 1) so I wouldn't have to wait too long for criterium, the speedup numbers are representative of the full test though. Cameron. On Sunday, December 9, 2012 6:26:16 PM UTC+11, cameron wrote: > > &g

Re: abysmal multicore performance, especially on AMD processors

2012-12-08 Thread cameron
are no blocked threads for the duration of the test and there is no unexpected monitor/lock usage. Cheers, Cameron. -- 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 tha

Re: [ANN] geva-clj 1.2 - Grammatical evolution in clojure

2012-07-27 Thread cameron
It doesn't support that out of the box but it should be pretty straight forward to add. Was the use case you were thinking of something like this http://paste.lisp.org/display/130713 ? Cameron. On Thursday, July 26, 2012 11:07:31 PM UTC+10, Jeff Rose wrote: > > Wow, cool. Ove

Re: community interest in machine learning (?)

2012-07-26 Thread cameron
so I think you should be ok now though I did have to delete ~/.m2 in one case. Let me know if you have any problems. Cheers, Cameron. On Thursday, July 26, 2012 11:42:07 PM UTC+10, Lee wrote: > > > Cameron, > > I'm eager to check this out. > > There's a missing qu

[ANN] geva-clj 1.2 - Grammatical evolution in clojure

2012-07-25 Thread cameron
t.clj [org.clojars.cdorrat/geva-core "1.2-SNAPSHOT"] Cameron. -- 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: community interest in machine learning (?)

2012-07-25 Thread cameron
7;ll look at merging the changes from 2.0 release. Cheers, Cameron. -- 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 b

Re: community interest in machine learning (?)

2012-07-21 Thread cameron
I wrote a clojure wrapper for GEVA ( a gramatical evolutional library, see http://ncra.ucd.ie/Site/GEVA.html) that I can put on github if theres any interest. I'm not as active in this area as I once was but I'm definitely still interested. -- You received this message because you are subscr

Re: Bret Victor - Inventing on Principle

2012-02-25 Thread cameron
Great video, it was interesting that the binary search example only really works with pure functions since you must specify all of the initial state for the debugger/visualiser. In non-pure functions (and oo) the user is unlikely to be able to specify valid values for all the mutable state even

ANN: reduce-fsm 0.1.0 released

2011-11-03 Thread cameron
available at http://cdorrat.github.com/reduce-fsm/ and the source at https://github.com/cdorrat/reduce-fsm Feedback and comments are welcome. Cameron. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

Re: "Binding" and temporary global state

2010-09-06 Thread Cameron Pulsford
, Jarkko Oranen wrote: > Cameron Pulsford wrote: > > Is there a way to do this? Besides cleaning up function signatures is > > this a premature optimization to begin with? > > > (declare *macros*) > > > (defn macro-expand [tokens] > >   (map #(get *macros* %

"Binding" and temporary global state

2010-09-06 Thread Cameron Pulsford
Hello all, here is an extremely reduced version of a problem I'm not sure how to work around. (It's going to be a toy assembly language if anyone's wondering) When I call assemble in the following code I get the error: "java.lang.IllegalStateException: Var reader/*macros* is unbound." I'd like *mac

Re: trouble using nested map fn

2010-08-23 Thread Cameron Pulsford
f nesting anonymous functions, and while performance isn't > a big deal for me I'm curious. > > On Aug 23, 12:30 pm, Cameron wrote: > > > > > Again with the bad examples but... > > > (map #(even? %) coll) is faster than > > (map (partial even?) coll) > &

Re: Unsigned-right-shift patch

2010-08-23 Thread Cameron Pulsford
icMember class args) to (class/ > staticMember args) while you're in there. You could also fix the other > shift operators if you wanted. > > On Aug 23, 1:15 pm, Cameron wrote: > > > > > Hey all, I had an itch this weekend... so I scratched it. > > > I was doi

Unsigned-right-shift patch

2010-08-23 Thread Cameron
Hey all, I had an itch this weekend... so I scratched it. I was doing some bit twiddling stuff and needed the Java >>> operator. I had written some workarounds but they were overly-complicated and slower than I would have hoped, so I dug directly into core and added it as a first class citizen nex

Re: trouble using nested map fn

2010-08-23 Thread Cameron
Again with the bad examples but... (map #(even? %) coll) is faster than (map (partial even?) coll) So it's at least got that going for it. (I know this SHOULD be written as (map even? coll)) On Aug 23, 1:59 pm, Michael Gardner wrote: > On Aug 23, 2010, at 11:13 AM, Luka Stojanovic wrote: > >

Re: Protocols and default method implementations

2010-08-12 Thread Cameron
I've been wondering about this topic recently as well. >Often such a function does not need to be part of the contract for >implementers (i.e. the protocol) at all. Stu, (or anybody) I'd like to ask about a variation on this point. How do you handle the case where you have a general function tha

Re: Resource cleanup when lazy sequences are finalized

2010-08-04 Thread Cameron
Not 100% on this, but this is what I do when reading files... (with-open [rdr (BufferedReader. (FileReader. file-name))] (reduce conj [] (line-seq rdr))) That ensures that the whole seq is realized without closing the handle, but it also allows you to wrap the whole block with a take function

Re: Idea for personal Clojure project

2010-07-28 Thread Cameron Pulsford
aining set. I'd offer you the file I had but I think I deleted it after the semester was over.. -Cameron On Jul 28, 2010, at 4:58 PM, Daniel wrote: > I want to write a clojure program that searches for similarities of > words in the english language and places them in a graph, where t

Re: destructuring using :as in fn arg vector

2010-07-28 Thread Cameron
Ahhh! It's so obvious now that I'm almost embarrassed. Thank you Randy Cam On Jul 27, 4:17 pm, Randy Hudson wrote: > The form you're looking for is (defn foo [ & [a b :as c]] ...) > > On Jul 27, 2:57 pm, Cameron wrote: > > > > > Hey all, just wonderi

destructuring using :as in fn arg vector

2010-07-27 Thread Cameron
Hey all, just wondering if this is normal or not. There seems to be something weird going on with :as in a functions arg vector. This little example works as I'd expect... user=> (defn foo [[a b :as c]] c) #'user/foo user=> (foo [1 2]) [1 2] But this one does not user=> (defn foo [a b :as c] c) j

Re: filtering with multiple predicates

2010-07-24 Thread Cameron
Hi Bill, How about something like... (filter #(every? true? ((juxt f g h) %)) my-list) In the character sense it's not more terse than your original example, but it is a little nicer to add additional functions to compare with. Throwing it in a function could be useful too (defn multi-filter

Re: Variadic arguments and macros

2010-07-07 Thread Cameron
#x27;coll'. How is passing an explicit list any different than having it destructured via '&' in the argument vector? On Jul 7, 1:11 pm, Jason Wolfe wrote: > Hi Cameron, > > On Jul 7, 9:49 am, Cameron wrote: > > > Hello all! Today, I've either discovere

Re: Variadic arguments and macros

2010-07-07 Thread Cameron
t; > > On Wed, Jul 7, 2010 at 6:03 PM, Nicolas Oury wrote: > > If you macroexpand the first foo in (foo 1 2), you will see something like > > (1 2) > > > when this gets evaluated, Clojure is not happy about 1 not being a > > function. > > > On Wed, Jul 7, 2010 at

Variadic arguments and macros

2010-07-07 Thread Cameron
Hello all! Today, I've either discovered a bug, or I've discovered a flaw in my understanding of macros. Most likely the latter :-) Could anyone set me straight? While this is not the macro I was trying to write, it falls over in the same place. (user=> (defmacro foo [& xs] `(map identity ~xs)) #

Binding broken in 1.1.0-alpha

2009-10-22 Thread Cameron McKay
Not sure if you guys know this but binding doesn't work in 1.1.0-alpha on Snow Leopard and apparently Linux. (def foo 10) ; => '#user/foo foo ; => 10 (binding [foo 42] foo) ; => 10 (binding [user/foo 42] foo) ; => 10 (binding [user/foo 42] (var-get #'user/foo)) ; => 10 Here's the post on Sta