Re: [ANN] clj-wamp : a WebSocket sub-protocol for HTTP Kit

2013-06-24 Thread Christopher Martin
Martin, Thanks for the kind feedback. I've written a tutorial (first draft) that covers some of the basics, and created a leiningen template for quick-starting a new HTTP-Kit/clj-wamp project: http://cljwamp.us/tutorial https://github.com/cgmartin/clj-wamp-template Cheers, ~Christopher M

[ANN] clj-wamp : a WebSocket sub-protocol for HTTP Kit

2013-06-18 Thread Christopher Martin
in/clj-wamp-example The code has stabilized enough to release as beta, but I'll warn you that it's still under development. Next up is to try integrating with Aleph, and port the JavaScript WAMP client to ClojureScript. Cheers, ~Christopher Martin -- -- You received this message be

Re: Confluence (http://dev.clojure.org) maintenance tonight

2013-04-09 Thread Christopher Redinger
This maintenance has finished. On Tue, Apr 9, 2013 at 7:49 PM, Christopher Redinger wrote: > We're going to bring Confluence down for maintenance. This will start > at 9pm Eastern. I anticipate it should only be down for less than 30 > minutes. > > -- > You received this

Confluence (http://dev.clojure.org) maintenance tonight

2013-04-09 Thread Christopher Redinger
We're going to bring Confluence down for maintenance. This will start at 9pm Eastern. I anticipate it should only be down for less than 30 minutes. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@google

Re: Call for volunteers to help moderate a ClojureScript Google group

2013-01-23 Thread Christopher Meiklejohn
I'd be up for it as well. - Chris -- Christopher Meiklejohn On Wednesday, January 23, 2013 at 2:10 PM, Robert Pitts wrote: > I'd be up for helping. > > On Wednesday, January 23, 2013 1:53:34 PM UTC-5, Andy Fingerhut wrote: > > An interest was expressed by a

Re: clojure-contrib migrations

2012-12-18 Thread Christopher Meiklejohn
ut of the large clojure.contrib package? - Chris -- Christopher Meiklejohn On Tuesday, December 18, 2012 at 1:56 AM, Andy Fingerhut wrote: > If you want it to remain a Clojure contrib library with a clojure.* > namespace, you'll need to sign a Clojure CA to be able to make contrib

clojure-contrib migrations

2012-12-17 Thread Christopher Meiklejohn
Hi there, I'm inquiring regarding the clojure-contrib migration process. I'd like to offer to step up and maintain clojure-contrib.graph, mainly starting with converting the defstructs over to defrecords so I can start playing around in ClojureScript with this library. What's the process movi

Re: [ANN] New functional programming group (Western Massachusetts)

2012-12-07 Thread Christopher Meiklejohn
On Friday, December 7, 2012 at 2:35 PM, Chas Emerick wrote: > With help from some friends, I am starting a new FP group here in Western > Massachusetts: I just thought that I would mention that I've also recently started a FP group in Providence, Rhode Island; our second meeting is on Jan. 28 at

[ANN] Clojure/core Roadshow

2012-05-10 Thread Christopher Redinger
ister for this class. The actual site where you can register your interest in training is at: http://clojure.com/roadshow Hope to see you on the road! Christopher Clojure/core -- You received this message because you are subscribed to the Google Groups "Clojure" group. To pos

Re: Google Summer of Code 2012 - any mentors?

2012-03-04 Thread Christopher Redinger
I've created a new page in Confluence with questions from the application. http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+Application+Questions If some people can take a pass at getting answers posted to those questions, I can submit the application this week. Also needed:

Re: Google Summer of Code 2012 - any mentors?

2012-02-29 Thread Christopher Redinger
Core has not submitted the application. The application process just opened Monday and goes until March 9th. There have been some leaders among Clojure/dev that have stepped up to organize things. Keep watching http://dev.clojure.org/display/community/Google+Summer+of+Code+2012 for more details

Re: Marshal 1.0.0

2012-02-05 Thread Russell Christopher
ld surely slip by me when implementing my own binary- > encoding library, but which has already been addressed by Gloss. By > choosing a mature and well-known library instead of making your own, > you get more features and fewer bugs. > > On Feb 5, 4:09 pm, Russell Christopher > wr

Re: Marshal 1.0.0

2012-02-05 Thread Russell Christopher
I did look at Gloss before writing Marshal and decided against using it in our application suite, I wanted something more focused utilizing InputStream/OutputStream interface and able to handle variable sized arrays/strings (size of array or string specified in packet). On Sun, Feb 5, 2012 at 6:1

Clojure and large data sets

2011-12-08 Thread Christopher Burke
Hi All, As a newbie I try to read up on Clojure whenever I can. One of the common things that I read is that Clojure is really good for operating on large data sets, but I haven't seen anyone articulate why that is aside from alluding to lazy evaluation. So I assume lazy evaluation is the prima

All Contributor Agreements from the Clojure/conj have been added

2011-11-18 Thread Christopher Redinger
Over 50 new CAs have been signed. If you have signed one, you should see your name on this list: http://clojure.org/contributing. Thanks everybody! -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegr

Re: Clojure Conj extracurricular activities spreadsheet

2011-11-07 Thread Christopher Redinger
On Thursday, November 3, 2011 3:46:40 PM UTC-4, David Nolen wrote: > > Any thoughts about when / where these events can take place? Is it > possible to get access to a projector? Or do we have to fend for ourselves? > We have modified the contract with the hotel to keep the projector in the main

Re: Clojure Conj extracurricular activities spreadsheet

2011-11-06 Thread Christopher Maier
I'm interested in attending the core.logic, overtone, literate programming, web, and clojurescript sessions. Thanks! -Chris -- 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

Re: Clojure Conj extracurricular activities spreadsheet

2011-11-05 Thread Christopher Redinger
On Friday, November 4, 2011 9:16:08 PM UTC-4, Fogus wrote: > > At this point it would be great if a Conj-planning heavyweight could > step in and provide some additional ideas... although solutions would > be great too. :-) > Oh, I guess that's me. See the floorplan

Re: Is Clojure Simple?

2011-10-25 Thread Christopher Burke
Interesting discussion of this talk, including comments from Rich (or at least someone claiming to be Rich): http://www.reddit.com/r/programming/comments/lirke/simple_made_easy_by_rich_hickey_video/ On Oct 25, 7:00 am, Laurent PETIT wrote: > 2011/10/25 Michael Jaaka : > > > Something is simple a

[ANN] Clojure 1.3 Released

2011-09-23 Thread Christopher Redinger
Ben Smith-Mannschott Benjamin Teuber Brian Hurt Chas Emerick Chouser Christophe Grand Christopher Redinger Colin Jones Cosmin Stejerean Daniel Solano Gómez David Miller David Powell David Rupp Fogus George Jahad Jason Wolfe Juha Arpiainen Justin Balthrop Kevin Dow

Clojure/conj 2011 Early Bird Pricing ends today!

2011-09-23 Thread Christopher Redinger
Hey all! Just wanted to drop you all a quick note to remind you that today is the last day of early bird pricing for Clojure/conj. We now have as many attendees registered as we had in attendance last year. So this event is really shaping up to be a fantastic Clojure conference. The full sched

[ANN] Clojure 1.3 RC0

2011-09-13 Thread Christopher Redinger
Clojure 1.3 RC0 is now available at http://clojure.org/downloads Changes since Beta 3: * Optimization should not demote BigInts (CLJ-836) * Added Intrinsics * fix nary-inline so *unchecked-math* works again Please download it and let us know how it works for you. 1.3 is getting close. -- You

Re: Swarming experiment at Conj?

2011-09-09 Thread Christopher Redinger
On Thursday, September 8, 2011 5:36:17 PM UTC-4, Brian Marick wrote: > > I'd be willing to do the implementation work to allow us to run this > experiment at the Conj during after-hours or other hacking time. I'd need to > know there were interested participants and someone from the Conj > organ

[ANN] Clojure 1.3 Beta 3

2011-09-02 Thread Christopher Redinger
Clojure 1.3 Beta 3 is now available at http://clojure.org/downloads The list of changes: * Load resources when baseLoader() is null (CLJ-673) * Equiv overload added for primitive booleans * Documentation updates for juxt and defrecord (CLJ-815, CLJ-736 respectively) We think this is ready to b

Re: Problem with ClojureScript and Node.js

2011-08-30 Thread Christopher Redinger
I checked in a change this morning that fixes this. On Wednesday, August 17, 2011 11:25:54 AM UTC-4, Mark McGranaghan wrote: > > > > On Jul 28, 4:50 pm, Anthony Grimes wrote: > > Oh! I apologize. I was replying via the google interface and didn't > realize > > it wasn't quoting. Here is a link

[ANN] Clojure 1.3 Beta 2

2011-08-29 Thread Christopher Redinger
Clojure 1.3 Beta 2 is now available at http://clojure.org/downloads The list of changes: * clojure.test/*/*-report vars made dynamic for use with external tools. * Calls favor arg vectors :tag over var :tag (CLJ-811) * BigInt ops made faster when values are small enough to be treated

Re: Stanford AI Class

2011-08-16 Thread Christopher Burke
I was wondering about the prerequisites as well and found some further information here: http://www.stanford.edu/class/cs229/materials.html In particular, the first 2 entries under Section Notes. On Aug 16, 1:46 pm, Mark Engelberg wrote: > Nice.  I'm glad these other classes are getting the ful

Clojure/conj for beginners?

2011-08-16 Thread Christopher Burke
Hi Recently I've taken interest to learning Clojure. I've watched presentations, read the Joy of Clojure, done some examples on 4clojure, but have yet to do any "real" programming. I work in enterprise-land and for the most part its all Java without much room to try newer things. With that

Re: Clojure/conj 2011 Call For Speakers Ends Soon - Aug 19th!

2011-08-12 Thread Christopher Redinger
On Friday, August 12, 2011 2:42:04 PM UTC-4, Christopher Redinger wrote: > > Speakers will receive: > * A catered speakers dinner on Thursday night. > Correction: Wednesday night. -- You received this message because you are subscribed to the Google Groups "Clojure"

Clojure/conj 2011 Call For Speakers Ends Soon - Aug 19th!

2011-08-12 Thread Christopher Redinger
Call For Speakers Clojure/conj 2011 Raleigh, NC Nov 10-12th, 2011 http://clojure-conj.org This is a reminder that the Call for Speakers for the second annual Clojure/conj is ending soon - August 19th at midnight Eastern to be exact! We would still love to receive your abstracts for this conferen

[ANN] ClojureScript

2011-07-20 Thread Christopher Redinger
In case you missed the announcement streamed from this evening's NYC Clojure Group. https://github.com/clojure/clojurescript Clojure to JS compiler. Power of Clojure. Reach of JavaScript. Please use this Clojure mailing list for ClojureScript discussion. We plan to have a recording of tonight'

Re: Anyone on Google+ yet?

2011-07-15 Thread Christopher Redinger
I am also on Google+ https://plus.google.com/u/1/103589339577092342191 Please freel free to add me to you Clojure circles. -- 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

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
will need to analyze large chunks of data and getting insight like this into how to properly optimize the code is invaluable. Thanks a bunch you guys for all the help, I really appreciate it and I learned quite a bit. Christopher On Jul 8, 6:23 pm, David Nolen wrote: > Here's a very u

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
first run, cake was compiling the code and loading the classes into the running JVM to avoid most of the overhead of a fresh startup, but I guess it is instead executing it as a script or something. Good to know! Thanks. On Jul 8, 5:44 pm, Benny Tsai wrote: > Hi Christopher, > > I ran

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
ce of code up, but, at the end of the day, what I am really interested in is learning all the different ways that good Clojure programmers go about analyzing their code for performance issues. So, thanks a bunch for the tip and, please, keep them coming. Christopher On Jul 8, 4:17 pm, Ken Wesson

Re: Help on a Clojure performance question

2011-07-08 Thread Christopher
a few seconds or so) so that wouldn't account for why the program becomes "exponentially" slower when I increase the amount of text that is processes. Christopher On Jul 8, 4:19 pm, Michael Klishin wrote: > 2011/7/9 Christopher > > > % time cake run mapper.clj < inpu

