Need help with recursion!

2013-10-24 Thread Wilson
I am supposed to make my own filter function without using "remove". I have this made, but it is not working like it should be working. I don't have any idea what is wrong with it. Please help me out. For example, if I give the function the parameters odd? and [1 2 3 4]. It only returns (1), but

Re: Need help with recursion!

2013-10-24 Thread Wilson
Thank you both for your help! That was so quick! Jeb's solution worked like a charm, and now I can finally advance to the next exercise. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.co

Slime buffer ns is always user

2009-01-07 Thread Zak Wilson
I'm using the latest Slime, swank-clojure and Clojure, with a fix from Chousuke to start up the REPL properly. I have no problem setting the namespace in the REPL, but anything I eval directly from a file (i.e. with C-x C-e) gets evaluated in the user ns. The ns in the *inferior-lisp* buffer rema

Re: Slime buffer ns is always user

2009-01-07 Thread Zak Wilson
> First, compile the buffer with C-c > C-k. Then, evaluate new definitions in the same source file and they > will be evaluated in the correct namespace (regardless of what > namespace is active in the repl). That's what I expected, but it doesn't work; new definitions are evaluated in user. It s

Re: Slime buffer ns is always user

2009-01-08 Thread Zak Wilson
Thanks for your help with this problem, Bill. The function you provided causes slime-repl-set-package to suggest the correct namespace, which is convenient. It doesn't appear to have any effect on my problem though. --~--~-~--~~~---~--~~ You received this message b

Re: Slime buffer ns is always user

2009-01-08 Thread Zak Wilson
Everything is fully up to date. The test works. Setting the ns with (ns test) works, but if I use a more complex ns form like (ns test (:use clojure.xml)), it fails to set the ns. As a workaround, (in-ns test) after the ns definition seems to work. Unless there's some reason not to, I'll just do

Re: Slime buffer ns is always user

2009-01-09 Thread Zak Wilson
I tested your patch with several more complicated namespace forms and they all worked. Thanks for the fix! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@

Re: when performance matters

2009-01-12 Thread Zak Wilson
Lisps are not inherently slow. SBCL, Clojure and several Schemes are all much faster than most popular high-level languages (e.g. Python, Perl, Ruby...) while being at least as high-level. Optimized code in SBCL may only be marginally slower than C when type declarations are used properly. The co

Re: when performance matters

2009-01-12 Thread Zak Wilson
You're probably thinking of this: http://www.flownet.com/gat/papers/lisp-java.pdf There's also the (in)famous language benchmark site: http://shootout.alioth.debian.org/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Binding values in a list of symbols and evaluating as code

2009-01-23 Thread Zak Wilson
I'm trying my hand at genetic programming. (Full post about why and how, with code coming soon - I promise.) My current technique uses a genetic algorithm to generate a list of symbols, numbers and other lists of the same form. The head is the name of any of several functions. I'm trying to figure

Re: function that takes primitives?

2009-01-23 Thread Zak Wilson
If a speed boost is what you're going for, you can probably get one from type coercion and (if you're not worried about overflow) unchecked-math. As an example: (defn step [x0, y0, xn, yn] (let [dx0 (double x0) dy0 (double y0) dxn (double xn) dyn (double yn)

Re: Binding values in a list of symbols and evaluating as code

2009-01-23 Thread Zak Wilson
It does seem like a legitimate use for eval, at least at first glance. The biggest problem is that using eval this way is really slow when each rule is being tested on hundreds of inputs. Interesting alternative, Konrad. I can probably take advantage of the fact that all of the functions I'm call

Re: Binding values in a list of symbols and evaluating as code

2009-01-23 Thread Zak Wilson
Kevin, I don't know how I managed to not think of that, but it's exactly what I was looking for. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegro

Re: Binding values in a list of symbols and evaluating as code

2009-01-23 Thread Zak Wilson
And it's now working perfectly, producing a new generation every second. Now I actually have to tweak it to produce good results. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group,

Re: Binding values in a list of symbols and evaluating as code

2009-01-24 Thread Zak Wilson
So as it turns out, I was mistaken about it working. I had something that ran, but the results were nonsense. What I'm trying now looks like this: (defmacro rulefn [r] (let [er (eval r)] `(fn [devid# raveid#] (binding [device-id devid# rave-id raveid#] ~er

Re: Binding values in a list of symbols and evaluating as code

2009-01-24 Thread Zak Wilson
Correction: it's (let [x '(+ (* 1024 device-id) rave-id)) rfn (rulefn x)] ...) that fails with "Can't eval locals". --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, s

