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 mkw5...@gmail.com wrote: I have a web service that uses Korma for

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 txrev...@gmail.com wrote: Hi, I'm trying

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,

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 king...@gmail.com 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

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 jimpil1...@gmail.com wrote: On 28/02/13 14:34, Marko Topolnik wrote: So it

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

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 sbdegu...@gmail.com wrote: I've found myself writing a validator function. It has a

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

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

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 mark.rathw...@gmail.com wrote: I just wrapped their java client library:

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 jmgim...@gmail.com wrote: I was asking because my timings show that the

Re: Clojure group in DFW area

2011-04-14 Thread Alex Robbins
mrjohngar...@gmail.com 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 alexander.j.robb...@gmail.com wrote: Anyone else in the north

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

Re: Clojure group in DFW area

2011-04-20 Thread Alex Robbins
 am, Alex Robbins alexander.j.robb...@gmail.com 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

Re: Clojure group in DFW area

2011-04-25 Thread Alex Robbins
goals of the group, etc. On Mar 10, 8:28 am, Alex Robbins alexander.j.robb...@gmail.com 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

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 octopusgrab...@gmail.com wrote: Given

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

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 mark.engelb...@gmail.com wrote: Scala's approach to comprehensions is to automatically produce the same type of collection that is

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 aav...@me.com 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

Re: library or namespace doc helper function from repl?

2011-06-02 Thread Alex Robbins
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 james.es...@gmail.com wrote: You could also try (find-doc libname) On Thu, Jun 2, 2011 at 11:15 AM, Alex

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

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

Re: Clojure group in DFW area

2012-08-28 Thread Alex Robbins
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

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 alexander.j.robb...@gmail.com wrote: Hey guys, sorry about the radio silence. Unofficially

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.

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

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

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

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.

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

Re: Core.logic, dynamically generated goals

2012-05-19 Thread Alex Robbins
:g 'B}) On Sat, May 19, 2012 at 2:12 PM, Alex Robbins alexander.j.robb...@gmail.com 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

Re: Core.logic, dynamically generated goals

2012-05-19 Thread Alex Robbins
, 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

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 mar...@exampler.com 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

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 j...@crossleys.org 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.