Help on a Clojure performance question

2011-07-08 Thread Christopher
Python and Clojure, as I love them both, I'm strictly trying to learn how to be a better programmer in Clojure. Thanks ahead of time for any help you all can give. Christopher ;; mapper.clj (use ['clojure.java.io :only '(reader)]) (use ['clojure.string :only '(s

Re: Clojure 1.3 Alpha 7

2011-05-20 Thread Christopher Redinger
On Monday, May 16, 2011 4:42:15 AM UTC-4, Tassilo Horn wrote: > > Is there already a bug report for the hash collisions on protocol > dispatch? > http://dev.clojure.org/jira/browse/CLJ-801 -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to th

Re: Clojure 1.3 Alpha 7

2011-05-15 Thread Christopher Redinger
On Sunday, May 15, 2011 8:34:06 PM UTC-4, Alan wrote: > > I'm not on alpha7 yet, but what about (case 49 "1" 'string 49 'int)? > "1" hashes to 49, so there's a hash collision. > user=> (case 49 "1" 'string 49 'int) int -- You received this message because you are subscribed to the Google Gr

Re: bit-clear broken in alpha7?

2011-05-15 Thread Christopher Redinger
On Saturday, May 14, 2011 7:21:06 PM UTC-4, Praki wrote: > > bit-clear documentation doesn't explicitly state that index is zero- > based but I would think so. Alpha7 seems to have broken this function. > Thanks, I've created CLJ-795 and put it into Release.next. http://dev.clojure.org/jira/br

