Re: Mock db data for unit tests

2014-03-07 Thread Alex Robbins
It looks like the issue is that korma.core/select is a macro, and has
already expanded by the time you redef it.

https://github.com/korma/Korma/blob/master/src/korma/core.clj#L113


On Fri, Mar 7, 2014 at 12:59 PM, Mark Watson  wrote:

> I have a web service that uses Korma for interacting with my db. To mock
> data for unit tests I want to re-bind korma.core/select to return known
> data and not hit a db.
>
> Currently I have a db ns:
>
> (nsservices.db
>   (:require [korma.core :refer :all]
>[korma.db :refer :all]))
>
>
> With a function 'func-select' that calls korma.core/select
>
> And a test ns:
>
> (ns ad-gallery-services.core-test
>   (:require [clojure.test :refer :all]
> [ad-gallery-services.db :refer :all]
> [ad-gallery-services.web :refer :all]))
>
> (deftest func-select-test
>   (testing "Return nil if select returns empty"
> (with-redefs [korma.core/select (fn [& _] [])]
>   (require 'ad-gallery-services.db :reload)
>   (is (= (func-select 1)
>  nil)
>
>
> However, it keeps throwing the exception:
>
> ArityException Wrong number of args (1) passed to: core$where
>
> Why is it even evaluating 'where', and (most importantly) how can I mock
> this data?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: cljsbuild dev/release, different debug levels

2014-04-03 Thread Alex Robbins
If you used cljx, you could probably use the feature expressions to do what
you want.

https://github.com/lynaghk/cljx

You'd need to set up a custom rule for it, but it seems well within the
scope of the project.


On Thu, Apr 3, 2014 at 8:50 AM, t x  wrote:

> Hi,
>
>   I'm trying to figure out how to do the following:
>
>   Have a shared cljs/* ...
>
>   For the "dev" build, have (debug ...) compile to (js/console.log ...)
>
>   For the "release" build, have (debug ...) compile to (do).
>
>   Basically, I want different things to happen depending on whether
> the build is dev or release.
>
>   Does anyone have an example of how to do this?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible to give an atomic message?

2014-04-11 Thread Alex Robbins
You could do this with core.async. Make a channel that takes messages, and
then run a go loop that pulls messages off the message channel and prints
them. Then only one part of the program is ever printing. Any other part
that wants to print a message can push onto the channel.




On Fri, Apr 11, 2014 at 8:35 AM, Cecil Westerhof wrote:

> I have the following functions in my concurrent program:
> (def time-format (new java.text.SimpleDateFormat "HH:mm:ss"))
>
> (defn now []
>   (new java.util.GregorianCalendar))
>
> (defn give-message [message]
>   (println (format "%s: %s" (. time-format format (. (now) getTime))
> message)))
>
>
> But sometimes a new message from a different thread is displayed, before
> the current message is ready:
> 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)10:34:57:
> Different for  4198042 (9.313226e-10, 2.218469e-16)
>
> 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)
>
>
> Is there a way to make give-message atomic, so it would be displayed as:
> 10:34:57: Different for  4194573 (9.313226e-10, 2.220304e-16)
> 10:34:57: Different for  4198042 (9.313226e-10, 2.218469e-16)
> 10:34:57: Different for  8389473 (1.862645e-09, 2.220217e-16)
>
>
> I attached the complete program. Any hints to implement it better are
> appreciated.
>
> --
> Cecil Westerhof
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Kwargs vs explicit parameter map for APIs?

2014-04-30 Thread Alex Robbins
Maybe they want config in the least variance argument so it can be
partial'ed?


On Wed, Apr 30, 2014 at 10:03 AM, Jim Crossley  wrote:

> We used kwargs for options extensively in Immutant 1.x, and we're moving
> to explicit maps for Immutant 2.x, for the reasons cited above.
>
> It's not obvious to me why the "bad" release-sharks example on the coding
> standards page [1] is bad. Why should the optional config be the "least
> variance argument"?
>
> I had to look up "laudable", btw. It's one of those good words that sounds
> bad. :)
>
> [1] http://dev.clojure.org/display/community/Library+Coding+Standards
>
>
>
> On Wed, Apr 30, 2014 at 6:14 AM, Colin Fleming <
> colin.mailingl...@gmail.com> wrote:
>
>> And thinking about it (after pressing "send", of course), you'd get the
>> same benefit from destructuring an explicit map in the function parameter
>> anyway, wouldn't you?
>>
>>
>> On 30 April 2014 22:11, Colin Fleming wrote:
>>
>>> But that's only true for the variables which are explicitly destructured
>>> in the function definition, which in my experience many are not - they're
>>> often later picked out of an ":as args" argument, perhaps dependent on a
>>> combination of the parameters which are explicitly destructured. Seesaw
>>> never does this, for example. I think it's dangerous to rely on this rather
>>> than the documentation since it's often an incomplete view of what the
>>> function requires.
>>>
>>> Cheers,
>>> Colin
>>>
>>>
>>> On 30 April 2014 21:03, Joachim De Beule wrote:
>>>
 my two cents:

 The extra readability to users when using keyword args also comes from
 the fact that a function's options are explicit in its signature. So during
 development, instead of having to look them up in the docs or in the code,
 my emacs mini-buffer simply shows them to me. Although I do agree with all
 the good reasons against keywords arguments, to me this is still the
 decisive reason to prefer them...

 Joachim

 Op woensdag 30 april 2014 05:41:29 UTC+2 schreef James Reeves:

> On 30 April 2014 03:54, Sean Corfield  wrote:
>
>> I still think the keyword argument approach is far more readable to
>> _users_
>
>
>  --
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To post to this group, send email to clojure@googlegroups.com
 Note that posts from new members are moderated - please be patient with
 your first post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google
 Groups "Clojure" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Clojure" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscr

Re: [ANN] nrepl.el 0.1.6 released

2013-01-30 Thread Alex Robbins
Thanks for your great work on this!


On Tue, Jan 29, 2013 at 9:07 PM, Tim King  wrote:

> I am pleased to announce that nrepl.el v0.1.6 has been released, and is
> now available on marmalade.
>
> Preview versions of the next release are available on Melpa.
> See the Readme on github (https://github.com/kingtim/nrepl.el) for
> installation and usage instructions.
>
> Notable changes since our last release:
> - Ported SLIME macroexpansion mode (see README for full documentation)
> - Updated macroexpansion to use pprint with code-dispatch
> - Eldoc argument highlighting
> - Simplify popup buffer quit/restore using `quit-window'.
> - Add nrepl-disconnected-hook and disable nrepl when disconnected.
> - Emit server log output at bottom of *nrepl-server* buffer. (Brian Rowe)
> - Reset nrepl-buffer-ns on nrepl-restart.  Fixes issue #187.
> - Implement nrepl-mode as a derived mode. (Bozhidar Batsov)
> - fix #194 - stacktrace buffer was not respecting nrepl-popup-stacktraces
> (Bozhidar Batsov)
> - Get key bindings documentation into the minor mode descriptions (Ivan
> Necas)
> - Fix message formatting for results containing "%" (fixes issue #195).
> - Fix NPE in nrepl-jump (issue #124).  (cola-zero)
> - Fix nrepl to work with fish shell (issue #192). (Dario Bertini)
> - Adjusted the javadoc keybinding and mentioned it in the README.
> (Bozhidar Batsov)
> - made the TAB command in the nrepl-mode buffers configurable (Bozhidar
> Batsov)
> - Added convenience function to report the version of nREPL in use. (fogus)
> - Fix issue #163 - exclude ns from nrepl-load-file.
> - Ignore "killed" and "hangup" events in sentinel (Chris Bilson)
> - Shift-Home and Shift-Ctrl-a in repl, which select just the user input
> when on the input line. (Ivan Kozik)
> - Clear the correct region when replacing the input line. (Ivan Kozik)
> - Fix issue #146.  Include "@" in nrepl-input-complete-p.
> - Handle stdout messages that arrive after status "done"
> - Various and sundry bug fixes and documentation additions and updates.
>
> Many thanks to all the contributed their time and energy by
> reporting issues, submitting patches and testing out bug fixes and features.
>
> Enjoy!
>
> Cheers,
> Tim
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: what on earth is happening?

2013-02-28 Thread Alex Robbins
Maybe you are already doing this, but as soon as I get into "This doesn't
seem possible" territory, I run a "lein clean". That has resolved the
problem for me several times.


On Thu, Feb 28, 2013 at 9:01 AM, Jim foo.bar  wrote:

>  On 28/02/13 14:34, Marko Topolnik wrote:
>
> So it makes sense that it blows up only when you try to actually run the
> code.
>
>
> It doesn't low up when I try to run the code...as I said, I can easily
> navigate into any namespace from the repl and run any code that I
> wantso there is no problem compiling /running the actual code. I seem
> to be getting this error at random occasions without changing any code
> This is what's driving me nuts!
>
> 2 minutes ago I did:
>
> *> lein2 test hotel_nlp.core*[ALL-GOOD]
>
> lein test hotel_nlp.core
>
> Testing hotel_nlp.core
>
> Ran 0 tests containing 0 assertions.
> 0 failures, 0 errors.
>
> then I did:
>
> *> lein2 test hotel_nlp.helper * [ALL-GOOD]*
>
> *lein test hotel_nlp.helper
>
> Testing hotel_nlp.helper
>
> Ran 7 tests containing 30 assertions.
> 0 failures, 0 errors.*
>   *
> so it *seems* everything is working fine...However, without changing any
> code:
>
> *>lein2 test hotel_nlp.core hotel_nlp.helper*  [BAD]
>
>
> Exception in thread "main" java.lang.VerifyError: (class:
> hotel_nlp/concretions/models/Workflow, method: run signature:
> ()Ljava/lang/Object;) Unable to pop operand off an empty stack,
> compiling:(hotel_nlp/concretions/models.clj:68:1)
>
> then immediately after I did the same
>
> *>lein2 test hotel_nlp.core hotel_nlp.helper*  [ALL-GOOD]
>
> lein test hotel_nlp.core
>
> Testing hotel_nlp.core
>
> lein test hotel_nlp.helper
>
> Testing hotel_nlp.helper
>
> Ran 7 tests containing 30 assertions.
> 0 failures, 0 errors.
>
> That is what I mean it occurs at random...Has anyone ever had this before?
>
> @Dave:
>
> You're absolutely right Dave, I should have been be more specific in the
> subject heading. I do apologise though on behalf of my frustration which is
> to blame for this! It won't happen again
>
> Jim
>
>
>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: java.lang.OutOfMemoryError when slurping lots of files?

2013-04-05 Thread Alex Robbins
Slurp reads the entire file into memory. Maybe it is a combination of a)
the program taking up more of the heap in other parts as it runs and then
b) a particularly large file?

Is there a reason you can't process the files as a line-seq so you don't
have to load the entire thing into memory all at once?

Also, you could just pass a larger -Xmx value on the command line (or in
the lein java-opts) to make the heap larger.


On Fri, Apr 5, 2013 at 9:57 AM, Adrian Muresan
wrote:

> Hello everyone,
>
> I'm trying to parse a large number of small reports for some data and I'm
> doing this by repeatedly calling the following function (with a for) on
> each of the files:
>
> (defn get-rep [file]
> (let [report (with-open [rdr (io/reader file)](*slurp rdr*))
>   reg #";\s+(\d+\.\d+) \s+; (\d+\.\d+) \s+;"
>   match (re-matcher reg report)
>   found (re-find match)
>   fmax-85c (second found)
>   rfmax-85c (nth found 2)
>   found2 (re-find match)
>   fmax-0c (second found2)
>   rfmax-0c (nth found2 2)]
>
>   {:fmax-85c fmax-85c
>   :rfmax-85c rfmax-85c
>   :fmax-0c fmax-0c
>   :rfmax-0c rfmax-0c}))
>
> My problem is that after a while my program crashes with a jvm heap error,
> it crashes on the slurp line (in bold), although that probably doesn't mean
> much. The slurp line is the only one that I suspect since it's the biggest
> memory consumer in my program.
> Now I'm wondering what's going on and why don't the report files get freed
> from memory. I'm suspecting this might be caused by lazyness at some level,
> but I can't figure out where. Any ideas?
>
> Thanks!
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: More idiomatic way to find the first non-nil function result?

2013-05-01 Thread Alex Robbins
This is similar to, but not exactly the same, as some-fn. Maybe the source
of that could guide you?

http://clojuredocs.org/clojure_core/clojure.core/some-fn


On Wed, May 1, 2013 at 11:13 AM, Steven Degutis  wrote:

> I've found myself writing a validator function.
>
> It has a list of internal validator functions, and should return the first
> one that evaluates to non-nil, without evaluating the rest.
>
> Here's the code I've come up with:
>
> (defn validate-something [data-1 data-2 data-3]
>   (some #(%)
> [#(validate-data-1 data-1)
>  #(validate-data-2 data-2)
>  #(validate-data-3 data-3)]))
>
> But this code just feels ugly and I feel like it could be more idiomatic.
>
> For one thing, it shares something in common with cond, since it should
> return the first one that returns non-nil. But each cond clause takes two
> params, the test and the result, whereas this is just one and the same. So
> I don't know how I would use cond with it.
>
> Alternatively, that property could be implemented by the lazy-evaluation
> of map. My first impulse was to do (find-first (map apply [f1 f2 f3])) but
> first of all I'd have to write find-first (or use something in contrib),
> and second of all apply seems to expect args and gave me an error. But
> maybe that last part was just me being overtired.
>
> Does anyone here have a more idiomatic or elegant solution than the (some)
> one above?
>
> -Steven
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: RabbitMQ

2011-03-24 Thread Alex Robbins
According to http://www.clojure-toolbox.com/

https://github.com/mefesto/wabbitmq

But I'm pretty new to clojure and don't know if it is good.

On Thu, Mar 24, 2011 at 10:30 AM, Mark Rathwell  wrote:
>
> I just wrapped their java client library:
> http://www.rabbitmq.com/java-client.html
>
> On Thu, Mar 24, 2011 at 11:15 AM, Max Weber
>  wrote:
>>
>> What is the best Clojure library to work with RabbitMQ?
>>
>> Best regards
>>
>> Max
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Fun: Write the fastest code that flattens nested maps of a particular type

2011-04-13 Thread Alex Robbins
That has tricked me before. The lazy one is fastest because all you
are timing is the creation of the lazy seq, not its realization. Wrap
the lazy seq in a doall inside the time macro.

On Wed, Apr 13, 2011 at 12:59 PM, babui  wrote:
> I was asking because my timings show that the lazy version is the
> fastest one.
>
> My (very simple & stupid) test is:
>
> (defn flatten-maps
>    "The original one"
>    )
>
> (defn flatten-maps-lazy
>    "The lazy one"
>    )
>
> (defn flatten-maps-eager
>    "The eager one"
>    )
>
> (defn flatten-maps-recur
>     "Using recur"
>     )
>
> And data is:
>
> (def data [{:a 1 :b 1 :c [{:a 2 :b 2 :c [{:a 3 :b 3 :c []}]} {:a 4 :b
> 4 :c []}]} {:a 5 :b 5 :c [{:a 6 :b 6 :c [{:a 7 :b 7 :c []}]} {:a 8 :b
> 8 :c []}]}])
>
> That is, the original data but with different numbers to check if the
> result is ok:
>
> (time (flatten-maps data))
> user=> "Elapsed time: 0.14 msecs"
> ({:a 5, :b 5} {:a 1, :b 1} {:a 4, :b 4} {:a 2, :b 2} {:a 3, :b 3} {:a
> 8, :b 8} {:a 6, :b 6} {:a 7, :b 7})
>
> (time (flatten-maps-lazy data))
> user=> "Elapsed time: 0.034 msecs"
> ({:a 1, :b 1} {:a 2, :b 2} {:a 3, :b 3} {:a 4, :b 4} {:a 5, :b 5} {:a
> 6, :b 6} {:a 7, :b 7} {:a 8, :b 8})
>
> (time (flatten-maps-eager data))
> user=> "Elapsed time: 0.129 msecs"
> [{:a 1, :b 1} {:a 2, :b 2} {:a 3, :b 3} {:a 4, :b 4} {:a 5, :b 5} {:a
> 6, :b 6} {:a 7, :b 7} {:a 8, :b 8}]
>
> (time (flatten-maps-recur data))
> user=> "Elapsed time: 0.129 msecs"
> ({:a 8, :b 8} {:a 7, :b 7} {:a 6, :b 6} {:a 5, :b 5} {:a 4, :b 4} {:a
> 3, :b 3} {:a 2, :b 2} {:a 1, :b 1})
>
> So my tests show that the fastest is the lazy one.
>
> Regards,
>
> Juan Manuel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2011-04-14 Thread Alex Robbins
Glad to hear from you. I live and work a little south of the
intersection of 121 and the Dallas North Tollway, so any meeting place
along the DNT would be great for me (Addison included).

Hopefully there are more than two clojure users in Dallas.

On Wed, Apr 13, 2011 at 3:44 PM, J.R. Garcia  wrote:
> I live in Fort Worth and work in Addison. I'd love to get together
> sometime. If there is any interest in getting a user group together, I
> have the perfect place to host it.
>
> On Mar 10, 8:28 am, Alex Robbins 
> wrote:
>> Anyone else in the north Dallas area using/interested in Clojure? I'd
>> love to get together.
>>
>> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Open Source Projects for Beg/ Intermediate

2011-04-15 Thread Alex Robbins
I'm learning Clojure also, and have been working through some of the
project euler problems. (Got started on it from the labrepl
introduction.) It has been a lot of fun and I think I'm learning a
fair amount about how the language works.

http://projecteuler.net/index.php?section=problems

I've got solutions to the first 25 in my github repo. (I'm sure the
code would make more experienced clojurians cry, but I'm excited about
it :)
https://github.com/alexrobbins/Project-Euler-Solutions-Clojure

Alex

On Fri, Apr 15, 2011 at 2:52 PM, Ptr6464  wrote:
> I'd like to second that. Since I started with Clojure it got me, but I
> need some practice, so if anyone needs enthusiastic workforce please
> let me know also.
> To Carin: Good luck in learning Clojure, should be pretty demanding
> but it will be great if we learn it.
>
> On Apr 15, 2:47 am, Carin Meier  wrote:
>> I have fallen for Clojure.  I would love to be able to practice and
>> hone my skills while contributing something to an open source
>> project.  Do you have any suggestions for projects that might have
>> some low-hanging fruit for a newish person like me.  Any floors that
>> need sweeping?
>>
>> Carin Meier
>> @carinmeier
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2011-04-20 Thread Alex Robbins
Yeah, I'd be up for meeting sometime. However, right now I don't have
a car available during the day. I work from home and my wife works
outside the house, so we have been able to run on one car. It saves
money, but makes lunch meetings difficult. If you don't mind driving
up my way, Lone Star Coffee Bar is good (6800 Windhaven Pkwy #105, The
Colony, TX). Otherwise, some time after work I can use the car and we
can meet closer to half-way.

Alex

On Thu, Apr 14, 2011 at 9:17 PM, J.R. Garcia  wrote:
> I work off of the Tollway and Westgrove at Improving Enterprises. We
> have a lot of space and have several user groups meet daily at our
> office. I'm sure there are plenty of other Clojure users in the area.
> There are plenty of people that I work with that would probably be
> interested. Maybe we can meet for lunch sometime and discuss this
> further.
>
> On Apr 14, 9:33 am, Alex Robbins 
> wrote:
>> Glad to hear from you. I live and work a little south of the
>> intersection of 121 and the Dallas North Tollway, so any meeting place
>> along the DNT would be great for me (Addison included).
>>
>> Hopefully there are more than two clojure users in Dallas.
>>
>>
>>
>> On Wed, Apr 13, 2011 at 3:44 PM, J.R. Garcia  wrote:
>> > I live in Fort Worth and work in Addison. I'd love to get together
>> > sometime. If there is any interest in getting a user group together, I
>> > have the perfect place to host it.
>>
>> > On Mar 10, 8:28 am, Alex Robbins 
>> > wrote:
>> >> Anyone else in the north Dallas area using/interested in Clojure? I'd
>> >> love to get together.
>>
>> >> Alex
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with 
>> > your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2011-04-25 Thread Alex Robbins
That sounds good to me.

On Mon, Apr 25, 2011 at 9:24 AM, ch...@rubedoinc.com
 wrote:
> I am interested as well and have office space in Addison near beltline
> and the tollway we can use. How about meeting next Monday may 2nd @
> 630 pm? We can fo an organizational meeting about goals of the group,
> etc.
>
> On Mar 10, 8:28 am, Alex Robbins 
> wrote:
>> Anyone else in the north Dallas area using/interested in Clojure? I'd
>> love to get together.
>>
>> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: What role does ? operator play?

2011-05-19 Thread Alex Robbins
? isn't an operator, it is part of a function's name.

user=> (doc pos?)
-
clojure.core/pos?
([x])
  Returns true if num is greater than zero, else false
nil
user=>

Hope that helps!
Alex

On Thu, May 19, 2011 at 8:09 AM, octopusgrabbus
 wrote:
> Given the following function
>
>
> (defn proint-down-from [x]
>    (when (pos? x)
>        (println x)
>        (recur (dec x
>
> What role does the ? operator play. It looks like it is creating a
> variable name.
> Thanks.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2011-05-20 Thread Alex Robbins
I'm planning to be there.

Alex

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: List comprehension and sets

2011-05-24 Thread Alex Robbins
What is the difference between
(into #{} (for x..))
and
(set (for x ..))
Is one preferred?

Thanks!
Alex

On Tue, May 24, 2011 at 11:20 AM, Mark Engelberg
 wrote:
> Scala's approach to comprehensions is to automatically produce the
> same type of collection that is used first in your comprehension.
> Clojure's approach is to always produce a lazy sequence which can then
> be "poured" into the collection of your choice using "into".  Both
> approaches have their merits.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: library or namespace doc helper function from repl?

2011-06-02 Thread Alex Robbins
(ns-publics 'namespace) will show all the publicly defined things in a
namespace.

On Thu, Jun 2, 2011 at 11:51 AM, Avram  wrote:
>
> Apologies for a silly question, there must be a simple way to do this
> from the repl, but I can't seem to find it…
>
> Is there a way from the repl to view all available functions in the
> library or namespace?
>
> It often happens that I know a library contains functionality I seek,
> but I don't yet know the name.  I realize that I can try to use the
> Atlas url (which is awesome) or an IDE or check github, but it would
> be really nice not to have to leave the repl.
> In R I would do:  library(help=libname)
>
>
> Thanks in advance,
> Avram
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: library or namespace doc helper function from repl?

2011-06-02 Thread Alex Robbins
Ironically, I found out about ns-publics from (find-doc "ns-")

On Thu, Jun 2, 2011 at 12:57 PM, Avram  wrote:
> find-doc retrieves too other things though.
>
> For example, I'm exploring a bunch of libs now (including crane and
> fs) but even if I ask only for just "fs" I get the kitchen sink:
>
> user=> (find-doc "fs")
> -
> crane.ec2/cluster-confs
> ([cluster base-conf])
>  Return a sequence of confs for each machine in the cluster.
> -
> clojure.contrib.pprint/add-english-scales
> ([parts offset])
>  Take a sequence of parts, add scale numbers (e.g., million) and
> combine into a string
> offset is a factor of 10^3 to multiply by
> -
> clojure.contrib.pprint/cl-format
> ([writer format-in & args])
>  An implementation of a Common Lisp compatible format function. cl-
> format formats its
> arguments to an output stream or string based on the format control
> string given. It
> supports sophisticated formatting of structured data.
>
> etc…
>
> (ns-publics 'lib) works best for me.
> -A
>
>
> On Jun 2, 10:22 am, James Estes  wrote:
>> You could also try
>> (find-doc "libname")
>>
>> On Thu, Jun 2, 2011 at 11:15 AM, Alex Robbins
>>
>>
>>
>>  wrote:
>> > (ns-publics 'namespace) will show all the publicly defined things in a
>> > namespace.
>>
>> > On Thu, Jun 2, 2011 at 11:51 AM, Avram  wrote:
>>
>> >> Apologies for a silly question, there must be a simple way to do this
>> >> from the repl, but I can't seem to find it…
>>
>> >> Is there a way from the repl to view all available functions in the
>> >> library or namespace?
>>
>> >> It often happens that I know a library contains functionality I seek,
>> >> but I don't yet know the name.  I realize that I can try to use the
>> >> Atlas url (which is awesome) or an IDE or check github, but it would
>> >> be really nice not to have to leave the repl.
>> >> In R I would do:  library(help=libname)
>>
>> >> Thanks in advance,
>> >> Avram
>>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Clojure" group.
>> >> To post to this group, send email to clojure@googlegroups.com
>> >> Note that posts from new members are moderated - please be patient with 
>> >> your first post.
>> >> To unsubscribe from this group, send email to
>> >> clojure+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >>http://groups.google.com/group/clojure?hl=en
>>
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with 
>> > your first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> >http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Free Compojure Hosting? (or mostly free)

2011-06-08 Thread Alex Robbins
You can also put stuff up on the java part of Google App Engine. It is
pretty easy with this project: https://github.com/gcv/appengine-magic
You have a limit of ten apps per user, but it works for just getting
stuff up to play with.
Alex

On Tue, Jun 7, 2011 at 11:37 PM, Sean Corfield  wrote:
> I thought I'd bump this thread now that Heroku is supporting Clojure
> applications on the new "cedar" stack:
>
> https://gist.github.com/1001206
>
> I decided to try this tonight and went from ground zero (not even
> having a Heroku account) to a working Ring app (that says Hello World
> - w00t!) in just a few minutes - rather amazing!
>
> Sean
>
> On Sat, Dec 18, 2010 at 9:55 AM, Alex Baranosky
>  wrote:
>> Hi guys,
>> I've got a simple toy app I'm writing wrote for fun to help my friend figure
>> out where in the Boston area he should move to.  If I was using Rails I
>> could throw it up on Heroku, essentially for free, because I have no plan to
>> ever have any real traffic go there.  mostly I just want to show it to some
>> friends at work, etc.
>> Is there a similar free service to use with Compojure?  If not free, then
>> what are the cheap options?
>> Best,
>> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Best Way To Extract Data From Lazy Sequence

2011-06-28 Thread Alex Robbins
If you are trying to get the 6th row, you might use the "nth"
function. It allows you to grab an element based on its index. That'd
be better than tons of (next (next (next rows))) stuff.

user=> (doc nth)
-
clojure.core/nth
([coll index] [coll index not-found])
  Returns the value at the index. get returns nil if index out of
  bounds, nth throws an exception unless not-found is supplied.  nth
  also works for strings, Java arrays, regex Matchers and Lists, and,
  in O(n) time, for sequences.

Alex

On Tue, Jun 28, 2011 at 7:42 AM, octopusgrabbus
 wrote:
> Given this test program:
>
> (ns test-csv
>  (:gen-class)
>  (:use clojure.contrib.command-line)
>  (:use clojure-csv.core))
>
> (defn process-file
>  "Process csv file and prints first item in every row"
>  [file-name]
>  (let [data (slurp file-name)
>        rows (parse-csv data)]
>    (dorun (map #(println (first %)) rows
>
> (defn -main [& args]
>  (with-command-line args
>    "Get csv file name"
>    [[file-name ".csv file name" 1]]
>    (println "file-name:", file-name)
>    (if file-name
>        (process-file "resultset.csv")
>        (process-file file-name
>
> is it reasonable to write a recursive function that takes the lazy
> sequence -- rows -- (returned from clojure-csv) and column numbers and
> recurses until the appropriate column number is reached, or is it
> better to build up a long series of expressions that would pull the
> columns out?
>
> For example, I believe I can pull out the second column by specifying
> (first (next rows)), but it would look pretty awful to create a long
> enough expression to get the 6th column in.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Loading a huge graph

2012-04-12 Thread Alex Robbins
Yeah, sounds like it could definitely be a memory issue. This is one
part where the JVM works a lot differently than I expected coming from
a python background.

Everybody may already know this, but the JVM only takes 64mb for the
heap by default. You'll get an out of memory error if your program
uses more than that. In contrast, python just takes all the memory it
needs. As your program gets closer to the JVM memory limit it'll spend
more and more time doing garbage collection, with less and less real
work getting done. You can pass an -Xmx flag to give java access to
more memory, which many (most?) programs do.


On Thu, Apr 12, 2012 at 5:22 PM, David Nolen  wrote:
> How much memory do Python & Go consume when you do this? Are you giving the
> JVM enough memory?
>
>
> On Thu, Apr 12, 2012 at 6:17 PM, László Török  wrote:
>>
>> Hi,
>>
>> I'm trying figure out how to load a huge file that contains some 800k pair
>> of integers (two integers per line) which represent edges of a directed
>> graph.
>>
>> So if the ith line has x and y, it means that there is an edge between x
>> and y vertex in the graph.
>>
>> The goal is to load it in an array of arrays representation, where the kth
>> array contains all the nodes, where there is a directed edge from the kth
>> node to those nodes.
>>
>> I've attempted multiple variants of with-open reader and line-seq etc. but
>> almost always ended up with OutMemoryException or sg VERY slow.
>>
>> My latest attempt that also does not work on the large input:
>>
>> (defn load-graph [input-f]
>>   (with-open [rdr (io/reader input-f)]
>>     (->> (line-seq rdr)
>>         (map (fn [row]
>>                (let [[v1str v2str] (str/split row #"\s")]
>>                    [ (Integer/parseInt v1str) (Integer/parseInt v2str) ]))
>>   )
>>         (reduce (fn [G [v1 v2]]
>>                   (if-let [vs (get G v1)]
>>                     (update-in G [v1] #(conj % v2))
>>                     (assoc G v1 [v2])))  { }  
>>
>> I'm getting a bit frustrated as there are Python, Go implementations that
>> load the graph in less the 5 seconds.
>>
>> What am I doing wrong?
>>
>> Thanks
>>
>> --
>> László Török
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Assuring avalaibility of ring web apps

2012-05-16 Thread Alex Robbins
You could probably use upstart or supervisord.

Upstart is available if you are on a newish ubuntu system (and maybe others?).
Supervisord could run on most linuxes I think, although I've only ever
used it on ubuntu.

Hope that helps,
Alex

On Wed, May 16, 2012 at 2:13 AM, Murtaza Husain
 wrote:
> Hi,
>
> Currently I am using noir for developing web apps. I am deploying them on an
> EC2 server, by running lein trampoline run in the project directory. I also
> have a nginx in front of it which is handling serving of static files.
>
> I have never had the apps crash, however recently on app was down on one
> fine morning, which was easily restarted ueing lein. How do others monitor
> and deploy clojure web apps in production? Is there a lein plugin which can
> monitor and restart the app if it is down ( such as nodejs's forever) ?
>
> Thanks,
> Murtaza
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: If Using nth Creates Dependencies, What Is The Best Way To Pull Data Elements From A Sequence

2012-05-18 Thread Alex Robbins
I wonder if the idea was that you are better off using a hash-map and
key lookups so the positions are labeled. Some csv libs return a seq
of maps where the keys are the column header values. That way you'd be
able to select data by name instead of a sometimes arbitrary position.

Just a guess.
Alex

On Fri, May 18, 2012 at 10:05 AM, David Nolen  wrote:
> There's nothing wrong with using nth far as I know.
>
>
> On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus 
> wrote:
>>
>> In our production development environment, we perform a lot of data
>> transfers between diverse systems, and most of those transfers involve
>> comma-delimited (.csv) data. So my first small Clojure applications have
>> revolved around the clojure-csv library.
>>
>> While learning Clojure I have seen the comment that using nth "stinks",
>> because it creates dependencies. Wanting to do things in a Clojure way, I
>> have a question.
>>
>> If I need to extract a number of columns of a spreadsheet to minimize the
>> dataset and this happens as the application is reading in and initializing
>> its data, what should I use to extract those columns other than nth? And, if
>> I use a series first and rest, isn't that also positional?
>>
>> I've thought of ways to re-position the data initially, so comparison
>> columns between two different spreadsheets that have one unique key column
>> in common would be accessible with first, for example. However, I would
>> still need to get at that data by column in order to reposition it, hence
>> the need for nth.
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Core.logic, dynamically generated goals

2012-05-19 Thread Alex Robbins
I'm just getting started with logic programming, and it is entirely
possible I'm just approaching this incorrectly.

Is it possible to use dynamically generated goals in run* ?

For example,

(defrel grade person course g)
(fact grade 'Bob 'Algebra 'B)
(fact grade 'Bob 'Art 'C)
(fact grade 'John 'Algebra 'A)
(fact grade 'John 'Art 'A)
(fact grade 'Ricky 'Algebra 'D)
(fact grade 'Ricky 'Art 'A)

(def knowledge
  {:course 'Algebra :g 'B})

(defn generate-goals [knowledge]
  (map
(fn [{:keys [course g]}] (list 'grade 'person course g))
knowledge))

I want to do something like this (but valid clojure):
(run* [person]
  ~@(generate-goals knowledge))

It should give me back a list of people who match my current
knowledge. If I have more knowledge about the person, it will generate
more conditions, less knowledge fewer conditions. However, since run*
and run are macros, I can't apply them to a list. I can't splice in
because I'm not in a quotes list. Any ideas?

Thanks!

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Core.logic, dynamically generated goals

2012-05-19 Thread Alex Robbins
Hmm, I didn't explain it very well. What if I had more knowledge?
Maybe I knew two grades sometimes. That could cut down on the list of
possible students (assuming there are more than the three in my
example).

How could I write a function that worked for both of these cases?
(matches [{:course 'Algebra :g 'B}])
(matches [{:course 'Algebra :g 'B} {:course 'Art :g 'C}])


On Sat, May 19, 2012 at 2:02 PM, David Nolen  wrote:
> I don't think you need to generate goals for something as straightforward as
> this:
>
> (defrel grade person course g)
> (fact grade 'Bob 'Algebra 'B)
> (fact grade 'Bob 'Art 'C)
> (fact grade 'John 'Algebra 'A)
> (fact grade 'John 'Art 'A)
> (fact grade 'Ricky 'Algebra 'D)
> (fact grade 'Ricky 'Art 'A)
>
> (defn matches [{:keys [course g]}]
>   (run* [q]
>     (fresh [p]
>       (grade p course g)
>       (== q [p course g]
>
> (matches {:course 'Algebra :g 'B})
>
> On Sat, May 19, 2012 at 2:12 PM, Alex Robbins
>  wrote:
>>
>> I'm just getting started with logic programming, and it is entirely
>> possible I'm just approaching this incorrectly.
>>
>> Is it possible to use dynamically generated goals in run* ?
>>
>> For example,
>>
>> (defrel grade person course g)
>> (fact grade 'Bob 'Algebra 'B)
>> (fact grade 'Bob 'Art 'C)
>> (fact grade 'John 'Algebra 'A)
>> (fact grade 'John 'Art 'A)
>> (fact grade 'Ricky 'Algebra 'D)
>> (fact grade 'Ricky 'Art 'A)
>>
>> (def knowledge
>>  {:course 'Algebra :g 'B})
>>
>> (defn generate-goals [knowledge]
>>  (map
>>    (fn [{:keys [course g]}] (list 'grade 'person course g))
>>    knowledge))
>>
>> I want to do something like this (but valid clojure):
>> (run* [person]
>>  ~@(generate-goals knowledge))
>>
>> It should give me back a list of people who match my current
>> knowledge. If I have more knowledge about the person, it will generate
>> more conditions, less knowledge fewer conditions. However, since run*
>> and run are macros, I can't apply them to a list. I can't splice in
>> because I'm not in a quotes list. Any ideas?
>>
>> Thanks!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Core.logic, dynamically generated goals

2012-05-19 Thread Alex Robbins
Oh, so instead of trying to unroll my requirements into a bunch of
conditions, just make a single condition function that checks through
the list. That helps a lot!

Thanks!
Alex

On Sat, May 19, 2012 at 2:11 PM, Jason Jackson  wrote:
> Are you trying to see if a person meets multiple requirements? Here's how:
>
>
>
> (defrel grade person course g)
> (fact grade 'Bob 'Algebra 'B)
> (fact grade 'Bob 'Art 'C)
> (fact grade 'John 'Algebra 'A)
> (fact grade 'John 'Art 'A)
> (fact grade 'Ricky 'Algebra 'D)
> (fact grade 'Ricky 'Art 'A)
>
> (defn meets-requirements [person [k & nowledge]]
>   (if-let [{:keys [course g]} k]
>     (all
>      (grade person course g)
>      (meets-requirements person nowledge))
>     succeed))
>
>
> #_ (run* [person]
>      (meets-requirements
>       person
>       [{:course 'Algebra :g 'B}
>        {:course 'Art :g 'C}]))
>
>
> On Saturday, 19 May 2012 15:07:47 UTC-4, Alex Robbins wrote:
>>
>> Hmm, I didn't explain it very well. What if I had more knowledge?
>> Maybe I knew two grades sometimes. That could cut down on the list of
>> possible students (assuming there are more than the three in my
>> example).
>>
>> How could I write a function that worked for both of these cases?
>> (matches [{:course 'Algebra :g 'B}])
>> (matches [{:course 'Algebra :g 'B} {:course 'Art :g 'C}])
>>
>>
>> On Sat, May 19, 2012 at 2:02 PM, David Nolen 
>> wrote:
>> > I don't think you need to generate goals for something as
>> > straightforward as
>> > this:
>> >
>> > (defrel grade person course g)
>> > (fact grade 'Bob 'Algebra 'B)
>> > (fact grade 'Bob 'Art 'C)
>> > (fact grade 'John 'Algebra 'A)
>> > (fact grade 'John 'Art 'A)
>> > (fact grade 'Ricky 'Algebra 'D)
>> > (fact grade 'Ricky 'Art 'A)
>> >
>> > (defn matches [{:keys [course g]}]
>> >   (run* [q]
>> >     (fresh [p]
>> >       (grade p course g)
>> >       (== q [p course g]
>> >
>> > (matches {:course 'Algebra :g 'B})
>> >
>> > On Sat, May 19, 2012 at 2:12 PM, Alex Robbins
>> >  wrote:
>> >>
>> >> I'm just getting started with logic programming, and it is entirely
>> >> possible I'm just approaching this incorrectly.
>> >>
>> >> Is it possible to use dynamically generated goals in run* ?
>> >>
>> >> For example,
>> >>
>> >> (defrel grade person course g)
>> >> (fact grade 'Bob 'Algebra 'B)
>> >> (fact grade 'Bob 'Art 'C)
>> >> (fact grade 'John 'Algebra 'A)
>> >> (fact grade 'John 'Art 'A)
>> >> (fact grade 'Ricky 'Algebra 'D)
>> >> (fact grade 'Ricky 'Art 'A)
>> >>
>> >> (def knowledge
>> >>  {:course 'Algebra :g 'B})
>> >>
>> >> (defn generate-goals [knowledge]
>> >>  (map
>> >>    (fn [{:keys [course g]}] (list 'grade 'person course g))
>> >>    knowledge))
>> >>
>> >> I want to do something like this (but valid clojure):
>> >> (run* [person]
>> >>  ~@(generate-goals knowledge))
>> >>
>> >> It should give me back a list of people who match my current
>> >> knowledge. If I have more knowledge about the person, it will generate
>> >> more conditions, less knowledge fewer conditions. However, since run*
>> >> and run are macros, I can't apply them to a list. I can't splice in
>> >> because I'm not in a quotes list. Any ideas?
>> >>
>> >> Thanks!
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Clojure" group.
>> >> To post to this group, send email to clojure@googlegroups.com
>> >> Note that posts from new members are moderated - please be patient with
>> >> your first post.
>> >> To unsubscribe from this group, send email to
>> >> clojure+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/clojure?hl=en
>> >
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Clojure" group.
>> > To post to this group, send email to clojure@googlegroups.com
>> > Note that posts from new members are moderated - please be patient with
>> > your
>> > first post.
>> > To unsubscribe from this group, send email to
>> > clojure+unsubscr...@googlegroups.com
>> > For more options, visit this group at
>> > http://groups.google.com/group/clojure?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Core.logic, dynamically generated goals

2012-05-22 Thread Alex Robbins
Good to think about. Thanks Brian.

On Sun, May 20, 2012 at 5:44 PM, Brian Marick  wrote:
>
> On May 19, 2012, at 1:12 PM, Alex Robbins wrote:
>
>> Is it possible to use dynamically generated goals in run* ?
>
> You might want to think macros. I have written macros that tweak `run` bodies 
> for various purposes:
>
>
>        `(~@runner [~qvar]
>                 (l/fresh [~(gensyms :procedure) ~(gensyms :animal)]
>                          (procedure-applies-to-animal-o ~(gensyms :procedure)
>                                                         ~(gensyms :animal))
>                          (l/== ~(gensyms :procedure) ~procedure)
>                          (l/== ~(gensyms :animal) ~animal)
>                          ~setter))]
>
>
> -
> Brian Marick, Artisanal Labrador
> Now working at http://path11.com
> Contract programming in Ruby and Clojure
> Occasional consulting on Agile
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: critique my code!

2012-07-06 Thread Alex Robbins
Reading through your code, many of your functions have large cond or
condp clauses. Sometimes those can be replaced with multimethods. They
let you define all the options to a choice as separate functions, and
add extra choices later without touching the rest of your code. At the
same time, they add a little bit of indirection, which may not be
worth the additional confusion for a simple cond.

http://clojure.org/multimethods

Alex

On Thu, Jul 5, 2012 at 1:26 PM, William Morgan  wrote:
> Hello all,
>
> Clojure n00b here. As a means of learning Clojure, I wrote a little
> Mustache templating code. (I do realize Clojure libraries for this exist
> already.)
>
> The last time I wrote any Lisp was a decade ago, so any general advice
> would be appreciated. Here's the gist:
>
>   https://gist.github.com/3054620
>
> Example usage is at the bottom.
>
> In addition to a general "am I doing this right?", some style/community
> preference questions came up:
>
> - What's a good way to signal errors (e.g. parse errors)? I found the
> slingshot library, which seemed to provide nice exceptions, but I'm a
> little leery of pulling in a non-stdlib library just for this. Is
> there a more standard way to signal exceptional circumstances?
>
> - Once a template is compiled, rather than relying on structs or hashes
> to provide data, I used dynamic bindings. So you can provide a
> function that fills in the data. Is this a good idea or a bad one?
> (See example 1.)
>
> - A lot of the iteration code seemed to naturally take the form:
> (defn whatever [args]
>   (let [new-args
>  (some complicated stuff)]
> (recur new-args)))
>
> So all the complicated code is indented 9 spaces from the function
> declaration right off the bat. Is there a better way to structure
> things so that I get a little more breathing room?
>
> - I'm happy developing from the repl, but debugging was often painful.
> I would get a one-line error message about e.g. an arity mismatch,
> with no stacktrace and no way to tell where the error occurred. I see
> references to third-party tracing libraries. Is this what people use?
> Is there really no stacktrace available when you an error happens?
>
> Thanks for any advice!
>
> --
> William
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2012-08-09 Thread Alex Robbins
The group hasn't met in a long time, but we were actually talking
about some kind of a relaunch last week. We were hoping some Clojure
interest had increased in the DFW area since we tried last time.
Anyone else in the DFW area interested in getting together?

Alex

On Tue, Aug 7, 2012 at 11:09 AM, VishK  wrote:
> Hello,
>
> Is this group still meeting? (When?)
> Would be interested in attending the next one if possible to meet
> like-minded folks.
>
> Regards
> Vish
> (https://github.com/vishk)
>
> On Wednesday, June 15, 2011 11:02:10 AM UTC-5, ch...@rubedoinc.com wrote:
>>
>> Everyone, sorry for late notice but are meeting tonight is cancelled
>> due to some scheduling conflicts. We have another meeting set for
>>
>> Tuesday June 28th 630PM - 900PM @
>>
>> Rubedo, inc.
>> 14580 Beltwood Pkwy E Suite 103
>> Farmers Branch, TX 75244
>>
>> See you then !
>>
>> On Jun 3, 9:46 am, "ch...@rubedoinc.com"  wrote:
>> > Meeting is growing strong!  We will be looking at some group projects
>> > to take on that we can use to stretch our clojure skills.  Make the
>> > next meeting to be a part of it!
>> >
>> > Wednesday June 15th 630PM - 900PM @
>> >
>> > Rubedo, inc.
>> > 14580 Beltwood Pkwy E Suite 103
>> > Farmers Branch, TX 75244
>> >
>> > (wifi available)
>> >
>> > On May 20, 11:08 am, "ch...@rubedoinc.com" 
>> > wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Thanks everyone for attending.  Our next meeting is scheduled for
>> >
>> > > Our next meeting is scheduled for May 31th 630PM - 900PM @
>> >
>> > > Rubedo, inc.
>> > > 14580 Beltwood Pkwy E Suite 103
>> > > Farmers Branch, TX 75244
>> > > (wifi available)
>> >
>> > > there will be pizza and sodas, so bring yourclojurequestions and
>> > > your appetite.  Reply in this thread if you will be attending so that
>> > > I can get a head count for pizza.
>> >
>> > > On May 16, 12:41 pm, "ch...@rubedoinc.com" 
>> > > wrote:
>> >
>> > > > Meeting tonight, see you there !
>> >
>> > > > Our next meeting is scheduled for May 16th 630PM - 900PM @
>> >
>> > > > Rubedo, inc.
>> > > > 14580 Beltwood Pkwy E Suite 103
>> > > > Farmers Branch, TX 75244
>> > > > (wifi available)
>> >
>> > > > On May 4, 11:20 am, "ch...@rubedoinc.com" 
>> > > > wrote:
>> >
>> > > > > Thanks everyone for attending the first meeting.  It was great to
>> > > > > talk
>> > > > >clojurewith some like minded people who are excited by the
>> > > > > possibilities !
>> >
>> > > > > Our next meeting is scheduled for May 16th 630PM - 900PM @
>> >
>> > > > > Rubedo, inc.
>> > > > > 14580 Beltwood Pkwy E Suite 103
>> > > > > Farmers Branch, TX 75244
>> > > > > (wifi available)
>> >
>> > > > > Right now, we will try for two meetings each month. In the
>> > > > > beginning,
>> > > > > these will be mostly hack nights. As the group matures, we will
>> > > > > look
>> > > > > at doing presentations / talks onClojure.
>> > > > > As most of the group is relatively new toClojure, we decided to
>> > > > > start
>> > > > > with thehttp://projecteuler.net/problemsasaway to get familiar
>> > > > > with the language and have some common solutions to discuss.
>> >
>> > > > > At our next meeting, we will bring our solutions for problems 1-10
>> > > > > and
>> > > > > discuss how we went about solving them.
>> >
>> > > > > All are welcome !
>> >
>> > > > > On Apr 25, 9:08 pm, Christopher Redinger 
>> > > > > wrote:
>> >
>> > > > > > ch...@rubedoinc.com wrote:
>> > > > > > > Rubedo, inc.
>> > > > > > > 14580 Beltwood Pkwy E Suite 103
>> > > > > > > Farmers Branch, TX 75244
>> >
>> > > > > > > When: 630PM Monday May 2nd
>> > > > > > > What:ClojureInterest Group
>> > > > > > > Topic: 1st meeting, what our goals are, and how to take over
>> > > > > > > the world
>> > > > > > > withClojure
>> >
>> > > > > > Hi Chris! Thanks for offering to host the group. I've added a
>> > > > > > link to
>> > > > > > this thread on theClojureUser Groups
>> > > > > > page:http://dev.clojure.org/display/community/Clojure+User+Groups.
>> > > > > > Hopefully to help people who might be looking. We can update the
>> > > > > > link
>> > > > > > to something with a little more information if you get a page
>> > > > > > set up
>> > > > > > somewhere.
>> >
>> > > > > > Also, if you choose to go through Meetup, they have provided us
>> > > > > > with a
>> > > > > > code that gives a discount toClojuregroups. See the above page
>> > > > > > for
>> > > > > > more information.
>> >
>> > > > > > Thanks again, and let me know if there's anythingClojure/core
>> > > > > > can
>> > > > > > help you out with!
>> >
>> > > > > > 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 posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com

Re: Clojure group in DFW area

2012-08-28 Thread Alex Robbins
Hey guys, sorry about the radio silence. Unofficially, it looks like
the meetup will be:

Third Wednesday of the month, 6:30-8:30 PM
At Improving Enterprises in Addison, just off the Dallas North Tollway

We are also working on getting a meetup group set up so that there
will be a place to get info other than the global clojure mailing
list.

Chris or I will let you know when things are finalized.

I'm excited to see a local clojure group forming!

Alex

On Tue, Aug 28, 2012 at 8:45 AM, gblack  wrote:
> Did you guys settle on having more meetings? The Farmers Branch location
> works for me.
>
> On Thursday, March 10, 2011 7:28:10 AM UTC-6, Alex Robbins wrote:
>>
>> Anyone else in the north Dallas area using/interested in Clojure? I'd
>> love to get together.
>>
>> Alex
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Clojure group in DFW area

2012-08-29 Thread Alex Robbins
Ok, the meetup group is setup and the meetup location is confirmed.

http://www.meetup.com/DFW-Clojure/

I look forward to seeing everyone in person.

Alex

On Tue, Aug 28, 2012 at 1:00 PM, Alex Robbins
 wrote:
> Hey guys, sorry about the radio silence. Unofficially, it looks like
> the meetup will be:
>
> Third Wednesday of the month, 6:30-8:30 PM
> At Improving Enterprises in Addison, just off the Dallas North Tollway
>
> We are also working on getting a meetup group set up so that there
> will be a place to get info other than the global clojure mailing
> list.
>
> Chris or I will let you know when things are finalized.
>
> I'm excited to see a local clojure group forming!
>
> Alex
>
> On Tue, Aug 28, 2012 at 8:45 AM, gblack  wrote:
>> Did you guys settle on having more meetings? The Farmers Branch location
>> works for me.
>>
>> On Thursday, March 10, 2011 7:28:10 AM UTC-6, Alex Robbins wrote:
>>>
>>> Anyone else in the north Dallas area using/interested in Clojure? I'd
>>> love to get together.
>>>
>>> Alex
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Clojure" group.
>> To post to this group, send email to clojure@googlegroups.com
>> Note that posts from new members are moderated - please be patient with your
>> first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Alternative structures to arrays?

2011-12-22 Thread Alex Robbins
Hey Simon,

Incanter is a clojure data processing platform (R-like). http://incanter.org/
It wraps Parallel Colt, a Java matrix math/linear algebra library,
among other things. Parallel colt provides sparse matrices, and I
*guess* they are exposed in the clojure wrapper.
https://sites.google.com/site/piotrwendykier/software/parallelcolt

Alex

On Thu, Dec 22, 2011 at 4:11 AM, Simon Holgate  wrote:
> Hi,
>
> I'm pretty new to functional languages but really love Clojure.
>
> My work typically involves multi-dimensional arrays of data. I'm an
> oceanographer and typically use things like sea surface height data
> from satellite altimetry on 1/3 degree 2D grids with maybe 800 time
> slices (=O(5E8 data points)). For this I use Fortran and R.
>
> I realise that I can just use Java arrays, but is this the best
> approach? I could implement lists of lists but I'm guessing that the
> performance would be worse?
>
> What other structures could I use? The arrays are typically 30% sparse
> (since only 70% of the planet is ocean). This means arrays are
> wasteful in many ways.
>
> Similar issues must apply in image processing so are there ways of
> handling such data in functional structures?
>
> Thanks for any advice,
>
> Simon
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Must a page refresh fire an init event?

2012-01-22 Thread Alex Robbins
Not sure what you are planning to do with the data, but you shouldn't
trust data in cookies. It is trivial to edit the cookies in your
browser using something like FireCookie [1]   Cookies are fine for
storing form info, or something like that, but you wouldn't want to
store something like admin=true in the cookie.

Alex

[1] https://addons.mozilla.org/en-US/firefox/addon/firecookie/

On Sat, Jan 21, 2012 at 10:16 PM, Folcon  wrote:
> Thanks a lot Daniel, much appreciated!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Clojure group in DFW area

2011-03-10 Thread Alex Robbins
Anyone else in the north Dallas area using/interested in Clojure? I'd
love to get together.

Alex

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Clojure Meetup at Pycon

2011-03-10 Thread Alex Robbins
Hey guys,

I'm pretty new to Clojure and loving it. I'm going to be at Pycon (the
Python conference in Atlanta) this weekend. Any other clojurers going
to be there? Want to meet and chat about our two favorite languages?

Alex

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en