Re: testing platform , midje or specjl ?

2014-11-15 Thread Steven Degutis
There's more to it than just style differences. Some of them have capabilities and offer functionality that others don't have, which may push you towards using such a one if you have a real need for those features. Disclaimer: I'm one of the maintainers of Speclj, which we use it at work, and

Re: Is Clojure a language for growth?

2014-08-21 Thread Steven Degutis
Call me old-fashioned, but this seems like not the best way to approach choosing a language. It should be chosen pragmatically, by considering what works best for the task at hand, not because of arbitrarily set rules, and never because a language is new and exciting. Good programming techniques

Re: new ClojureDocs experiment

2013-09-11 Thread Steven Degutis
? Is it impossible for users to add support for new Clojure versions? If so, who runs it? Could it be turned over to the community? On 11 September 2013 17:55, Steven Degutis sbde...@gmail.com wrote: All very good points. One of my assumptions was that people don't use wikis simply because it's

Re: new ClojureDocs experiment

2013-09-10 Thread Steven Degutis
google like clojure parse, but that'a a different effort, I suppose.. keep up! воскресенье, 8 сентября 2013 г., 12:07:33 UTC+4 пользователь Steven Degutis написал: ClojureDocs.org is pretty awesome, I think I use it nearly every day, especially for the Examples and See Also sections

Re: new ClojureDocs experiment

2013-09-10 Thread Steven Degutis
. Thanks for your feedback. -Steven On Wed, Sep 11, 2013 at 12:39 AM, John Gabriele jmg3...@gmail.com wrote: On Sunday, September 8, 2013 4:07:33 AM UTC-4, Steven Degutis wrote: https://github.com/sdegutis/clojuredocs/wiki {snip} Thoughts? Hi Steven, This is a nice piece of work

Re: [ANN] clojuretip.herokuapp.com

2013-09-08 Thread Steven Degutis
input, green is value, pink is output. If you don't wanna add it, no big deal. Cheers, '(Devin Walters) On Sep 7, 2013, at 12:09 PM, Steven Degutis sbdegu...@gmail.com wrote: Yesterday in #clojure: TimMc To get your random API learnin' of the day, just run: (- clojure.core quote the-ns ns

new ClojureDocs experiment

2013-09-08 Thread Steven Degutis
ClojureDocs.org is pretty awesome, I think I use it nearly every day, especially for the Examples and See Also sections. But sometimes I've been wishing it had Clojure 1.5.1 support. For example, I think as- and cond- would have been easier for me to pick up had there been entries for these with

Re: Clojure and freelancing

2013-09-08 Thread Steven Degutis
The next greenfield website someone contracts me to do, I will almost definitely choose Clojure. I'd use Ring, Compojure, Hiccup, Garden, Datomic if a DB is needed, and possibly ClojureScript, and possibly a few things from libnoir. On Sun, Sep 8, 2013 at 3:31 PM, Mateusz Dobek

[ANN] clojuretip.herokuapp.com

2013-09-07 Thread Steven Degutis
Yesterday in #clojure: TimMc To get your random API learnin' of the day, just run: (- clojure.core quote the-ns ns-publics seq rand-nth val meta ((juxt :name :doc)) (map println) dorun) Awesome, right? So I put a lil web wrapper around it and uploaded it to clojuretip.herokuapp.com and

Re: preference and implications of using as- vs let

2013-08-19 Thread Steven Degutis
I personally think the only place as- should be used is inside other threading macros. When it's used anywhere else, the name-goes-second ordering feels wrong and very awkward. On Mon, Aug 19, 2013 at 9:58 AM, Jay Fields j...@jayfields.com wrote: In the past, I've written code like the

Re: Current state of the art in Web deployment?

2013-08-18 Thread Steven Degutis
I don't think there is a such thing as a real server. Any process that listens on a TCP port and talks HTTP is a legitimate server, regardless of when or how it's started up. Upstart is a fine way to run your server and make sure it's restarted if it dies. It's not hacky or unconventional, in

Re: vec to map with consolidated vals

2013-08-17 Thread Steven Degutis
At first I came up with the same solution as your second one. But I couldn't help but feel that it wasn't descriptive enough. It felt too incidental-complexity-ish. To me, (into {} the-map) seems mostly right. But obviously it would just squash the values you need. So I figured it should just be

Re: vec to map with consolidated vals