Re: Clojure 1.3 Alpha 7

2011-05-15 Thread Christopher Redinger
On Sunday, May 15, 2011 1:14:20 PM UTC-4, Tassilo Horn wrote: > > java.lang.IllegalArgumentException: No distinct mapping found > at clojure.core$min_hash.invoke (core.clj:5805) > Can you supply a small example where this is happening? For reference, this code that failed in alpha6: user=>

Re: Clojure 1.3 Alpha 7

2011-05-13 Thread Christopher Redinger
> You are correct, it was added in Alpha 7. Christopher Redinger Clojure/core http://clojure.com -- 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 mem

Clojure 1.3 Alpha 7

2011-05-13 Thread Christopher Redinger
ng-target" snapshots). If you are the kind of person who used to track master by building from source, but no longer do so because you are using maven or leiningen, alpha releases are for you. Christopher Redinger Clojure/core http://clojure.com -- You received this message because you are

Re: [OFF-TOPIC] - CA Status

2011-05-10 Thread Christopher Redinger
Hi Bruno, Unless Rich has received your CA within the past couple weeks, I would say he never received it. The compete list of CAs that he is received (within the past couple weeks) is here: http://clojure.org/contributing I'm assuming you sent it to the PO Box listed? Did you do anything spec

Re: Who's using Clojure?

