Re: More Swing Examples

2009-02-14 Thread Sean
://code.google.com/p/clojure-contrib/ On Feb 14, 11:07 am, Sean francoisdev...@gmail.com wrote: Hi, I was trying to run this snake program, written by Mark Volkmann http://www.ociweb.com/mark/programming/ClojureSnake.html I'm getting the following error: Exception in thread main

Re: Clojure on CLR/DLR

2009-02-16 Thread Sean
David, You have a great idea here with porting clojure to the CLR. The .NET shops are just a popular as Java shops, and something like this could go a long way to improving software written by a lot of people. Your initiative and hard work are to be commended. How do you plan on solving the

Clojure Questions

2009-02-21 Thread Sean
Hi everyone, I'm working on cleaning up the wikibook some, and I've got a few questions. If anyone could answer, that would be a great help. What is the minimum required JVM version for clojure? What versions of Java have been tested? What versions of Java are supported? Thanks!

Database connection examples

2009-02-24 Thread Sean
Hi, I'm trying to connect to a MYSQL instance. I need a little help making the intellectual connection from Clojure to JDBC. Specifically, I was hoping someone could post/link to an working example. Bonus Points: Provide a second example for Postgres. Negative Points: Provide an example for

Flatten a list

2009-02-24 Thread Sean
I've got the following list (:a nil nil :b :a) I want to call a nil-killer function, and get the following list (:a :b :a) How do I go about this? Could someone post a quick example? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Flatten a list