2013-08-17 Thread Steven Degutis
)) {} a) ;; = {:b 2, :a 4} -Steven On Saturday, August 17, 2013 3:40:23 AM UTC-5, Steven Degutis wrote: At first I came up with the same solution as your second one. But I couldn't help but feel that it wasn't descriptive enough. It felt too incidental-complexity-ish. To me

Re: vec to map with consolidated vals

2013-08-17 Thread Steven Degutis
(maybe even more readable): (apply merge-with + (map (fn [[k v]] {k v}) the-map)) -Steven On Sat, Aug 17, 2013 at 3:42 AM, Steven Degutis sbdegu...@gmail.com wrote: Wow. Sorry for the awful formatting. Re-pasting it from Google Groups (instead of email) to fix it: (def a [[:a 1] [:b 2] [:a 3

Re: vec to map with consolidated vals

2013-08-17 Thread Steven Degutis
fashion. WDYT? On Sat, Aug 17, 2013 at 10:42 AM, Steven Degutis sbdegu...@gmail.comwrote: Wow. Sorry for the awful formatting. Re-pasting it from Google Groups (instead of email) to fix it: (def a [[:a 1] [:b 2] [:a 3]]) (defn add-maybe [ nums] (- nums (remove nil

Re: Do you like the Clojure syntax?

2013-08-16 Thread Steven Degutis
Great point Tim. When I first realized that most problems and solutions are language-agnostic, I started downplaying the importance of syntax. But now I think they're like apples and oranges. Sure, semantics and syntax live together, but one's not more important than the other. They're both

Re: Do you like the Clojure syntax?

2013-08-13 Thread Steven Degutis
That isn't universally true. For me it was the opposite: this syntax made it easier for my brain to process than any other language, even when I was first learning it. Maybe my brain is diabetic and just can't handle syntactic sugar. But I bet I'm not the only person like this. On Tue, Aug 13,

Re: Do you like the Clojure syntax?

2013-08-12 Thread Steven Degutis
I love Clojure's syntax, and not because of macros. I love it because it's both extremely consistent and extremely simple. Just some quick examples: - In Ruby, blocks use || for param lists and functions use (). In Clojure it's always the same. - In Ruby if you pass a block argument to a

Re: Do you like the Clojure syntax?

2013-08-12 Thread Steven Degutis
I also like Clojure's syntax because it shows me the structure of my function more clearly than does the imperative code I've written in other languages. My functions always turn out in either pyramids or triangles or walls. Each function's shape indicates its nature very visually, including

Re: IDE feature

2013-08-08 Thread Steven Degutis
The vast majority of people who have tried paredit prefer using it, your reaction is very rare. So this is as far from YMMV as you can get. On Wed, Aug 7, 2013 at 9:58 PM, Lee Spector lspec...@hampshire.edu wrote: On Aug 7, 2013, at 2:06 PM, Norman Richards wrote: Structural editing, like

Re: Can we please deprecate the :use directive ?

2013-08-05 Thread Steven Degutis
The only time I've seen :as lead to ugly code was when it was in a DSL that would probably have been nicer to use if it was a data-based DSL like Hiccup rather than code-based. On Mon, Aug 5, 2013 at 3:40 AM, Korny Sietsma ko...@sietsma.com wrote: Agree that :use should be deprecated, mostly

Re: [ANN] Nightcode, an IDE for Clojure and Java

2013-08-02 Thread Steven Degutis
Excited to try it out! Thanks for your hard work :) On Fri, Aug 2, 2013 at 8:03 AM, Zach Oakes zsoa...@gmail.com wrote: I’ve been working on a simple IDE for the past few months. It started as an attempt to add Leiningen integration to Clooj, but eventually I decided to start a new project

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
I would be willing to pay /really/ good money for an editor that has a few features: * paredit or better * proper syntax highlighting of clojure (emacs rocks at this, ST2 sucks at it) * ST2-quality fuzzy matching at every completionable prompt (emacs's ido-mode is alright but ST2's is way better)

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
omitting the right result until I type more characters. -Steven On Sat, Jul 27, 2013 at 11:02 AM, Bastien bastiengue...@gmail.com wrote: Hi Steven, Steven Degutis sbdegu...@gmail.com writes: * ST2-quality fuzzy matching at every completionable prompt (emacs's ido-mode is alright but ST2's

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
Oh one more feature I forgot: * a file-tree browser (like ST2's) -Steven On Sat, Jul 27, 2013 at 10:57 AM, Steven Degutis sbdegu...@gmail.comwrote: I would be willing to pay /really/ good money for an editor that has a few features: * paredit or better * proper syntax highlighting

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
, at 11:57 AM, Steven Degutis sbdegu...@gmail.com wrote: I would be willing to pay /really/ good money for an editor that has a few features: * paredit or better * proper syntax highlighting of clojure (emacs rocks at this, ST2 sucks at it) * ST2-quality fuzzy matching at every completionable

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
There were two plugins. The 1st link on Google is to and older one that points to the new one I sent you. Did you try the new one? Yes. See this part of his readmehttps://github.com/odyssomay/paredit#implementation-statuswhere he says it's missing some important functions. Plus see this issue

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
Whoa whoa whoa, hold on. I'm not talking crap. It's awesome that you're releasing OSS for us to use. And just because it isn't ready for me to use in production yet, that's not saying anything bad about it. And I opened the issue on paredit trusting that either you'll either eventually get to it

Re: Interest in a commercial IDE for Clojure?

2013-07-27 Thread Steven Degutis
tab-bar * by splits I mean how vim and emacs can split panes within a single tab or window -Steven On Sat, Jul 27, 2013 at 2:43 PM, Laurent PETIT laurent.pe...@gmail.comwrote: I can't resist, it's too tempting, so ;-) : 2013/7/27 Steven Degutis sbdegu...@gmail.com: I would be willing to pay

Re: is intellij idea a good ide for clojure development?

2013-07-26 Thread Steven Degutis
+1 On Fri, Jul 26, 2013 at 9:56 AM, Timothy Baldridge tbaldri...@gmail.comwrote: +1 to Charlie. If I ever went back to Python development I would plop down whatever the going rate is for PyCharm (InteliJ Python IDE), that thing is an awesome piece of tech. There are very few times I've been

Re: Ring: How to auto-redirect URI's missing trailing slash

2013-07-26 Thread Steven Degutis
Yeah, that sounds possible. I'll take a shot at it. -Steven On Fri, Jul 26, 2013 at 1:55 PM, Brian Craft craft.br...@gmail.com wrote: Other (not clojure) frameworks do this with middleware that redirects to the url + slash when a route lookup fails, and the url has no trailing slash. Is

Re: Can we please deprecate the :use directive ?

2013-07-25 Thread Steven Degutis
I think that's a good thing. I like to think of (ns) like a magical thing that has to be at the head of every file. It gives me consistency and predictability. It lets me not have to think. I almost wish it were just some magical required thing. -Steven On Thu, Jul 25, 2013 at 10:43 AM, Gary

Re: Idiomatic use of records?

2013-07-25 Thread Steven Degutis
+1 to that interpretation On Thu, Jul 25, 2013 at 12:03 PM, Baishampayan Ghose b.gh...@gmail.comwrote: The second form in both the cases. The first ones IMHO are implementation detail. ~BG On Thu, Jul 25, 2013 at 9:48 PM, Sean Corfield seancorfi...@gmail.com wrote: I tend to use plain

Re: Ring: How to auto-redirect URI's missing trailing slash

2013-07-25 Thread Steven Degutis
There's some problems with acting as if /foo and /foo/ are the same thing. I read about it years ago but don't have the link handy. Basically it messes with caching and other things, and so it's better to just redirect to the canonical one. So if /foo/ is the right one, make /foo redirect to it. I

Re: [ANN] verily, non-magic testing lib

2013-07-24 Thread Steven Degutis
It's been brought to my attention that this project is an utter waste of time, brings no real improvement over the existing solutions, and was wrought in complete arrogance. So I've deleted the project. Sorry for wasting a thread on this. On Wed, Jul 24, 2013 at 12:30 AM, Steven Degutis sbdegu

Re: [ANN] verily, non-magic testing lib

2013-07-24 Thread Steven Degutis
:31 AM, Meikel Brandmeyer (kotarak) m...@kotka.dewrote: Am Mittwoch, 24. Juli 2013 08:14:15 UTC+2 schrieb Steven Degutis: It's been brought to my attention that this project is an utter waste of time, brings no real improvement over the existing solutions, and was wrought in complete

Re: [ANN] verily, non-magic testing lib

2013-07-24 Thread Steven Degutis
style (more functional) (defn test-1 [] (let [foo (get-foo)] [(expect empty? foo) (expect awesome? foo)])) On Wed, Jul 24, 2013 at 8:16 AM, Steven Degutis sbdegu...@gmail.com wrote: First, the goal of Verily was not the same as Test2. It wasn't intended to unify any existing test

Re: [ANN] verily, non-magic testing lib

2013-07-24 Thread Steven Degutis
duelin.mark...@gmail.comwrote: I've never tried it, but I like the idea of test fns returning their results. On Jul 24, 2013 8:30 AM, Steven Degutis sbdegu...@gmail.com wrote: Also, I've been considering having a non-side-effecty way of returning test results. What do people think? It would

Re: [ANN] verily, non-magic testing lib

2013-07-24 Thread Steven Degutis
carry over to around-all fixtures, because if several tests belong to multiple around-all fixtures, and not the same ones either, they would have to be run multiple times. On Wed, Jul 24, 2013 at 10:17 AM, Steven Degutis sbdegu...@gmail.comwrote: The vast majority of my tests look like: do some

Re: Can we please deprecate the :use directive ?

2013-07-24 Thread Steven Degutis
If our votes count for anything, then I'd like to add +1 for getting rid of :use, and strongly discouraging :refer :all. On Wed, Jul 24, 2013 at 11:16 AM, Alex Baranosky alexander.barano...@gmail.com wrote: +1 for scary compiler deprecation warning for 1.6.0, then removing :use in the 1.7.0

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Steven Degutis
For much the same reason, I've been using :require with :as and a one-or-two-letter alias, so I can do x/whatever. Generally works well. On Tue, Jul 23, 2013 at 1:38 PM, Lee Spector lspec...@hampshire.edu wrote: On Jul 23, 2013, at 2:27 PM, Gary Trakhman wrote: We should scour

[ANN] verily, non-magic testing lib

2013-07-23 Thread Steven Degutis
https://github.com/evanescence/verily Verily is a new testing lib with a few goals: - Build off existing Clojure concepts (functions, vars, etc) - Be as functional/immutable as possible - Be easy to use from terminal or REPL - Have composable pieces that are easy to swap out -

Re: [ANN] verily, non-magic testing lib

2013-07-23 Thread Steven Degutis
Whoops. Looks like I didn't check the namespace well enough, there's already a lib called verily. (Sorry Justin.) Will think up a new name soon. On Tue, Jul 23, 2013 at 11:55 PM, Steven Degutis sbdegu...@gmail.comwrote: https://github.com/evanescence/verily Verily is a new testing lib

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-21 Thread Steven Degutis
Lately, a lot of people are moving away from dynamic blog engines like Wordpress, and starting to use static blog generators like Jekyll. You may want to consider this route instead. I'm sure a plugin system would still be relevant and useful for a static blog generator. -Steven On Thu, Jul

Re: Interest in a Full Featured Clojure Blog Engine

2013-07-21 Thread Steven Degutis
, Steven Degutis sbdegu...@gmail.com wrote: Lately, a lot of people are moving away from dynamic blog engines like Wordpress, and starting to use static blog generators like Jekyll. You may want to consider this route instead. I'm sure a plugin system would still be relevant and useful

Re: [ANN] REST in Peace 0.1.0

2013-07-19 Thread Steven Degutis
https://github.com/sebastiansen/rip On Fri, Jul 19, 2013 at 7:49 PM, Jeremy Heiler jeremyhei...@gmail.comwrote: Got a link? On July 19, 2013 at 8:37:13 PM, Sebastian Rojas ( sebastian.rojas.viva...@gmail.com) wrote: A library for RESTFul applications built on top of Compojure, includes

Re: easier way to write not not?

2013-07-17 Thread Steven Degutis
user= (mapv #(not (not %)) [1 :a true false nil]) [true true true false false] user= (mapv boolean [1 :a true false nil]) [true true true false false] On Wed, Jul 17, 2013 at 3:45 AM, Kelker Ryan theinter...@yandex.com wrote: Have you tried the complement form? 17.07.2013, 15:12, JvJ

Re: -- macro proposal

2013-07-17 Thread Steven Degutis
In that case, shouldn't it be named let- instead of as-? On Wed, Jul 17, 2013 at 12:03 PM, David Nolen dnolen.li...@gmail.comwrote: While the macro can do what the original enhancement request suggested that's not the actual problem the new threading macros were intended to solve. They were

Re: OAuth2

2013-07-16 Thread Steven Degutis
I heard good things about friend https://github.com/cemerick/friend, so I tried to use it for OpenID (to sign-in with Google). But I couldn't figure out how, so I just used openid4java https://code.google.com/p/openid4java/ . On Mon, Jul 15, 2013 at 8:57 PM, Plínio Balduino

Re: [ANN]: Introducing lein-try

2013-07-13 Thread Steven Degutis
It looks like you're not supposed to quote the arguments you pass it. On Sat, Jul 13, 2013 at 11:27 AM, Brandon Bloom brandon.d.bl...@gmail.comwrote: This is awesome! I've totally wanted this. Unfortunately, I can't get it to work... ~ $ lein try '[clj-time 0.5.1]' nREPL server started on

Re: [ANN]: Introducing lein-try

2013-07-13 Thread Steven Degutis
arguments. Not all of us use Bash... square brackets are used for special patterns in Zsh. Without quotes, the arguments are being interpreted in this way: lein try '[clj-time' '0.5.1]' That seems to work, but it a bit awkward to use. On Sat, Jul 13, 2013 at 12:44 PM, Steven Degutis sbdegu

Re: [ANN] CHP Web Framework Documentation Update

2013-07-11 Thread Steven Degutis
I am. On Wed, Jul 10, 2013 at 2:59 PM, Kelker Ryan theinter...@yandex.com wrote: Thanks. It's currently alpha and there's a lot more to come. Are you by chance the same Degutis from 8th light? 11.07.2013, 02:12, Steven Degutis sbdegu...@gmail.com: Wow. You obviously put a lot of work

Re: [ANN] CHP Web Framework Documentation Update

2013-07-10 Thread Steven Degutis
Wow. You obviously put a lot of work into this. And it looks extremely well documented! On Wed, Jul 10, 2013 at 5:36 AM, Kelker Ryan theinter...@yandex.com wrote: ClojureHomePage is a Clojure Web Framework *CHTML, Routing, and Sessions * - CHTML

Re: [ANN] 16th tutorial of the modern-cljs series

2013-07-08 Thread Steven Degutis
Thanks for this series Mimmo, I found it the other day and it helped me to get my feet wet with Cljs. I was wondering, is there any reason you chose Domina instead of Dommy? On Mon, Jul 8, 2013 at 10:01 AM, Giacomo Cosenza mimmo.cose...@gmail.comwrote: Hi all, I just pushed the 16th tutorial

Re: New CSS library - Garden

2013-07-07 Thread Steven Degutis
in ideas surrounding grid systems. Thanks, Joel On Jul 6, 2013, at 7:41 PM, Steven Degutis sbdegu...@gmail.com wrote: Right, I understand how defrule works. But I actually do have 27 [i.e. O(n)] distinct rules, so it's not a feasible solution. Because when I write CSS, I only style domain

Re: New CSS library - Garden

2013-07-06 Thread Steven Degutis
So far, I really like Garden. There's one thing though that's making it difficult. It's hard to see that nested rules are nested. ;; hard to see nesting[:footer {:color red :background-color blue} [:a {:color green}]] ;; much easier(:footer {:color red :background-color

Re: New CSS library - Garden

2013-07-06 Thread Steven Degutis
on ordering. So it's something to watch out for if you have the same habit. -Steven On Sat, Jul 6, 2013 at 8:58 AM, Steven Degutis sbdegu...@gmail.com wrote: So far, I really like Garden. There's one thing though that's making it difficult. It's hard to see that nested rules are nested. ;; hard

Re: New CSS library - Garden

2013-07-06 Thread Steven Degutis
, Joel On Jul 6, 2013, at 6:58 AM, Steven Degutis sbdegu...@gmail.com wrote: So far, I really like Garden. There's one thing though that's making it difficult. It's hard to see that nested rules are nested. ;; hard to see nesting[:footer {:color red :background-color blue

Re: Multiple args: opts map vs inline arguments

2013-06-18 Thread Steven Degutis
+10 If the library provided (this :arg style) just to be a convenience for me, then that purpose completely backfired the moment I had to type (apply your-fn (apply concat my-args)). That unnecessary dance was the inspiration for me buying applyconcat.com (empty; site ideas welcome). -Steven

Feedback request: Spec for meta testing-lib

2013-06-17 Thread Steven Degutis
The goal is to have an extensible, simple core for a testing lib, where all other Clojure testing libs can be rewritten as extensions to it. A common motivation is that people want to mix and match aspects/features of different testing lib. But really, each person wants this for different

Re: In what OS do you code?

2013-06-14 Thread Steven Degutis
OS X on an MBP. The only thing I liked about linux was xmonad. So I wrote a window manager for OS X called AppGrid https://github.com/sdegutis/grs (download the ziphttps://github.com/sdegutis/grs/raw/master/AppGrid.zip) that does everything I want a window manager to do on OS X. And then I made

Re: Database migrations

2013-06-14 Thread Steven Degutis
Phil uses this really cool trick: https://github.com/technomancy/syme/blob/master/src/syme/db.clj#L66-L119 The benefit is that your migrations are just Clojure functions. No messing around with files or timestamps or whatever. Dead simple. I hope someone extracts it into a lib with tests around

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-13 Thread Steven Degutis
for very, very easily manipulated and generated. On Wed, Jun 12, 2013 at 12:13 PM, Steven Degutis sbdegu...@gmail.comwrote: There's been some discussion about how nesting should work. It should probably be part of the spec, in a flexible and non-intrusive way. Then we would consider a flat suite

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-12 Thread Steven Degutis
, Steven Degutis sbdegu...@gmail.com wrote: Test2 is a new testing lib for Clojure, where the power is its simplicity, extensibility, and a SPEChttps://github.com/evanescence/test2/blob/master/SPEC.md much like Ring's. Github: https://github.com/evanescence/test2 Some background: It came

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
Beautiful! On Tue, Jun 11, 2013 at 1:57 AM, Cedric Greevey cgree...@gmail.com wrote: You pass not the Discoverer's results to the Runner, but the Discoverer itself, which the Runner then invokes at need, possibly more than once. On Tue, Jun 11, 2013 at 1:35 AM, Steven Degutis sbdegu

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
11, 2013 at 1:35 AM, Steven Degutis sbdegu...@gmail.comwrote: Originally we had Runner split into Discoverer and Runner, but I had to combine them both in Runner again so that we can have an autorunner. Imagine that you've started your autorunner at the command line, and you create a new test

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
: On Tuesday, June 11, 2013 12:39:59 AM UTC-4, Steven Degutis wrote: It's pretty frustrating that I, a regular old Clojure user who likes writing tests, can't mix and match tools from existing testing libraries. Seriously, there's 4 major ones (clojure.test, speclj, midje, expectations) and they each

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
You're right. I'm sorry for doing that. From now on I'll make a bigger point of it to be more correct. On Tue, Jun 11, 2013 at 10:18 AM, Jay Fields j...@jayfields.com wrote: On Tuesday, June 11, 2013 11:11:23 AM UTC-4, Steven Degutis wrote: Jay, [elided] That's the issue I'm trying

Re: expectations documentation

2013-06-11 Thread Steven Degutis
Looks really neat! I'm glad you're switching away from the blog-style documentation, I found that harder to follow. And sorry I hadn't said so sooner, my mistake :) On Tue, Jun 11, 2013 at 1:39 PM, Jay Fields j...@jayfields.com wrote: expectations* has always had a decent amount of

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
AM, Steven Degutis sbdegu...@gmail.com wrote: Test2 is a new testing lib for Clojure, where the power is its simplicity, extensibility, and a SPEChttps://github.com/evanescence/test2/blob/master/SPEC.md much like Ring's. Github: https://github.com/evanescence/test2 Some background: It came

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
Good idea. Thanks guys, I'll do that. On Tue, Jun 11, 2013 at 3:18 PM, Brandon Bloom brandon.d.bl...@gmail.comwrote: Maybe it makes sense to separate out the 'common testing interop' effort from the 'another test framework' effort, so it can can get off the ground? I agree with this.

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
As of this moment, it's usable for writing test suites. The readme is a lot cleaner now: https://github.com/evanescence/test2 The spec is a lot shoerter now: https://github.com/evanescence/test2/blob/master/SPEC.md There's a working auto-runner extension:

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
* -- I am not aware of any use cases that would need transactions. In any case the choice of reference type probably belongs in the impl, not the spec. Good luck with this! Stu On Sat, Jun 8, 2013 at 4:14 PM, Steven Degutis sbdegu...@gmail.comwrote: Test2 is a new testing lib for Clojure, where

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-11 Thread Steven Degutis
://github.com/evanescence/test2/blob/master/src/test2/default/runner.clj On Tue, Jun 11, 2013 at 5:12 PM, Michał Marczyk michal.marc...@gmail.comwrote: On 11 June 2013 14:42, Steven Degutis sbdegu...@gmail.com wrote: Timothy, Brandon, Cedric, et al.: Separating out the Discoverer from

[ANN] if-and

2013-06-10 Thread Steven Degutis
Sometimes I've wanted a function that takes a value and a bunch of tests, and returns it if it passes every test, otherwise nil. So I wrote if-and: (if-and foo string? #(.startsWith % f) #(.contains % oo)) ;; = foo (if-and foo string? #(.startsWith % f)

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-10 Thread Steven Degutis
for any help extending expectations, and anyone who chooses to use expectations should feel free to contact me with any suggestions. * https://github.com/jaycfields/expectations ** https://github.com/jaycfields/expectations/commits/master On Saturday, June 8, 2013 11:14:42 AM UTC-4, Steven

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-10 Thread Steven Degutis
:42 AM UTC-4, Steven Degutis wrote: Test2 is a new testing lib for Clojure, where the power is its simplicity, extensibility, and a SPEChttps://github.com/evanescence/test2/blob/master/SPEC.md much like Ring's. Github: https://github.com/**evanescence/test2https://github.com/evanescence

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
that would need transactions. In any case the choice of reference type probably belongs in the impl, not the spec. Good luck with this! Stu On Sat, Jun 8, 2013 at 4:14 PM, Steven Degutis sbde...@gmail.comjavascript: wrote: Test2 is a new testing lib for Clojure, where the power is its

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
. * https://github.com/jaycfields/expectations ** https://github.com/jaycfields/expectations/commits/master On Saturday, June 8, 2013 11:14:42 AM UTC-4, Steven Degutis wrote: Test2 is a new testing lib for Clojure, where the power is its simplicity, extensibility, and a SPEChttps://github.com

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
, Steven Degutis wrote: Jay (and others), First of all, you must understand where test2 came from. It started as a bunch of people** in #clojure discussing what we'd change about clojure.test if we could. We realized we can't change clojure.test because (1) this would break backwards

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
Are there any JIRA tickets open against clojure.test? That would seem to be a good place to start. Good idea, that helps for gathering data about use-cases. If someone (with a signed CA on file) wants to step up and maintain clojure.test, even tho' it's part of core Clojure right

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
Is this still current? http://clojure.github.io/clojure-contrib/ On Sunday, June 9, 2013 8:19:15 PM UTC-5, Sean Corfield wrote: On Sun, Jun 9, 2013 at 5:50 PM, Steven Degutis sbde...@gmail.comjavascript: wrote: Changing clojure.test seems like the wrong way to go. Being attached

Re: [pre-ANN] test2, the last Clojure testing framework

2013-06-09 Thread Steven Degutis
Then I apologize. I must have conflated what you said with what someone else said. My mistake. On Sunday, June 9, 2013 8:38:22 PM UTC-5, Jay Fields wrote: On Sunday, June 9, 2013 8:50:46 PM UTC-4, Steven Degutis wrote: But that's what I meant, that he's proposing we start with his lib

[pre-ANN] test2, the last Clojure testing framework

2013-06-08 Thread Steven Degutis
Test2 is a new testing lib for Clojure, where the power is its simplicity, extensibility, and a SPEChttps://github.com/evanescence/test2/blob/master/SPEC.md much like Ring's. Github: https://github.com/evanescence/test2 Some background: It came out of

Any alternatives for these two ugly patterns?

2013-05-25 Thread Steven Degutis
There are two patterns I find in my code that I'm still unhappy with but I don't know how to clean up. The first is: (if (:attr obj) obj (assoc obj :attr something)) I'm basically saying, give this hash-map an attribute if it doesn't already have it. And just return the thing with an attribute,

Re: filter on sets ... [reward: me face palming]

2013-05-25 Thread Steven Degutis
Cedric's answer is best: either (filter :dh-uuid some-list) or (remove :dh-uuid some-list) depending on which list you want. On Sat, May 25, 2013 at 7:10 AM, Cedric Greevey cgree...@gmail.com wrote: Why not just (filter (complement :dh-uuid) seq-of-maps)? Or (remove :dh-uuid seq-of-maps)

Re: Any alternatives for these two ugly patterns?

2013-05-25 Thread Steven Degutis
Seems like I almost want arbitrary or-like behavior, like only-sometimes-evaluation of a conditional form. I feel like this could have something to do with lazy sequences, since technically has the option of never getting evaluated. We could use map. Will test some things out in nrepl.el and

Re: Any alternatives for these two ugly patterns?

2013-05-25 Thread Steven Degutis
Another solution, repeats itself slightly less: (assoc obj :key (or (:key obj) (something-else-with-side-effects-maybe?))) Not sure I like it much better than the first one. But I usually prefer not writing my own macros/functions when I can avoid it, so it has that plus. On Sat,

Designing database API, seeking advice for field types

2013-05-25 Thread Steven Degutis
I'm writing a generic database API, and would love some advice on how you think it should handle field types. Let me give a little background. My project's goal is to offer a single, simplified, Clojure-friendly API for most of your data persistence needs, so that: - you can easily use it in

Re: filter on sets ... [reward: me face palming]

2013-05-25 Thread Steven Degutis
Wouldn't (remove :dh-uuid (apply concat (map find-records query-parts))) be better? On Sat, May 25, 2013 at 1:09 PM, Mond Ray mondraym...@gmail.com wrote: Bingo: user= (filter (complement :dh-uuid) (apply concat (map find-records query-parts))) ({:a2p-id 3, :dh-uuid nil} {:a2p-id 3,

defmethod/require race condition

2013-05-09 Thread Steven Degutis
In my app, sometimes a file containing a defmethod hasn't been required yet by the time some other function calls the multi-method. So naturally it throws an exception. But later, as the app continues to run, the file containing the proper defmethod eventually gets required by another file. Then

Re: New Forms Library

2013-05-04 Thread Steven Degutis
Got a link? On Sat, May 4, 2013 at 10:57 PM, mike mikemeta...@gmail.com wrote: I created a forms library called Formula over the last week or so, and I wanted to share it with the community. The library uses hiccup underneath and includes it's own validation (which is optional). It's built

Re: [ANN] stories - bdd lib for clojure

2013-05-03 Thread Steven Degutis
The repo has moved. There are two locations (so far): https://github.com/otfrom/stories https://github.com/meteorfox/stories On Thu, May 2, 2013 at 5:50 PM, Steven Degutis sbdegu...@gmail.com wrote: Here, it's back up for a while: https://github.com/sdegutis/stories Please fork it. -Steven

More idiomatic way to use map like this?

2013-05-02 Thread Steven Degutis
Given pseudo-code (Ruby-ish): due = 100 cards = cards.map do |card| card.applied_balance = max(0, due - card.balance) due -= card.applied_balance Notice how due changes at each turn, and each successive item in cards sees the change. What's an idiomatic way to do this in Clojure without

Re: [ANN] stories - bdd lib for clojure

2013-05-02 Thread Steven Degutis
Yeah I deleted it. Realized it's not worth anyone's time. On Thu, May 2, 2013 at 4:44 PM, Jeroen van Dijk jeroentjevand...@gmail.com wrote: Sounds interesting. The repo seems to be unavailable on Github, is that correct? Jeroen On Sun, Apr 28, 2013 at 3:52 PM, Steven Degutis sbdegu

Re: [ANN] stories - bdd lib for clojure

2013-05-02 Thread Steven Degutis
Here, it's back up for a while: https://github.com/sdegutis/stories Please fork it. -Steven On Thu, May 2, 2013 at 5:36 PM, Paulo Suzart paulosuz...@gmail.com wrote: Wow. Got surprised with 404! Sad. On Thursday, May 2, 2013 6:58:57 PM UTC-3, Steven Degutis wrote: Yeah I deleted

Re: More idiomatic way to use map like this?

2013-05-02 Thread Steven Degutis
datasets by using the Clojure 5 Reducers library. On Friday, May 3, 2013 5:21:46 AM UTC+8, Steven Degutis wrote: Given pseudo-code (Ruby-ish): due = 100 cards = cards.map do |card| card.applied_balance = max(0, due - card.balance) due -= card.applied_balance Notice how due changes

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

2013-05-01 Thread Steven Degutis
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 #(%)

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

2013-05-01 Thread Steven Degutis
-3] [data-1 data-2 data-3])) (though that might realize elements past the first non-nil one if vectors produce chunked seqs). On Wed, May 1, 2013 at 12:13 PM, Steven Degutis sbdegu...@gmail.com wrote: I've found myself writing a validator function. It has a list of internal

Re: [ANN] stories - bdd lib for clojure

2013-04-28 Thread Steven Degutis
Great, thanks. Now it's at https://clojars.org/stories -Steven On Sun, Apr 28, 2013 at 1:25 AM, Michael Klishin michael.s.klis...@gmail.com wrote: 2013/4/28 Steven Degutis sbdegu...@gmail.com I'd put it on Clojars but I can't really figure out how to deal with this gpg stuff. Seems way

  1   2   >