2011-04-28 Thread Christopher Redinger
We've got a good start to the list going http://dev.clojure.org/display/community/Clojure+Success+Stories Any more we should get listed? -- 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 No

Re: Clojure group in DFW area

2011-04-25 Thread Christopher Redinger
ch...@rubedoinc.com wrote: > Rubedo, inc. > 14580 Beltwood Pkwy E Suite 103 > Farmers Branch, TX 75244 > > When: 630PM Monday May 2nd > What: Clojure Interest Group > Topic: 1st meeting, what our goals are, and how to take over the world > with Clojure Hi Chris! Thanks for offering to host the gro

Re: Who's using Clojure?

2011-04-19 Thread Christopher Redinger
that we can post alongside the description. We'll gather this information post the results here as a one-stop place to send people that want the answer to this question. I'll update that page as I receive info. -- Christopher Redinger http://clojure.com -- You received this message because

Re: Clojure Conj 2011 Call For Speakers Now Open

2011-04-05 Thread Christopher Redinger
On Tuesday, April 5, 2011 2:29:39 PM UTC-4, Sam Aaron wrote: > > Are you really requiring two abstracts or is that just a nice bit of > cheese? > We'd really like a minimum of two proposals. Just like last year, we'd like to have a unifying theme throughout the talks. It could end up being the

Clojure Conj 2011 Call For Speakers Now Open

2011-04-05 Thread Christopher Redinger
If you are interested in speaking at this year's Clojure Conj, please send us your talk ideas! Visit http://clojure-conj.org for more details. -- Christopher Redinger http://clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: Serialising functions...

2011-03-05 Thread Christopher Brown
's already been discussed. Cheers, Chris Michael Wood wrote: > On 5 March 2011 07:38, Ken Wesson wrote: >> On Fri, Mar 4, 2011 at 8:07 PM, Christopher Brown >> wrote: >>> It will always return a MAC address, but in a virtualized environment those >>> are a

Re: Serialising functions...

2011-03-04 Thread Christopher Brown
n the same organization, routable at L3 but in separate L2, can have VMs with conflicting MAC addrs. Admittedly, it's a nit to pick, but who would want to debug that? -C Ken Wesson wrote: > On Fri, Mar 4, 2011 at 1:09 PM, Christopher Brown > wrote: >> It's always tempting to u

Re: Serialising functions...

2011-03-04 Thread Christopher Brown
It's always tempting to use the MAC address, and while in physical hardware it's unique, in networking it's only required to be unique within a single L2 domain. Some virtualized environments, including EC2, play games with the MAC address and rendering it useless as a global ID. -C Ken Wesson