2009-02-24 Thread Sean
Awesome! Thanks guys! On Feb 24, 10:42 pm, Timothy Pratley timothyprat...@gmail.com wrote: user= (remove nil? '(:a nil nil :b :a)) (:a :b :a) On Feb 25, 2:38 pm, Sean francoisdev...@gmail.com wrote: I've got the following list (:a nil nil :b :a) I want to call a nil-killer function

Re: Flatten a list

2009-02-24 Thread Sean
On Feb 24, 11:35 pm, David Sletten da...@bosatsu.net wrote: On Feb 24, 2009, at 6:07 PM, David Sletten wrote: (defn kill-nil    ([l] (kill-nil l '()))    ([l result] (cond (nil? l) (reverse result)                      (nil? (first l)) (recur (rest l) result)                      

Compojure File I/O

2009-03-05 Thread Sean
This is repeated from the compojure group. Hi, I'm developing an app that lets users upload files. I checked the docs and tests, and I didn't notice anything about uploading files. Is there a standard way of doing this in compojure, or do I need to interact with the java servlet directly?

Re: Clojure Cookbook

2009-03-09 Thread Sean
There's some in the wikibook http://en.wikibooks.org/wiki/Clojure_Programming/Examples/Cookbook Also http://en.wikibooks.org/wiki/Clojure_Programming/Examples I've been trying to tidy it up a little, and would love the help. Add you own stuff! Sean On Mar 9, 10:00 pm, David Sletten da

Re: filter1 interesting?

2009-03-15 Thread Sean
I would call it Obvious On Mar 15, 8:00 am, linh nguyenlinh.m...@gmail.com wrote: I like that, that makes the code selfdescribing (is there such a word in english?) On Mar 14, 2:58 pm, Craig Andera craig.and...@gmail.com wrote: What about overloading first to accept a predicate? (first

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Sean
: I'd love to see something built around very-high scalability, using NIO and thread pools and such. On Mon, Mar 16, 2009 at 7:40 PM, Sean francoisdev...@gmail.com wrote: I'm not sure if some of the design inputs make sense, specifically Spring and Hibernate. Point 1 - I've found

Unit Testing Macros

2009-03-17 Thread Sean
Hey everyone, I'm writing a macro library for myself, and I'm thinking about publishing it. Before I do so, I'd like to write run some unit tests for it. I was hoping the crowd could chime in on how they test macros. Any links examples would be great. Thanks!

Re: Unit Testing Macros

2009-03-18 Thread Sean
Thanks to everyone who replied. After looking at the examples a night's sleep, this makes sense. On Mar 18, 12:38 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Mar 17, 6:06 pm, Sean francoisdev...@gmail.com wrote:    I'm writing a macro library for myself, and I'm thinking about

Re: March 20th 2009 Rich Hickey Appreciation Day!

2009-03-21 Thread Sean
On Mar 20, 10:33 pm, Aaron Brooks aa...@brooks1.net wrote: Here, here! +1 +1 +1 ... !! Dear God man! This is wrong! (fact (fact (+ 1 1 1 ...))) On Fri, Mar 20, 2009 at 2:26 PM, Rayne disciplera...@gmail.com wrote: I Anthony Simpson, with the support of fellow Clojurists hereby

Re: contrib mmap/duck_streams for binary data

2009-03-22 Thread Sean
Could you throw this on github, so we can easily follow along with improvements? On Mar 22, 8:25 pm, zoglma...@gmail.com zoglma...@gmail.com wrote: While playing around and implementing straight up Humman compression, I wrote a handful of utilities to conveinently play with byte and bit

Proposed Change to str-utils

2009-03-23 Thread Sean
Hello Everyone, I've been reviewing the str-utils package, and I'd like to propose a few changes to the library. I've included the code at the bottom. USE MULTI-METHODS I'd like to propose re-writing the following methods to used multi- methods. Every single method will take an input called

Re: Proposed Change to str-utils

2009-03-23 Thread Sean
the original post in the README Long story short: multi-methods could be awesome Sean On Mar 23, 9:27 pm, David Nolen dnolen.li...@gmail.com wrote: Looks interesting and maybe even very useful. Why not put your code on Github or some other public repo of your liking. It's much nicer than pasting all

Re: Annotations and gen-class

2009-03-24 Thread Sean
Some working code would make it a lot easier to understand *exactly* what you're looking for. Do you think you could post a few quick methods on github? If memory serves, the reflections package should be a good place to start. However, you'd need to ask *why* you need this. If the answer is

Re: parallel iteration

2009-03-24 Thread Sean
@Rowdy Take the time to do the interleave example by hand. You'll it does exactly what you want in one pass. On Mar 24, 10:10 am, Rowdy Rednose rowdy.redn...@gmx.net wrote: Thanks guys, these solutions look much better already. But do I always have to have these 2 steps * merge collection

Re: Proposed Change to str-utils

2009-03-24 Thread Sean
then abstract the routines to work on any pattern of symbols, and give our macro writers a boost. Sean On Mar 24, 2:22 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: On Mar 23, 9:46 pm, Sean francoisdev...@gmail.com wrote: http://github.com/francoisdevlin/clojure-str-utils-proposal/tree

Re: Proposed Change to str-utils

2009-03-25 Thread Sean
. Pooling our efforts to create a high performance version of the code does add value beyond a simple wrapper. A *fast*, tested and slick string library is even better than a tested and slick string library. Sean On Mar 25, 3:08 pm, Perry Trolard trol...@gmail.com wrote: Whatever it's worth

Re: Setting up Clojure on OS X

2009-03-30 Thread Sean
Mark, This is a great writeup on installing clojure. As an OSX nerd, my main problem is getting an editor up and running. Maybe you could add a section on setting up an editor? I know the wiki was a good place to start. On Mar 30, 7:02 am, Mark Reid mark.r...@gmail.com wrote: Hi, I've just

Re: Please suggest a way to learn just enough Java for Clojure

2009-03-30 Thread Sean
There is a pair of java books I cut my teeth on, an I would recommend them to anyone. Core Java Volumes I II, by Horstman and Cornell. Amazing reference, two of the best technical books I've ever read. Cover usage, gives code examples, and a tremendous amount of history theory (for their

doseq vs. map

2009-04-02 Thread Sean
? Sean --~--~-~--~~~---~--~~ 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 email to clojure+unsubscr...@googlegroups.com

Re: doseq vs. map

2009-04-02 Thread Sean
Thanks for the response everyone! I was able to get it working. If I understand what everyone is saying, the following statement is true: In Clojure, laziness is the rule not the exception. On Apr 2, 10:29 pm, Matt Revelle mreve...@gmail.com wrote: Were you in #clojure earlier?  This came

Array of primitives

2009-04-02 Thread Sean
I'm working with AWT, and there is a method that requires a float[] (The java.awt.BasicStroke constructor). Is it possible to directly create an array of primitives directly in Clojure, or do I need to create a utility class in Java? --~--~-~--~~~---~--~~ You

Re: A large Clojure deployment

2009-04-07 Thread Sean
Okay wow... it'll take some time to fully appreciate this. Can you comment on your hardware stack? How many servers are you using? Is there an RDBMS in there somewhere? How was deployment? Looks awesome, thanks for sharing! On Apr 7, 10:41 am, Stuart Sierra the.stuart.sie...@gmail.com

Re: ATTN contrib authors: Automatic documentation for clojure.contib

2009-04-14 Thread Sean
This feature would be very useful, as I know I spend too much time in re-implementing stuff that exists in contrib. However, contrib isn't the only library that needs to be documented. Besides the doc-string metadata, is there any type of Clojure-doc, similar to Java-doc? Is there utility to

Re: soft question: should remote channels appear like local channels

2014-01-30 Thread sean
? Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org World Singles, LLC - http://worldsingles.com From: t x Sent: ‎Thursday‎, ‎January‎ ‎30‎, ‎2014 ‎9‎:‎43‎ ‎PM To: clojure@googlegroups.com Hi, With apologies for a soft question: This question is NOT: I'm

cond- variant?

2014-02-11 Thread sean
screams for something like: (condp- accounts empty? (conj “stuff”)) Then you could thread the predicates: (condp- a p1 (f1 args) p2 (f2 args)) which would be: (let [x (if (p1 a) (f1 a args) a)] (if (p2 x) (f2 x args) x)) Suggestions? Sean Corfield -- (904) 302-SEAN

Atomic execution of a SELECT and UPDATE

2010-07-12 Thread Sean
my head around the best way to do this. Any thoughts or pointers? Help would be very much appreciated. Thanks! Sean -- 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

REPL

2010-09-08 Thread Sean
Hi, I'm new to Clojure. This is also my first time posting here. When I use REPL and print something out, I always get a nil printed. For example, (print Clojure), I got: clojurenil. Where does the nil come from? Thanks a lot! -- You received this message because you are subscribed to the

RE: [ANN] Clojure 1.9.0-alpha5

2016-06-07 Thread sean
Thanks Alex. Based on what crossclj.info shows, I suspect you may be right that almost no one cares  https://crossclj.info/fun/clojure.core.incubator/seqable?.html Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Alex Miller -- You received this message

RE: [ANN] Clojure 1.9.0-alpha5

2016-06-07 Thread sean
As a completely non-scientific data point, we had precisely one place in our 30k+ lines of code where we can use bigdec? And there is also precisely one place we could use biginteger?  Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Alex Miller -- You

RE: [ANN] Clojure 1.9.0-alpha1

2016-05-25 Thread sean
-info “SpecFailure” (s/explain-data spec arg) Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Mark Engelberg -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email

RE: [ClojureScript] Re: clojure.spec

2016-05-29 Thread sean
Is it likely that we’ll see a common clojure.spec implementation in .cljc files rather than separate .clj / .cljs files? Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: David Nolen -- You received this message because you are subscribed to the Google Groups

RE: clojure.spec

2016-05-24 Thread sean
OK, that explains a lot. Thank you. That needs to be clarified on the web page I think… Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Alex Miller -- You received this message because you are subscribed to the Google Groups "Clojure" grou

RE: clojure.spec

2016-05-23 Thread sean
it be easier to just allow un-namespaced keywords here? Or is there some aspect of the namespacing here that I’m missing? Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Rich Hickey -- You received this message because you are subscribed to the Google Groups

RE: Thoughts on clojure.spec

2016-07-18 Thread sean
correctly rather than trying to establish that they _behave_ correctly oddly compelling, now that I’ve had some time to think about it and play with it  Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Beau Fabry -- You received this message because you

RE: can clojure java.jdbc function 'result-set-seq' add option to supportcustom 'result-set-read-column' ?

2016-08-06 Thread sean
? http://dev.clojure.org/jira/browse/JDBC Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Xiangtao Zhou -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroup

RE: can clojure java.jdbc function 'result-set-seq' add option tosupportcustom 'result-set-read-column' ?

2016-08-07 Thread sean
Thank you! I’ll take a look at this while I’m back at work this week. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Xiangtao Zhou -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

RE: [ANN] clojure-future-spec, a backport of clojure.spec for 1.8

2016-06-30 Thread sean
I can’t help but think you’re making it way more complicated than it needs to be. Define ::config in example.spec, and in example.core use :example.spec/config (and, yes, require the example.spec namespace). You need to avoid circular namespace dependencies. Sean Corfield -- (904) 302-SEAN

RE: [ANN] Clojure 1.9.0-alpha11

2016-08-19 Thread sean
that failed the spec. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Rangel Spasov -- 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: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-20 Thread sean
, full of special cases, warts, and surprising behavior. I wouldn’t wish that on any sane developer. Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org From: Brian Marick -- You received this message because you are subscribed to the Google Groups "Clojure" grou

RE: No "clojure --version" switch

2019-05-07 Thread sean
t;}user=> Given that, I think that a –version option on clojure would be misleading since it is not reporting the version of the clojure / clj scripts. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEANAn Architect's View -- http://corfield.org/"If you're not annoying somebody, you're not r

RE: results from sort-by are not sorted

2019-05-05 Thread sean
…) so you the keyfn pulls the value corresponding to :age out of the hash maps. That will produce 3 from {:age 3, :name “luo”} and 1 from {:age 1, :name “sheng”} so they will sort appropriately. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEANAn Architect's View -- http://corfield.org/"If y

RE: Re: [ANN] Cognitect Labs' aws-api 0.8.345

2019-07-06 Thread sean
That’s new in Clojure 1.10. I thought Cognitect AWS stuff required 1.10 from the get-go but I assume you had it working on 1.9? Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEANAn Architect's View -- http://corfield.org/"If you're not annoying somebody, you're not really alive."-- Marga

Re: ATTN contrib authors: Automatic documentation for clojure.contib

2009-04-15 Thread Sean Devlin
to the problem. On Apr 14, 5:59 pm, Tom Faulhaber tomfaulha...@gmail.com wrote: Jason, Thanks for the offer. I may take you up on it as I get this into production such as it is. Sean, Nothing that I found in contrib (but who knows, there's no documentation :-)). Rich posted some code (which I'm

Re: Possible contrib contribution: clojure.contrib.timing

2009-04-15 Thread Sean Devlin
Start by putting your code on github or something similar :) On Apr 14, 8:01 pm, Chris ccons...@gmail.com wrote: While playing around with clojure I've found the (time ...) macro isn't as powerful as I'd like.  To fix this I made a timing library to help me figure out where all my runtime is

Oracle and Clojure

2009-04-20 Thread Sean Devlin
Okay, I'm willing to bet this crowd has already seen this: http://www.sun.com/third-party/global/oracle/index.jsp Any thoughts on how this affects Clojure? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure

Re: Oracle and Clojure

2009-04-20 Thread Sean Devlin
at 9:13 AM, Sean Devlin francoisdev...@gmail.com wrote: Okay, I'm willing to bet this crowd has already seen this: http://www.sun.com/third-party/global/oracle/index.jsp Any thoughts on how this affects Clojure? No effect. -- blog: whydoeseverythingsuck.com

Re: Oracle and Clojure

2009-04-21 Thread Sean Devlin
Thanks to *everyone* for responding! I can see that I was over reacting yesterday. Time for me to stop worrying and get back to coding. Sean On Apr 21, 2:05 am, Adrian Cuthbertson adrian.cuthbert...@gmail.com wrote: There are some precedents - the acquisition of SleepyCat (berkeley db, et

Google announcement, version 1.0 SCM Holy War (not really)

2009-04-24 Thread Sean Devlin
There recently was a ton of traffic about SCM in the Path to 1.0 thread. Google made the following announcement: http://google-code-updates.blogspot.com/2009/04/mercurial-support-for-project-hosting.html Does this make changing the SCM tool to Hg a real possibility? While this might not be

Re: Clojure 1.0

2009-05-04 Thread Sean Devlin
Thank you and congrats! On May 4, 9:46 am, AlamedaMike amino.metr...@gmail.com wrote: | Congratulations, Rich! And thanks for all your hard work. Having a 1.0 | release out to help adoption in the workplace environments that we | need to get into. Indeed, this is the case where I work. Having

Clojure, SAP and JCo

2009-05-04 Thread Sean Devlin
Hi, Has anyone else here been using Clojure to interact with SAP? Or, are there any JCo experts in the house? Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Help: Java code works, Clojure code doesn't

2009-05-05 Thread Sean Devlin
java.lang.NoClassDefFoundError: com/sap/jdsr/ writer/DsrIPassport (NO_SOURCE_FILE:0) The SAP library I'm using does rely on some native methods. The only guess I have right now is that the native methods are being linked to properly. Can anyone give me a hand? Sean

Re: Help: Java code works, Clojure code doesn't

2009-05-05 Thread Sean Devlin
to include everything you need in the classpath the the invoked JVM, for example: java -classpath my-jar-file-containing-DsrlPassport.jar;clojure.jar clojure.main On 5 May, 15:54, Sean Devlin francoisdev...@gmail.com wrote: Okay, I've got code that works in Java but I can't get working

Re: Help: Java code works, Clojure code doesn't

2009-05-05 Thread Sean Devlin
from the repl... (TutorialConnect1.) That might highlight the problem - your java stack strace might give some clues. It does sound like a classpath problem of some sort. Rgds, Adrian. On Tue, May 5, 2009 at 6:04 PM, Sean Devlin francoisdev...@gmail.com wrote: That's a really good point

RESOLVED: Java code works, Clojure code doesn't

2009-05-05 Thread Sean Devlin
Yeah, it was a classpath error. I had to create the following dummy object: com.sap.jdsr.writer.DsrIPassport Once I did that and added it to the classpath, I was golden. Turns out this is a known error with SAP JCo Thanks everyone! On May 5, 1:49 pm, Sean Devlin francoisdev...@gmail.com

Re: Add JNDI lookup support for contrib/sql

2009-05-09 Thread Sean Devlin
+1 On May 9, 2:33 am, Mark Derricutt m...@talios.com wrote: Hi, Can we add the following to contrib's sql namespace, it simply adds jndi as a db-spec scheme ( I also raised this ashttp://code.google.com/p/clojure-contrib/issues/detail?id=39, which google decided to set as a defect and I

Re: Designing an SQL-based application

2009-05-11 Thread Sean Devlin
if it's a good fit for your application. Sean On May 11, 4:05 am, Janico Greifenberg jgre...@googlemail.com wrote: Hi, I'm writing an RSS-reader using compojure and clojure.contrib.sql. As this is my first project in a functional language, I'm not sure about how to design the application

Re: Designing an SQL-based application

2009-05-11 Thread Sean Devlin
can save those for another day :) On May 11, 12:04 pm, Victor Rodriguez vict...@gmail.com wrote: On Mon, May 11, 2009 at 11:32 AM, Sean Devlin francoisdev...@gmail.com wrote: Here are my thoughts on the three approaches: Approach #1:  This seems the most straightforward.  I'd write

Re: Macros applied to entire programs

2009-05-11 Thread Sean Devlin
answer how with respect to Clojure. Sean On May 11, 11:42 pm, Mark Reid mark.r...@gmail.com wrote: Hi, I'm quite new to macros so forgive me if this is a naïve question, but is it possible to write macros that are applied to an entire Clojure program? The reason I ask is that, in other threads

Re: Macros applied to entire programs

2009-05-12 Thread Sean Devlin
of subtle cases that make it very difficult do to this job. The biggest issue I see is that you could accidently apply a macro that creates MORE work for the JVM. So I'd recommend doing something for the easy cases, and let the JVM do its job for everything else. Sean On May 12, 7:12 am, Paul

str-utils change proposal, round 2

2009-05-13 Thread Sean Devlin
Is Awesome) = Clojure (str-drop #\s+ Clojure Is Awesome) = Is Awesome You can check the tests and README.html for more usage. I'm looking for feedback. If anyone else has string functions that I haven't covered, let me know. Thanks, Sean --~--~-~--~~~---~--~~ You

Re: str-utils change proposal, round 2

2009-05-14 Thread Sean Devlin
:12 AM, Sean Devlin francoisdev...@gmail.com wrote: Hello again everyone, I've added a few new routines to a string library I've been working on.  I mentioned it about a month ago, as a proposed change to str- utils. Original Thread: http://groups.google.com/group/clojure/browse_thread

Re: str-utils change proposal, round 2

2009-05-14 Thread Sean Devlin
-take/drop were part of a standard library, would you be more likely to write about them in your book :-p (Excellent work, btw! Can't wait for print version!) Happy Hacking. Sean On May 14, 9:14 am, Stuart Halloway stuart.hallo...@gmail.com wrote: FYI: I am working on an open-source CSV parser

Re: str-utils change proposal, round 2

2009-05-14 Thread Sean Devlin
Hmmm... it sounds like there would be use for a string table utils or something like that. On May 14, 11:12 am, Daniel Lyons fus...@storytotell.org wrote: On May 14, 2009, at 7:14 AM, Stuart Halloway wrote: FYI: I am working on an open-source CSV parser in Clojure. Splitting on

Re: lazy-cat

2009-05-16 Thread Sean Devlin
Clearly you are all dog people. Lazy cat is redundant. On May 16, 3:55 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 16.05.2009 um 21:48 schrieb George Jahad: I can't come up with  a reason to use lazy-cat over concat.  Is it just around for backwards compatibility, or am I missing

Re: lazy-cat

2009-05-16 Thread Sean Devlin
I'm sorry, it's an Americanism. By Dog People, I meant someone that prefers a dog as a pet, not a cat. It was meant as a joke. You're right, I should be more considerate of the international audience, and careful to make my tone more clear. Thank you for speaking up. Sean On May 16, 4:13 pm

Re: lazy-cat

2009-05-16 Thread Sean Devlin
I was making a joke about housecats. Maybe I should file a bug report saying cat should default to being lazy :) Again, sorry for the confusion. On May 16, 4:34 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 16.05.2009 um 21:58 schrieb Sean Devlin: Lazy cat is redundant. concat

Re: Clojure at JavaOne

2009-05-21 Thread Sean Devlin
The duck streams library should give some examples the Java crowd will be ready to appreciate. That, or maybe use the with-open macro. My $.02 On May 21, 7:42 am, Rich Hickey richhic...@gmail.com wrote: On May 21, 3:39 am, mikel mev...@mac.com wrote: On May 18, 7:36 am, Rich Hickey

some vs. every?

2009-05-26 Thread Sean Devlin
I just noticed a quirk in the core API. The some and every? functions have different naming conventions. Is there a reason for this? If not I think renaming/creating an alias some? would be very helpful. --~--~-~--~~~---~--~~ You received this message because

Re: some vs. every?

2009-05-26 Thread Sean Devlin
On May 26, 9:02 am, Sean Devlin francoisdev...@gmail.com wrote: I just noticed a quirk in the core API.  The some and every? functions have different naming conventions.  Is there a reason for this?  If not I think renaming/creating an alias some? would be very helpful

Re: quote vs quasiquote

2009-05-26 Thread Sean Devlin
I would lead the desired term with ~' For example: `(+ 1 2) = (clojure.core/+ 1 2) `(~'+ 1 2) = (+ 1 2) This is very useful when defining a function in a macro On May 26, 2:30 pm, kyle smith the1physic...@gmail.com wrote: user (def nums '(1 2 3)) #'user/nums user (def funs '((+ (1 2 3))

Re: Macro Writing Helper?

2009-05-28 Thread Sean Devlin
Okay, this looks a lot like the ruby yeild statement. Is that what inspired you? On May 28, 12:50 pm, CuppoJava patrickli_2...@hotmail.com wrote: That's unfortunate. It would have made matters much easier for me. The macro I'm attempting to write is: (defblockfn my_block_fn [arg1 arg2

Re: Macro Writing Helper?

2009-05-28 Thread Sean Devlin
} You have much more control of the function. The main point I'm getting at is that I don't think the blockfn macro approach is the way to go. Either write a function that take functions, or use a traditional macro. Hope this helps. Sean On May 28, 1:37 pm, CuppoJava patrickli_2...@hotmail.com

Re: Macro Writing Helper?

2009-05-28 Thread Sean Devlin
On May 28, 3:10 pm, CuppoJava patrickli_2...@hotmail.com wrote: Thank you Meikel for going to the trouble of writing out the full macro. It's going to take me a while to decipher it, and hopefully grasp some understanding at the end of it. I find defblockfn very useful for functions that

Re: Macro Writing Helper?

2009-05-28 Thread Sean Devlin
Okay, good to know. It's interesting to see other approaches. It's how we collectively get better. My $.02: (with_file myfile.txt #(write asdf) (close)) Sean On May 28, 3:23 pm, CuppoJava patrickli_2...@hotmail.com wrote: It's useful in all the cases where a blocks are useful

Re: Macro Writing Helper?

2009-05-28 Thread Sean Devlin
That's true. Good job Meikel, macro master! On May 28, 3:31 pm, CuppoJava patrickli_2...@hotmail.com wrote: Correction: By My macro I, of course, mean Meikel's macro since you're the one that actually got it working. Have to give credit where it's due. =)

Programming Clojure Arrives!

2009-05-28 Thread Sean Devlin
I just got my copy of Programming Clojure in the mail today. This is the only time I expect to see the book in pristine condition, as I know it will get bookmarked, highlighted, and well used in a hurry. Congratulations Stuart! --~--~-~--~~~---~--~~ You received

Re: The thread ring problem

2009-05-29 Thread Sean Devlin
Would type hints help at all? On May 29, 11:40 am, Laurent PETIT laurent.pe...@gmail.com wrote: Hi, Here is my attempt, for the real benchmark test, it has an honorable result of 62 sec. (if there is no flaw in my algorithm, of course). ;; file shootout/ring.clj (ns shootout.ring  

Feedback on clipboard library

2009-06-01 Thread Sean Devlin
Hello Everyone, I've created a library for interacting with the clipboard. It's a wrapper for the AWT clipboard library.You can find it here: http://github.com/francoisdevlin/devlinsf-clojure-utils/tree/master *Note - I changed the location of my string library for anyone following that.

Re: feature request: docstring for defstruct

2009-06-02 Thread Sean Devlin
This would encourage documenting structs, so I think this is a good idea. Sean On Jun 2, 11:31 am, Stuart Halloway stuart.hallo...@gmail.com wrote: I would like to see defstruct take an optional docstring. Would such a   patch be welcome? Stu

Re: What's the function that checks if an object is sequence-able?

2009-06-03 Thread Sean Devlin
I don't know either, but you can use the following work around (defn my-seq[object] (instance? clojure.lang.Seqable object)) (my-seq []) =true (my-seq {}) =true (my-seq #{}) =true (my-seq '()) =true (my-seq :a) = false (my-seq 'a-symbol) = false Still, it would be nice to know the right way

Re: Macro Writing Helper?

2009-06-03 Thread Sean Devlin
Could you throw together some live examples and unit tests? On Jun 3, 1:10 pm, CuppoJava patrickli_2...@hotmail.com wrote: In case anybody else found defblockfn useful, here's the final version. The original didn't work when you used destructuring in the argument list of the function. (defn

Re: Where does the language end and the libraries begin?

2009-06-04 Thread Sean Devlin
There was this language wiritten in '58 that can do just that. It's called LISP. Here's Paul Grahams paper on eval: http://lib.store.yahoo.net/lib/paulgraham/jmc.ps Get to the part where he defines eval, and let your brain stay on that for a while. You'll see WHY macros work, and never ever

Re: defnk addition to c.c.def

2009-06-04 Thread Sean Devlin
Gut gemacht! Absolutely amazing Meikel. Now get some well earned sleep. Sean On Jun 4, 6:22 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi again, Am 05.06.2009 um 00:06 schrieb Meikel Brandmeyer: The docstring is a bit contorted but I'm too sleepy now, to get that right

Re: defnk addition to c.c.def

2009-06-05 Thread Sean Devlin
) nil) true (recur next-x (inc iter-count))) So it's paying off already! On Jun 4, 7:02 pm, Stephen C. Gilardi squee...@mac.com wrote: On Jun 4, 2009, at 6:54 PM, Sean Devlin wrote: Gut gemacht! Absolutely amazing Meikel.  Now get some well earned sleep. Sean I

Re: Where is group by?

2009-06-05 Thread Sean Devlin
Okay, found it. clojure.contrib.seq-utils On Jun 5, 10:15 am, Sean Devlin francoisdev...@gmail.com wrote: Okay, I may be going nuts here.  I can seem to find the group by function anymore.  Where is it? --~--~-~--~~~---~--~~ You received this message because

Re: Where is group by?

2009-06-05 Thread Sean Devlin
For those of you that may have the same problem in the future, check the index: http://code.google.com/p/clojure-contrib/wiki/ApiDocIndex Great work. On Jun 5, 10:25 am, Sean Devlin francoisdev...@gmail.com wrote: Okay, found it. clojure.contrib.seq-utils On Jun 5, 10:15 am, Sean Devlin

Re: Optimizing cross-product mappings

2009-06-05 Thread Sean Devlin
Try adding type hints. Assuming all-zips returns a list of strings: (defn all-zips-MD5 [] Returns a lazy list of all possible American zipcodes, as MD5 digests. (let [digester (java.security.MessageDigest/getInstance MD5)] (map (fn [#^java.util.String to-digest] (.update

Re: Optimizing cross-product mappings

2009-06-05 Thread Sean Devlin
On Jun 5, 11:14 am, Daniel Lyons fus...@storytotell.org wrote: On Jun 5, 2009, at 8:56 AM, Daniel Jomphe wrote: I need to generate a list of all possible American zipcodes, MD5- digested. Later on, I will need to do much more involving stuff, processor-wize, with this. But already,

Re: Optimizing cross-product mappings

2009-06-05 Thread Sean Devlin
Sounds like a candidate for the daily WTF... On Jun 5, 12:54 pm, Daniel Jomphe danieljom...@gmail.com wrote: You guessed mostly right, Daniel :) This guy hashed some fields of his client's database, replacing the original content with its hashed version. I don't know everything, but he at

Re: Threadring Benchmark

2009-06-06 Thread Sean Devlin
(Such and such is % better...). Would you be able to share absolute times as well? I'm just curious at this point. Sean On Jun 6, 12:41 am, Parth Malwankar parth.malwan...@gmail.com wrote: Hello, In order to understand the agent model of Clojure better I wrote the alioth shootout threadring benchmark [1]. I

Spam in file section

2009-06-08 Thread Sean Devlin
Not quite sure what the right way to report this is. There seems to be some spam in the file report. The Mathis-Oberg- Insulating_Guide.pdf seems to be out of place. My apologies if this is a false positive. --~--~-~--~~~---~--~~ You received this message

Re: Thoughts on bags?

2009-06-08 Thread Sean Devlin
I think I know what you mean by a bag, but I'm not quite sure. How does a bag compare to a set, vector and/or list? On Jun 9, 1:31 am, Richard Newman holyg...@gmail.com wrote: The relational operations work on sets. That's often useful, but there   are situations in which preserving

Monad problem in c.c svn 926

2009-06-09 Thread Sean Devlin
. Sean --~--~-~--~~~---~--~~ 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: You know you've been writing too much Clojure when...

2009-06-09 Thread Sean Devlin
You're writing an email and ;Rich Hickey is a no good... comment out a line instead of deleting it :) (Fortunately I caught this before I hit send) On Jun 4, 8:48 am, BrianS bstephen...@enclojure.org wrote: You see a license plate in front of you DEFN1A3F and you wonder what the function

Re: Monad problem in c.c svn 926

2009-06-10 Thread Sean Devlin
Hmmm... I just tested this in Enclojure. use works fine there. Still doesn't work on my Aquamacs/SLIME setup. I'll check my config. On Jun 10, 2:14 am, Konrad Hinsen konrad.hin...@laposte.net wrote: On 09.06.2009, at 23:48, Sean Devlin wrote: I was trying to play with the monad facility

  1   2   3   4   5   6   7   8   9   10   >