Re: Binding values in a list of symbols and evaluating as code

2009-01-24 Thread Zak Wilson
Thanks, Christophe. It works now, and it's fast. Unfortunately, now I've run in to Nathan's problem. After a few thousand generations, resulting in the creation of about half a million functions it was using over a gig of memory and died with an OutOfMemoryError. While let-eval is cool, using it

Re: Binding values in a list of symbols and evaluating as code

2009-01-25 Thread Zak Wilson
I think using eval is generally considered an antipattern. It's generally slow, and it's easy to make confusing code with it. Phlex - thanks for the suggestion. I may give that a try. Rich - thanks for the fix. I'm trying it now. It looks like it's not experiencing any permanent growth, though i

Re: Support for disabling forms (reader macro similar to CL's #-(and))

2009-01-25 Thread Zak Wilson
Clojure has that in the comment form: (comment (do (not (eval this --~--~-~--~~~---~--~~ 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

Re: CLJOS -> Spinoza, 3X faster than struct-map ;)

2009-02-02 Thread Zak Wilson
In your example, why are you using struct-map to create your structs instead of just using struct? (struct rect-struct ::rect [50 50] 100 190) produces the same struct, but is about three times faster than using struct-map. (time (dotimes [x 100] (struct-map rect-struct :tag ::rect

Re: Stupid Java questions

2009-02-03 Thread Zak Wilson
I had similar results when I compiled jsr166y myself. There's a jar in the group's files that is known to work. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clo

Re: Possible bug in preduce

2009-02-04 Thread Zak Wilson
I got a 50% speedup using psort instead of sort with a compute- intensive comparator and a 100 element sequence on a dual-core machine. That said, I found a faster way to do it: I separated the intensive calculations from the comparator - just returning a numeric value. I used pmap to get a seque

Re: Stupid Java questions

2009-02-04 Thread Zak Wilson
The namespace is correct on clojure.org/api, but there it doesn't mention that it has a dependency that isn't included with Clojure. Clojure has been evolving very quickly, and sometimes the website doesn't keep up. It might be nice if somebody could take charge of making sure the site is up to d

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: La Clojure plugin for IntelliJ IDEA updated

2009-05-13 Thread Wilson MacGyver
congrats, I just started exploring clojure and I've found "La Clojure" to be a very valuable tool. On Wed, May 13, 2009 at 2:16 PM, Ilya Sergey wrote: > Hello, all. > > I'm happy to announce, that new build of the `La Clojure' plugin for > IntelliJ IDEA is uploaded into repository and may be dow

Re: str-utils change proposal, round 2

2009-05-14 Thread Wilson MacGyver
would you consider adding support of a split by passing a delimiter? since parsing csv/tsv is a pretty common task. I know it can be done by using re-split. but it seems to occur common enough that it's not a bad idea. On Thu, May 14, 2009 at 1:12 AM, Sean Devlin wrote: > > Hello again everyone

Re: str-utils change proposal, round 2

2009-05-14 Thread Wilson MacGyver
manipulated > appropriately.  You cold even do something like this: > > (re-split input-string '({:pattern #"[\r\n]" :offset 1} #",")) > > And it would drop the first line, as this is usually header > information. > > Could you give me an example of what

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: compilation and classpath

2009-05-22 Thread Christopher Wilson
No such file or directory (main.clj:1).  What > do I need to do to get compilation to work? > > > > -- Chris Wilson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Clojure and VisualVM

2009-05-28 Thread Christopher Wilson
ojure code. Definitely worth a look. -- Chris Wilson --~--~-~--~~~---~--~~ 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, se

Re: Weird Issue Reading Socket

2009-06-01 Thread Christopher Wilson
> calling getInputStream repeatedly on the socket. I think more >> typically the socket connnection is established, input and output >> streams are obtained one time only, then the streams are used as >> needed for the duration of the connection. > > > -- Chris Wilson --~

filter on sequence

2009-06-02 Thread Wilson MacGyver
Apologies in advance on a very newbie question. I've constructed a sequence (take 10 (iterate (fn [[a b]] [(* 2 a) (/ a (Math/log a))]) [2 (/ 2 (Math/log 2))]) doing a take 10 on it, produce the pairs I expect. what I like to know is, how do I filter for with value b is < X for example, the f

Re: filter on sequence

2009-06-02 Thread Wilson MacGyver
ah, got it. thanks! On Tue, Jun 2, 2009 at 11:48 AM, Stephen C. Gilardi wrote: > > On Jun 2, 2009, at 11:35 AM, Wilson MacGyver wrote: > >> what I like to know is, how do I filter for with value b is < X > > > You can use destructuring in your predicate's arg li

Re: filter on sequence

2009-06-02 Thread Wilson MacGyver
actually I had the exact same reaction. So I'd echo Andrew's comment. Is this different than pattern-matching in say haskell/scala? On Tue, Jun 2, 2009 at 11:55 AM, Andrew Wagner wrote: >> You can use destructuring in your predicate's arg list: >> > >  Not to hijack the thread but...is there som

Re: filter on sequence

2009-06-02 Thread Wilson MacGyver
I saw that clojure has loop. But in other functional languages, using loops are always discouraged. So I didn't know if loop was the "clojure" idiomatic way of doing this. On Tue, Jun 2, 2009 at 11:52 AM, Konrad Hinsen wrote: >> My first reaction was to do it using a sequence. Is this the clojur

Re: filter on sequence

2009-06-02 Thread Wilson MacGyver
I see. very clever. I'm not used to loop constructs with no side effect. On Tue, Jun 2, 2009 at 12:21 PM, Konrad Hinsen wrote: >> I saw that clojure has loop. But in other functional languages, >> using loops are always discouraged. So I didn't know if loop >> was the "clojure" idiomatic way of

subtractng sequence?

2009-06-02 Thread Wilson MacGyver
More newbie questions. :) If I have two sequences as follow: (2 3 4 5 6 7 8 9 10) (4 6 8 10) what's the best way to subtract the 2nd sequence from the first one? The best I can come up with was to do (first) on 2nd sequence and turn around and do a (remove) on the first sequence, etc until I

Re: subtractng sequence?

2009-06-03 Thread Wilson MacGyver
Christophe's solution seems to work. basically I just wanted to remove (4 6 8 10) from (2 3 4 5 6 7 8 9 10) so I end up with (2 3 5 7 9) On Wed, Jun 3, 2009 at 3:27 AM, kyle smith wrote: > > How about (map - seq1 seq2) ? > > An example or two of the desired output would be helpful. > > > -

Re: subtractng sequence?

2009-06-03 Thread Wilson MacGyver
er=> (def seq2 (list 4 6 8 10)) > #'user/seq2 > 1:3 user=> (require 'clojure.set) > nil > 1:4 user=> (clojure.set/difference (set seq1) (set seq2)) > #{2 3 5 7 9} > 1:5 user=> (seq (clojure.set/difference (set seq1) (set seq2))) > (2 3 5 7 9) > 1:7 user=

Re: subtractng sequence?

2009-06-03 Thread Wilson MacGyver
Thank you for such a detail email on the algorithm. I'll certainly keep that in mind. This is so far been the most impressive thing I've found about clojure. the community is very friendly and helpful. You've made a newbie feel much more comfortable. On Wed, Jun 3, 2009 at 12:33 PM, Daniel Lyons

Mnesia like?

2009-06-15 Thread Wilson MacGyver
Does clojure have anything like erlang's Mnesia? or is anyone working on such project? I know I can fall back to using JDBC+ various RDBMS, but I was curious if there is something that works like Mnesia. Thanks, Mac -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~-

Re: Mnesia like?

2009-06-15 Thread Wilson MacGyver
yea, I thought of couchDB. the nice thing about Mnesia in erlang is that it's completely self-contained. I didn't know if there is such a thing in clojure, or works underway to create one. On Mon, Jun 15, 2009 at 2:20 PM, Phil Hagelberg wrote: > > Daniel Lyons writes: > >> I might throw up a bit

Re: Mnesia like?

2009-06-16 Thread Wilson MacGyver
t; > On Jun 15, 6:02 pm, Wilson MacGyver wrote: >> Does clojure have anything like erlang's Mnesia? or is anyone working on such >> project? I know I can fall back to using JDBC+ various RDBMS, but I >> was curious if there is something that works like Mnesia. > >

Re: javafx

2009-06-20 Thread Wilson MacGyver
groovy has made much progress in this front, due to Andres Almiray's mad skill and dedication. He almost has the FXBuilder generating JavaFX 1.2 code from groovy. So I'm sure there is much that can be learned here. http://www.jroller.com/aalmiray/entry/another_look_at_fxbuilder_griffon On Sat,

jar handling

2009-06-21 Thread Wilson MacGyver
Hi, Does clojure have any way to handle jar loading without having to specify it in command line? I'm looking for something like groovy, where if you place a jar file in ~/.groovy/lib. it's available to any groovy code. Thanks -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~-

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

Re: leveraging Clojure STM in other JVM languages?

2009-06-22 Thread Wilson MacGyver
that seems very hard to do. How would you grantee no side effect from other languages? On Mon, Jun 22, 2009 at 3:18 PM, wilfred wrote: > > So Raoul, did you give it a try after all of this? > > On May 1, 7:40 pm, Raoul Duke wrote: > > hi, > > > > has anybody experimented with using Clojure code

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread Wilson MacGyver
I like to suggest conjclipse it's a pun on "conj" in clojure. On Tue, Jun 23, 2009 at 7:47 AM, Laurent PETIT wrote: > Hello, > > Since the switch to git, there has also been the creation of a mailing list > called clojure-dev for discussions concerning clojure development, and a > twitter accoun

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread Wilson MacGyver
how about Corona? It's the visible part of the sun during eclipse. On Tue, Jun 23, 2009 at 3:02 PM, Laurent PETIT wrote: > > 2009/6/23 J. McConnell : >> >> On Tue, Jun 23, 2009 at 7:47 AM, Laurent PETIT >> wrote: >>> >>> Would you help us find a new name, by giving ideas of voting for your >>>

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread Wilson MacGyver
A lot of people will associate snake with python though Sent from my iPhone On Jun 23, 2009, at 3:22 PM, Stephan Mühlstrasser wrote: > > I think there are too many of the "j" names already. I thought about > leveraging a hint to the REPL. What about calling it "REPtiLe"? This > could also prov

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread Wilson MacGyver
hmm... developing clojure code using eclipse makes you poor. :) On Tue, Jun 23, 2009 at 9:05 PM, verec < jeanfrancois.brouil...@googlemail.com> wrote: > > A bit facetious, I know, but a not too sarcastic pun on the > current economic climate ... > > foreclojure > > :-) > > Has good Googleability

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-24 Thread Matt Wilson
Clipse? On Jun 24, 4:21 am, Laurent PETIT wrote: > What about eclipjure ? > > 2009/6/23 Christophe Grand > > > > > On Tue, Jun 23, 2009 at 5:56 PM, Laurent PETIT > > wrote: > > >> 2009/6/23 Christophe Grand > > >>> On Tue, Jun 23, 2009 at 1:47 PM, Laurent PETIT > >>> wrote: > > * ecloju

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-24 Thread Wilson MacGyver
At the risk of suggesting another name that start with conj, how about Conjunction? Eclipses happens when sun and moon are in conjunction. And it does start with conj. On Jun 24, 2009, at 8:02 AM, Laurent PETIT wrote: > Hi all, > > Among the last interesting proposals, some seem not possib

Re: ANN: FnParse, a functional parsing library

2009-07-04 Thread Wilson MacGyver
Very timely, I need to parse a bunch on JSON files on Monday :) good work Sent from my iPhone On Jul 4, 2009, at 3:16 PM, samppi wrote: > > I'm pleased to announce FnParse, a monadic functional parsing library > for Clojure, half a year in the making. I started on FnParse in > December as my

Re: ANN: FnParse, a functional parsing library

2009-07-05 Thread Wilson MacGyver
show how it works. But please feel free to use it however it can be > useful to you. :) > > On Jul 4, 1:45 pm, Wilson MacGyver wrote: >> Very timely, I need to parse a bunch on JSON files on Monday :) good >> work >> >> Sent from my iPhone >> >> On Jul 4, 2

Re: Dependency management

2009-07-07 Thread Wilson MacGyver
interesting idea! It reminds me a bit of the Grape system in groovy. Groovy uses Ivy for this. and you can grab the needed library either via annotation like @Grab(group='com.jidesoft', module='jide-oss', version='[2.2.1,2.3.0)') or method call like Grape.grab(group:'org.jidesoft', module:'jid

Re: Using Clojure for complex database driven applications

2009-07-08 Thread Wilson MacGyver
Take a look at ClojureQL http://github.com/Lau-of-DK/clojureql/tree/master It's not a ORM system like SQLAlchemy/Django ORM in that it won't "manage" the table schema for you. There is also clj-record. http://github.com/duelinmarkers/clj-record/tree/master which is inspired by rail's ActiveRe

Re: Clojure cheat sheet

2009-07-08 Thread Wilson MacGyver
Great idea, maybe you should talk to dzone.com about turning this into a refcard. On Jul 8, 2009, at 5:04 AM, Steve Tayon wrote: > > Hello everyone, > > while looking around for a modern lisp, I discovered Clojure and was > instantly infected by the new possibilities to write software. Sinc

Re: Using Clojure for complex database driven applications

2009-07-08 Thread Wilson MacGyver
an Ghose wrote: > Wilson MacGyver wrote: >> Take a look at ClojureQL >> >> http://github.com/Lau-of-DK/clojureql/tree/master >> >> It's not a ORM system like SQLAlchemy/Django ORM in that >> it won't "manage" the table schema for you. >&g

Re: Clojure cheat sheet

2009-07-08 Thread Wilson MacGyver
No no, that's not it. I merely suggested dzone.com because they generally promote their refcards, and I thought it would be a good way for clojure to get some press, and for you to get some fame. :) On Wed, Jul 8, 2009 at 1:49 PM, Steve Tayon wrote: > On 8 Jul., 19:03, Wilson MacGyve

Re: Clojure in Clojure?

2009-07-09 Thread Wilson MacGyver
Yea, for me, being on JVM is one of clojure's biggest selling point. I don't know that I would've learn and use clojure were it not on the JVM. On Thu, Jul 9, 2009 at 4:24 PM, John Harrop wrote: > On Thu, Jul 9, 2009 at 11:10 AM, tmountain wrote: >> >> I just finished watching the Bay Area Cloju

Re: Performance question (newbie)

2009-07-16 Thread Wilson MacGyver
This link reminded me of this discussion. http://www.cnn.com/2009/US/07/15/quadrillion.dollar.glitch/index.html?iref=newssearch as Rich said, unchecked is generally a bad idea. :) On Wed, Jul 15, 2009 at 10:24 PM, Rich Hickey wrote: > > > > On Jul 15, 2:22 pm, John Harrop wrote: >> On Wed, Jul

clojure-contrib

2009-07-16 Thread Wilson MacGyver
Can clojure-contrib be used with clojure-1.0? Or in order to use it, I also need to build clojure from github? come to think of it, with various libraries being announced, are people targeting clojure 1.0? Thanks, Mac -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~--

Re: clojure-contrib

2009-07-18 Thread Wilson MacGyver
Thanks, started tracking the 1.0 compat branch of clojure.contrib On 7/17/09, Meikel Brandmeyer wrote: > > Hi, > > On Jul 17, 6:21 am, Wilson MacGyver wrote: > >> Can clojure-contrib be used with clojure-1.0? Or in order to use it, I >> also >> need to build cl

clojure plugin for grails

2009-07-18 Thread Wilson MacGyver
Jeff Brown has released a clojure plugin for grails. http://grails.org/plugin/clojure So you can now write clojure code in grails app. -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: Grails And Clojure

2009-07-19 Thread Wilson MacGyver
Great info. When I saw this my first reaction was to use clojure as a "blackbox" STM inside a grails app You may want to include what you just posted in the plugin info page, since I imagine clojure will be new to most Grail developers. On Jul 19, 2009, at 9:27 AM, Jeff Brown wrote: > > >

Re: Grails And Clojure

2009-07-19 Thread Wilson MacGyver
There are already two webframework in clojure being developed. Compojure and cascade. While I'm eagerly waiting to see how these two and others will envole, there are benefit to this approach as well. It allows Grail developers to experiment with clojure, and leverge the language's strengt

Re: Grails And Clojure

2009-07-19 Thread Wilson MacGyver
d lift for some internal apps as well. I keep looking for lazy ways to generate wars and such. On Jul 19, 2009, at 4:24 PM, Vagif Verdi wrote: > > On Jul 19, 9:49 am, Wilson MacGyver wrote: >> There are already two webframework in clojure being developed. >> Compojure and cascade.

Re: Tests in Clojure source

2009-07-20 Thread Wilson MacGyver
yes, it's in clojure.contrib.test-is http://clojure.org/libraries#toc28 overview at http://code.google.com/p/clojure-contrib/wiki/TestIsApiDoc I believe it's being moved into clojure core in the next release. On Mon, Jul 20, 2009 at 9:57 AM, Angel Java Lopez wrote: > Hi people! > I'm a newbie

Re: Ant build.xml snippet: compile

2009-07-22 Thread Christopher Wilson
r source directory you stick >> >> to the >> >> one namespace / one file rule). >> > >> > Yes, I absolutely stick to that rule. Files are cheap, use lots! >> >> Yes, but Laurent is asking about using MORE files than there are >> namespac

clojure plugin for griffon

2009-07-28 Thread Wilson MacGyver
Andres Almiray just released a clojure plugin for Griffon. Griffon is a Grails like application framework for developing desktop applications in Groovy. http://griffon.codehaus.org/ The plugin is available for Griffon 0.1.2. You can install it by doing griffon install-plugin clojure So now you

Re: Clojure without Rich Hickey

2009-08-01 Thread Wilson MacGyver
I think the short answer is to build up clojure community so strong that in the very unlikely event this happens, clojure can survive it. On Aug 1, 2009, at 6:22 PM, Vagif Verdi wrote: > > Today i saw the announcement > http://groups.google.com/group/Qilang/browse_thread/thread/592773c562017d

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 >> imagin

Re: ClojureQL confusion: getting a hold of the results

2009-08-11 Thread Christopher Wilson
intln (take 5 > result > > ... prints 5 people... > > The ResultSet always seems to be closed unless i print it right away... what > am i doing wrong? > > cheers, > > -Max > > > > -- Chris Wilson --~--~-~--~~~---~--~

Re: Newbie with problems building clojure-contrib

2009-08-12 Thread Wilson MacGyver
There is a branch in clojure-contrib that is 1.0 compatible. Sent from my iPhone On Aug 12, 2009, at 7:35 PM, Andy Fingerhut wrote: > > Oh, one more thing. If you have latest git clojure-contrib, I'd > recommend trying it with latest git clojure, too. Latest clojure- > contrib might not work

Re: Clojure Code Style

2009-08-12 Thread Wilson MacGyver
I would also vote A, seems much more straight forward. On Wed, Aug 12, 2009 at 8:02 PM, Sean Devlin wrote: > > Hello Clojurians, > I've been experimenting with different coding styles, and I'm > interested in the group's opinion. Which set of code is easiest to > read? > > A)  Traditional definit

Re: A funny thing happened on the way to running Clojure

2009-08-16 Thread Wilson MacGyver
part of the confusion is also in the clojure build system. it builds both clojure.jar and clojure-version.jar for example, in the git clone version of clojure. it builds both clojure.jar and clojure-1.1.0-alpha-SNAPSHOT.jar which is probably how this got snuck by. On Sun, Aug 16, 2009 at 3:19 P

java/scala oneliner

2009-09-17 Thread Wilson MacGyver
This blog post got me thinking. http://www.artima.com/weblogs/viewpost.jsp?thread=268561 Basically it contains both a Java one liner and Scala one liner. Java: for(int i=0; i<4; i++) { System.out.println("Happy Birthday " + (i==2 ? "Dear XXX" : "To You")); } Scala: (1 to 4).map { i => "Happy Bi

Re: java/scala oneliner

2009-09-17 Thread Wilson MacGyver
1 chars including white space > for(int i=0;i<4;i++){System.out.println("Happy Birthday "+(i==2?"Dear > XXX":"To You"));}) -> 88 chars > (1 to 4).map{i=>"Happy Birthday %s".format(if(i==3)"Dear XXX"else"To > You")

Re: java/scala oneliner

2009-09-17 Thread Wilson MacGyver
, 2009 at 12:19 AM, Krukow wrote: > > > > On Sep 18, 5:53 am, Wilson MacGyver wrote: >> This blog post got me >> thinking.http://www.artima.com/weblogs/viewpost.jsp?thread=268561 >> >> Basically it contains both a Java one liner and Scala one liner. >> >&g

Re: java/scala oneliner

2009-09-17 Thread Wilson MacGyver
Clojure REPL will display nil for anything that causes side-effect? I had no idea! On Fri, Sep 18, 2009 at 2:24 AM, Krukow wrote: > Yes, the result of the computation is (nil nil nil nil), a side-effect > is printing: > Happy Birthday To You > Happy Birthday To You > Happy Birthday Dear XXX > Ha

Re: Metadata: something funny

2009-09-20 Thread Wilson MacGyver
I just checked against the latest 1.1 snapshot. It returns the same result as you outlined here. On Sun, Sep 20, 2009 at 12:20 PM, samppi wrote: > > I was messing with the REPL when I found this happens: > > Clojure 1.0.0- > user=> (def a #^{:a 5} [1 2 3]) > #'user/a > user=> ^a > {:a 5} > user=

Re: New Release for Enclojure plugin - 2009-09-22

2009-09-22 Thread Wilson MacGyver
any chance the enclojure plugin can be made available to download from the NetBeans repo? It would mean much easier for netbeans users to find and install it by simply bringing up the plugin menu from within NetBeans. Just a thought. On Tue, Sep 22, 2009 at 8:53 PM, Eric Thorsen wrote: > > New

tuplespace and clojure?

2009-10-09 Thread Wilson MacGyver
Someone wrote an in-memory tuplespace implmentation in groovy here http://code.google.com/p/gruple/ I look through it and was trying to compare it against clojure's various structures for concurrency. But I'm having a hard time either finding the equivalent, or what tuplespace would bring to the

Re: Data structure design question

2009-10-09 Thread Wilson MacGyver
I suspect people are looking for the clojure's equivalent of erlang's mnesia. Which at the moment doesn't exist as far as I know. On Fri, Oct 9, 2009 at 11:15 AM, Stuart Sierra wrote: > > Honestly, this sounds like a problem for a full-fledged database. > With Clojure/datalog, you'll need to per

Re: idomatic sudoku?

2009-10-11 Thread Matt Wilson
My approach (which I might upload once I've tidied it up a bit) was to use a hash-map of [x y] cell coordinates to a set of all remaining numbers. So, something like: {[0 0] #{1 2 3 4} [0 1] #{5 6 7 8} …} Then I just made some functions that mapped an [x y] pair to all it's peers -- e.g. unit, r

Re: clj-gradle – a Clojure Plugin for Gradle

2009-10-13 Thread Wilson MacGyver
Thank you SO much for writing this. We use gradle for our groovy stuff. Now we can intergrate clojure into the build process. On Oct 13, 2009, at 3:16 PM, Meikel Brandmeyer wrote: > Hi, > > I'd like to announce the first release of a Clojure plugin for > Gradle. It features integration in t

clojurecheck?

2009-10-16 Thread Wilson MacGyver
A friend of mine showed me this. It's an effort to bring Haskell's Quickcheck to clojure. http://kotka.de/projects/clojure/clojurecheck.html Has anyone used it? What's your experience with it? Thanks -- Omnem crede diem tibi diluxisse supremum. --~--~-~--~~~---~--

Re: Clojure is two!

2009-10-16 Thread Wilson MacGyver
Congrats. I hadn't heard of clojure until the 1.0 release. So for me, the amount of progress and how it's taking off in the past few month has been amazing. On Fri, Oct 16, 2009 at 12:12 PM, Rich Hickey wrote: > > http://clojure.blogspot.com/2009/10/clojure-is-two.html > > Thanks again to all! >

Re: clojurecheck?

2009-10-16 Thread Wilson MacGyver
Thanks for the info. I understand. I'm sure vimclojure is taking up a lot of your time. On Fri, Oct 16, 2009 at 12:47 PM, Meikel Brandmeyer wrote: > Hi, > > Am 16.10.2009 um 17:52 schrieb Wilson MacGyver: > >> A friend of mine showed me this. It's an effort to brin

Re: Clojure is two!

2009-10-16 Thread Wilson MacGyver
two more coming. one is clojure in action, published by manning, written by Amit Rathore the other is definitive guide to clojure by Luke VanderHart http://www.apress.com/book/view/1430272317 On Fri, Oct 16, 2009 at 3:51 PM, rzeze...@gmail.com wrote: > > On Oct 16, 12:12 pm, Rich Hickey wrote:

Re: -> vs comp

2009-10-17 Thread Wilson MacGyver
Kinda off topic. I didn't realize ->> has been introduced. Is there a list of new forms that's been introduced since 1.0? Thanks On Sat, Oct 17, 2009 at 9:17 AM, Laurent PETIT wrote: > > > 2009/10/17 James Reeves >> >> On Oct 17, 4:55 am, samppi wrote: >> > Personally, I can go either way—I j

Re: La Clojure plugin for IntelliJ IDEA moved to Git

2009-10-17 Thread Wilson MacGyver
will the new released version work for regular Maia? I look in the plugin download area, and for regular Maia, I don't see the new version built on 10-17. On Sat, Oct 17, 2009 at 12:21 PM, Ilya Sergey wrote: > Hi all. > > After the long silence we resume work on `La Clojure' plugin for IntelliJ

Re: La Clojure plugin for IntelliJ IDEA moved to Git

2009-10-17 Thread Wilson MacGyver
#x27;re going to bind last plugin > releases to the actual IDEA CE stable builds. > > Ilya > > 2009/10/17 Wilson MacGyver >> >> will the new released version work for regular Maia? I look in the >> plugin download area, >> and for regular Maia, I don't see th

Re: La Clojure plugin for IntelliJ IDEA moved to Git

2009-10-17 Thread Wilson MacGyver
. Thanks On Sat, Oct 17, 2009 at 12:52 PM, Ilya Sergey wrote: > The last published version works with Maia Community/Ultimate Edition, > builds 90.[94-96]. In the near-term future we're going to bind last plugin > releases to the actual IDEA CE stable builds. > > Ilya > >

Re: La Clojure plugin for IntelliJ IDEA moved to Git

2009-10-18 Thread Wilson MacGyver
One thing I'd really like to see for the plugin is to support a way to "expand" macros. Sometimes it's hard to understand the macros. It would be great if from the IDE, you can "expand" the macro to the normal form. I don't think I've ever see this in any lisp IDE before. On Sun, Oct 18, 2009 at

Re: La Clojure plugin for IntelliJ IDEA moved to Git

2009-10-19 Thread Wilson MacGyver
Inline it, in essence so you can toggle between viewing the code in macro form, or the expanded version. Basically the ability to be able to do (macroexpand) on the fly within the IDE On Mon, Oct 19, 2009 at 5:40 PM, Ilya Sergey wrote: > Wilson, > Do you mean the ability to `view'

Re: Infinite sequences hang sets and maps

2009-10-28 Thread Wilson MacGyver
agreed, I'm not sure how meaningful it would be to compare two infinite "things". On Wed, Oct 28, 2009 at 12:05 PM, Mark Engelberg wrote: > > This is basically the behavior I would expect.  I expect that when I > put two sequences into a set, they are compared for equality, which is > clearly im

Re: Constructing Java Interop calls

2009-10-28 Thread Wilson MacGyver
Is there a reason you don't want to use doto? http://clojure.org/java_interop#toc15 ie (doto Bla (.setProperty "x" 1)) 2009/10/28 Tiago Antão : > > Hi, > > Sorry for the newbie question, but I am trying to understand how to > construct and call java dynamically from clojure. > As an example, im

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

2009-11-04 Thread Christopher Wilson
(PLT Scheme): #lang scheme (define (foo n) (define (foo-helper return) (if (> n 0) (return n) (* -1 n))) (call/cc foo-helper)) (display (foo 10)) -- Chris Wilson --~--~-~--~~~---~--~~ You received this message because you are s

  1   2   3   >