Clojure Conj 2011, save the date! Nov 10-12 in Durham

2011-03-01 Thread Christopher Redinger
again this year! -- Christopher Redinger http://clojure.com -- 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: Release.Next Version Number

2011-02-28 Thread Christopher Redinger
t version 1.3. If you are in the camp of not caring what the next version number is, then you do not have a strong objection. I.e. you are not "morally opposed." On Feb 22, 2011, at 9:27 PM, Christopher Redinger wrote: > As you can see on the Release.Next Planning page [1], there

Release.Next Version Number

2011-02-22 Thread Christopher Redinger
http://dev.clojure.org/display/design/Release.Next+Planning -- Christopher Redinger http://clojure.com -- 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: Append a # and a string

2011-02-13 Thread Christopher Maggio
Thanks, just what i was looking for! -Chris On Feb 13, 9:04 pm, Fred Concklin wrote: > Christopher Maggio writes: > > Hi, clojure newbie here; > > > I have a quick question, I am writing a small pattern matching program > > and I can't figure out how to append a

Append a # and a string

2011-02-13 Thread Christopher Maggio
Hi, clojure newbie here; I have a quick question, I am writing a small pattern matching program and I can't figure out how to append a string to a # for re-matcher: (.replaceAll (re-matcher #"ATGCCC" my_String) replacement_String) When I try (string? #"ATGCCC") it returns false. # isnt a macro

Re: Any news on pull requests?

2011-02-05 Thread Christopher Petrilli
On Sat, Feb 5, 2011 at 1:23 PM, Mike Meyer wrote: > On Sat, 5 Feb 2011 00:09:41 -0500 > Christopher Petrilli wrote: >> For example, the following projects REQUIRE contributor agreements, in >> writing, signed and either scanned or on paper, prior to accepting any >

Re: Any news on pull requests?

2011-02-04 Thread Christopher Petrilli
On Fri, Feb 4, 2011 at 10:35 PM, Ken Wesson wrote: > Perhaps. But it's well known that any barrier to participation causes > a percentage drop in same. This topic keeps coming up, and while a large number of people have signed CAs (many of us at the conference last year), people keep citing it as

TriClojure

2011-01-10 Thread Christopher Redinger
Hey all! Just wanted to announce that we have formed TriClojure, the Triangle Clojure Users Group. Tomorrow night, Jan 11th, we are co-hosting with TriFunc a talk from Clojure/core member Aaron Bedra title "Building Analytics with Incanter & Compojure." If you are in the area, please drop by the R

Re: A suggestion for the next Conj

2010-11-03 Thread Christopher Petrilli
I was thinking that it would be handy if the "badges" next year had space for that. I'd be happy to whip up something to collect the data and print the badges. Chris On Wed, Nov 3, 2010 at 12:35 PM, Alexy Khrabrov wrote: > I'd really like to meet everybody from IRC and github, but apparently mi

Re: A question on distributed computing

2010-11-03 Thread Christopher Petrilli
Before going down this road, I'd strongly recommend reading Ross Anderson's paper "Programming Satan's Computer": http://www.cl.cam.ac.uk/~rja14/Papers/satan.pdf In addition, Ross has generously put the first edition of his book "Security Engineering" online: http://www.cl.cam.ac.uk/~rja14/book.

Re: Fastest way to generate comma-separated list

2010-10-27 Thread Christopher Petrilli
I didn't do any timing, but, I would say the idiomatic way: (apply str (interpose ", " some-vector)) Chris On Wed, Oct 27, 2010 at 8:18 PM, andrei wrote: > Hi all, > > I work with a database and need a function, that will convert Clojure > sequence to a string with a comma-separated element

Re: Conj arrivals and Thursday night...

2010-10-18 Thread Christopher Petrilli
I'll be driving down from DC, and probably arriving between 5-6. Just as a note, I'd highly recommend not being anywhere near DC between 4-8p due to traffic. It could easily add 2 hours to your trip. On Mon, Oct 18, 2010 at 4:13 PM, Kyle R. Burton wrote: > Andrew, > > Several of us are car pool

Re: Can anyone create a simpler version of prime factors in Clojure?

2010-06-12 Thread Russell Christopher
On 12 Jun 2010, at 16:18, Russell Christopher wrote: > > > You're right. Hope I haven't offended with the fail, I thought I had > tested it - by iterating over a range and comparing it to Uncle Bob's but > obviously I didn't do that right and then realized that fac

Re: Can anyone create a simpler version of prime factors in Clojure?

2010-06-12 Thread Russell Christopher
t time. Regards, Russell On Sat, Jun 12, 2010 at 5:11 AM, Steve Purcell wrote: > On 11 Jun 2010, at 20:35, Russell Christopher wrote: > > > didn't need the assoc in my previous try > > > > (defn of [n] > > (letfn [(f [res k] > > (if (= 0

Re: Can anyone create a simpler version of prime factors in Clojure?

2010-06-11 Thread Russell Christopher
didn't need the assoc in my previous try (defn of [n] (letfn [(f [res k] (if (= 0 (rem (:n res) k)) {:n (/ (:n res) k) :fs (conj (:fs res) k)} res))] (:fs (reduce f {:n n :fs []} (range 2 n) On Fri, Jun 11, 2010 at 3:15 PM, russellc wrote:

Re: 1.2 letfn/reduce bug?

2010-06-11 Thread Russell Christopher
I couldn't see it! Thanks On Fri, Jun 11, 2010 at 12:25 PM, Krešimir Šojat wrote: > Hi, > > > (defn foo [] > > (letfn (bar [acc val] > >acc) > > (reduce bar {} (range 1 10 > > > > doesn't compile > > java.lang.IllegalArgumentException: Don't know how to crea

Re: a default value for get-in?

2010-05-19 Thread Russell Christopher
slight error w/ the previous, local-get-in should have been local-get (defn get-in ([m ks] (get-in m ks nil)) ([m ks not-found] (letfn [(local-get [nf m ks] (get m ks nf))] (reduce (partial local-get not-found) m ks On Wed, May 19, 2010 at 9:21 AM, Russell Christopher

Re: a default value for get-in?

2010-05-19 Thread Russell Christopher
Try #2, change the order of arguments to "get" using partial (defn get-in ([m ks] (get-in m ks nil)) ([m ks not-found] (letfn [(local-get-in [nf m ks] (get m ks nf))] (reduce (partial local-get-in not-found) m ks On Tue, May 18, 2010 at 5:23 PM, Meikel Brandmeyer wrote: > H

Re: a default value for get-in?

2010-05-18 Thread Russell Christopher
Although that would return the default for a key with a nil value. So you're probably right reduce would have to change. On Tue, May 18, 2010 at 3:49 PM, Russell Christopher < russell.christop...@gmail.com> wrote: > (defn get-in > ([m ks] > (reduce get m ks))

Re: a default value for get-in?

2010-05-18 Thread Russell Christopher
(defn get-in ([m ks] (reduce get m ks)) ([m ks not-found] (if-let [res (get-in m ks)] res not-found))) Longer but still uses reduce On Tue, May 18, 2010 at 12:20 PM, Stefan Kamphausen wrote: > Hi, > > On May 17, 9:34 pm, braver wrote: > > If get-in is to be consistent with get, i

Re: defrecord question

2010-04-30 Thread Russell Christopher
Why does this work? (defrecord R [k]) (extend-protocol P R (p [{:keys [k]}] k)) On Fri, Apr 30, 2010 at 2:52 PM, Sean Devlin wrote: > I think you have your destructuring backwards. > > You fn should probably be (fn [{k :keys}] k) > > For example, > > user=> ((fn [{k :keys}] k) {:keys "Awesome"})

Re: iterating over a nested vector

2010-04-09 Thread Russell Christopher
http://rosettacode.org/wiki/Matrix_transposition#Clojure Does anyone know if transpose exists in core or contrib? A cursory check doesn't reveal it, seems like it should be available. Thanks On Thu, Apr 8, 2010 at 10:27 PM, Per Vognsen wrote: > Or you can separate concerns a bit more: > > (def

Re: iterating over a nested vector

2010-04-08 Thread Russell Christopher
Another one using for (defn col-widths [arr] (for [i (range (count arr))] (apply max (map #(nth % i) arr On Thu, Apr 8, 2010 at 1:55 PM, John Sanda wrote: > Thanks for the explanation. I did see in the docs that the map function can > take multiple collections, but I guess I did not quite u

Re: eclipse/counterclockwise/maven question

2010-04-03 Thread Christopher Taylor
Hi, On 01.04.2010, at 20:00, Stuart Halloway wrote: > (2) When I import the project, the package explorer shows JRE System Library > J2SE 1.4. The Clojure REPL then bombs needing Java 1.5 features. I can edit > the project properties after the import, but shouldn't there be some way to > say t

Re: Parens again

2010-02-03 Thread Christopher Petrilli
On Wed, Feb 3, 2010 at 8:08 AM, Dan wrote: > Once a month, we get a proposal about how to remove the parens so that the > language would be more usable for newbies who are afraid of them. Invariably > this turns out into experienced clojure users telling that the parens aren't > a problem and that

Re: Alternate Javadocs?

2010-02-02 Thread Christopher Petrilli
On Tue, Feb 2, 2010 at 11:42 AM, Sean Devlin wrote: > As most of you know, Oracle is rapidly rebranding the sun website. > It's a matter of time before they get to the Javadocs.  Given the > following: > > 1.  Oracle doesn't play nice (putting it lightly) > 2.  Oracle documentation is the WORST on

create java class instance from type selected at runtime

2009-12-05 Thread Christopher Wicklein
;ve tried. Is this possible? Christopher Wicklein -- 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

Re: Is it possible to implement break or return in Lisp?

2009-11-04 Thread Christopher Wilson
On Tue, Nov 3, 2009 at 10:58 PM, rob wrote: > > I'm pretty sure there was an example of this using continuations in > Dybvig's book on Scheme.  I just flipped through it and didn't readily > find it, but I think that is where I saw it. You can do something like this (PLT Scheme): #lang scheme

Re: Why can't :let be first in a for

2009-10-26 Thread Christopher Taylor
Dear all, I've got a re-implementation of the for-macro sitting around here that removes this limitation (and others, the vector can't be empty either, if I remember correctly). The implementation also adds the sorting and grouping functionality described in Wadler and Jones' paper "comprehensive

Re: Is knowing Java a prerequisite for using Clojure?

2009-09-17 Thread Russell Christopher
In general I think the STM solution to most concurrency issues looks promising, however in the case of dining philosophers I found that Java locking was easier than a ref, atom or agent solution. ;; (import java.util.concurrent.locks.ReentrantReadWriteLock) (defn nth-chopstick [chopsticks i side]

Re: ClojureQL confusion: getting a hold of the results

2009-08-11 Thread Christopher Wilson
It looks like (speaking without having looked at the ClojureQL source) the results are being returned as a lazy sequence. In the first case the sequence isn't being realized but it is in the second. On Tue, Aug 11, 2009 at 2:15 PM, Maximilian Karasz wrote: > Hi, > > i've been wanting to play wit

Re: Package manager proposal

2009-08-07 Thread Christopher Wilson
+1 on ".car" here too. Plus, I imagine the icon to be a 1950's-era muscle car; a nod to Lisp's age. On Fri, Aug 7, 2009 at 8:13 AM, Justin Johnson wrote: >> car: "Clojure Archive"  (half-assed pun on Lisp's car, plus you can >> imagine the icon!) > > +1 > > > > -- Chris Wilson --~--~---

Re: Ant build.xml snippet: compile

2009-07-22 Thread Christopher Wilson
Sorry if this is a bit OT, but has anyone created an ant or maven jar task (maven: is 'goal' the correct term)? In the few jars that I've created I've AOT compiled my .clj files and hand-created the jar file. The way that I do this is compile to the default clojure "classes" directory, I then pull

Re: parsing program for nested parens and square brackets

2009-07-04 Thread Russell Christopher
(def matches {\( \) \[ \]}) (defn balanced? [s] (empty? (reduce #(if (= (matches (peek %1)) %2) (pop %1) (conj %1 %2)) [] s))) Learning Clojure. So far I'm really liking it. This is the first time I've tried anything outside of some REPL incantations from books, blogs, this list, etc thus it wo

Re: jar handling

2009-06-21 Thread Christopher Wilson
In Java 6 you can do a wildcard for jar files in a directory: java -cp /opt/jars/*:. clojure.main this will find all the jar files in /opt/jars/ and put them on the classpath. On Sun, Jun 21, 2009 at 9:10 PM, Wilson MacGyver wrote: > > Hi, > > Does clojure have any way to handle jar loading wit

Re: Weird Issue Reading Socket

2009-06-01 Thread Christopher Wilson
I don't know how relevant this is to what you're trying to do, but I've recently written something that sounds like what you're doing. My approach was to always send the size of the file (this involves sending chunks of a file around) to the server before sending the file. Since read() will block

Clojure and VisualVM

2009-05-28 Thread Christopher Wilson
I found an interesting article on Hacker News: http://news.ycombinator.com/item?id=631085 "The Best Kept Secret in the JDK: VisualVM" and the article here: http://java.dzone.com/articles/best-kept-secret-jdk-visualvm I fired it up and in no time at all, was profiling some clojure code. Definitely

Re: compilation and classpath

2009-05-22 Thread Christopher Wilson
You probably need to set (and create!) the correct compilation (output) directory. This defaults to a "classes" directory as a subdirectory of your current working directory. So if you had: test/main.clj you'd need classes/ also make sure that this directory is on your classpath. I think this

Speed up network transfers?

2009-05-15 Thread Christopher Wilson
Hi there, I'm working on a project that involves transferring large files over the network (100+MB) and wondering what would work better. I'm newer to Java than I am to lisp, so I've just grabbed the most obvious things from the API that I thought could possibly work: (ns misc-ports (:import (

Re: constructing maps

2009-05-04 Thread Christopher Taylor
Hi Nathan, On 04.05.2009, at 15:47, Nathan Hawkins wrote: > > On Mon, 4 May 2009 06:16:14 -0700 (PDT) > Drew Raines wrote: >> >> Whoops, that (seq) is a debugging artifact. You can remove that: >> >> (let [test-str "foo=1;bar=2;baz=3"] >> (reduce conj {} >> (map #(apply hash-map (.sp

Re: ANN: Full, continuously updated documentation for clojure.contrib

2009-05-03 Thread Christopher Taylor
Tom, thanks, that's great! I think it would be really useful if the overview appeared as a link on the contrib landing page. all the best, --Chris On 04.05.2009, at 08:41, Tom Faulhaber wrote: > > Hello everybody, > > As many of you know, I have been working on a "contrib autodoc robot" >

Re: Getting slime-edit-definition to work with Clojure

2009-04-29 Thread Christopher Wilson
Here's a .emacs snippet that works for me: ;; SLIME setup (clojure) (add-to-list 'load-path "~/.emacs.d/slime/") ; your SLIME directory (add-to-list 'load-path "~/.emacs.d/") ; clojure-mode.el is here (add-to-list 'load-path "~/.emacs.d/swank-clojure") ; swank-clojure directory (setq swank-cloju

Re: shortcut for for comprehension

2009-04-20 Thread Christopher Taylor
On 21.04.2009, at 00:19, Michael Hunger wrote: > > Is it possible to use :while to shortcut a for macro when a certain > number of yiels have happened? > > e.g. (for [x (range 1000) :when (= (rem x) 1) :while (number of > yields <= 10)] > > so i want only the first 10 results. you could: (d

Re: How do I setup Clojure REPL to automattically use some libraries?

2009-03-06 Thread Christopher
to get this to work, the directory within which your user.clj file resides needs to be on the CLASSPATH, not the file itself. Also, I made mine a pointer to a .cljrc file in my home directory so that I could keep all of my init code in a similar place/format. Thanks again for the help. Christoph

How do I setup Clojure REPL to automattically use some libraries?

2009-03-06 Thread Christopher
loads. Thanks for your in advance. Christopher --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send em

Re: how to emulate lisp's labels functionality?

2009-02-21 Thread Christopher Taylor
On 15.02.2009, at 06:26, Chouser wrote: > > On Sat, Feb 14, 2009 at 11:32 PM, GS wrote: >> >> On Feb 14, 12:21 pm, Chouser wrote: >>> >>> (defn count-instances [obj lsts] >>> (let [instances-in (fn thisfn [lst] >>> (if (seq lst) >>> (+ (if (= (fir

Re: how to learn clojure ?

2009-02-18 Thread Christopher
n Lisp into Clojure (http://blog.thinkrelevance.com/2008/9/16/pcl- clojure). I think all of those should keep you busy for quite sometime. Good luck, hope this helps. Christopher On Feb 18, 4:53 am, MarisO wrote: > All documentation I've seen about clojure assumes know

Re: Dauphin: mona lisa genetic algorithm in clojure

2009-01-26 Thread Christopher
imilar mistakes. Thanks, Christopher On Jan 26, 3:59 pm, bOR_ wrote: > Hope this isn't a double-post, but here is a nice example of a rewrite > of some reddit post on a genetic algorithm for generating the mona > lisa in clojure by Yann N. Dauphin > > http://npcontemplation.blogsp

<    1   2   3   4   >