Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-30 Thread Luc Prefontaine
We added this as part of our standard logging, not only when exceptions are raised. It does help a lot in prod... Luc P. On Dec 27, 2013, at 11:33 PM, guns wrote: On Fri 27 Dec 2013 at 11:23:22PM -0500, Lee Spector wrote: On Dec 27, 2013, at 11:18 PM, guns wrote: (defmacro

case/java interop weirdness

2013-12-30 Thread Paul Butcher
I'm sure I'm missing something very simple here, but I'm damned if I can see it. I'm trying to use the Java Rome RSS/Atom utility library from Clojure. The Rome Fetcher library defines a FeedEvent class, which among other things defines a number of static final string members:

Re: case/java interop weirdness

2013-12-30 Thread Nicola Mometto
The test clauses of case expressions are not evaluated, so that case is trying to match the symbol 'FetcherEvent/EVENT_TYPE_FEED_POLLED, not the value of FetcherEvent/EVENT_TYPE_FEED_POLLED. Paul Butcher writes: I'm sure I'm missing something very simple here, but I'm damned if I can see it.

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-30 Thread solo . levy
Will do. Once the migration is steady (that is, we have a 1.2 and 1.5 environment running concurrently), I'll write a post about the experience and how we will eventually decommission the 1.2 environment. On Tuesday, December 24, 2013 1:48:22 PM UTC-5, Sean Corfield wrote: On Tue, Dec 24,

Re: In your opinion, what's the best, and what's the worst aspects of using Clojure?

2013-12-30 Thread Timothy Washington
:pre and :post http://blog.fogus.me/2009/12/21/clojures-pre-and-post/ are great tools, but must be used at the very top of your function. You can also use assert http://clojuredocs.org/clojure_core/clojure.core/assert, at any location in your function. I've also had success with Prismatic's Schema

Re: case/java interop weirdness

2013-12-30 Thread Paul Butcher
On 30 Dec 2013, at 13:57, Nicola Mometto brobro...@gmail.com wrote: The test clauses of case expressions are not evaluated, so that case is trying to match the symbol 'FetcherEvent/EVENT_TYPE_FEED_POLLED, not the value of FetcherEvent/EVENT_TYPE_FEED_POLLED. Ah - I was aware of the

Re: Looking to migrate thousands of Clojure applications from 1.2 to 1.5.

2013-12-30 Thread solo . levy
Thanks, Alex. I agree that migrating these tiny 1.2 applications would be wasted effort as the majority won't change and will become obsolete soon anyway.The ones which will remain relevant will be easy to identify and may be worth migrating. Regarding testing, no, I have no confidence in

[ANN] Optimus asset loaders and transformations

2013-12-30 Thread Magnar Sveen
Optimus https://github.com/magnars/optimus is a Ring middleware for frontend performance optimization. In order to do its optimization, it needs to rest on a first-class asset concept in the Ring stack. So the most basic operation of Optimus is serving assets from a list, with this minimal

Re: [ANN] Optimus asset loaders and transformations

2013-12-30 Thread Magnar Sveen
Oh, if you checked out Optimus when I first announced it, here are some improvements since then: - Split strategies and optimizations so they can vary independently. - Add support for :base-path on assets for CDNs. - Add exporting of assets to disk. Also for CDNs. - Move Angular.JS

[ANN] clj-refactor.el - A few Clojure refactorings for Emacs.

2013-12-30 Thread Magnar Sveen
clj-refactor.el https://github.com/magnars/clj-refactor.el provides a set of simple refactorings for Clojure in Emacs. It doesn't tackle the hard problems, like cross-namespace renaming. Instead it gives you a little quality of life while we're waiting.

Re: is there a tutorial about working at the REPL?

2013-12-30 Thread John Mastro
On Sun, Dec 29, 2013 at 1:30 PM, larry google groups lawrencecloj...@gmail.com wrote: Thanks for that. But the app has no problem reading the schema.edn file when I start the app with: java -jar admin-1-standalone.jar So why would it have trouble reading the file when I'm in the repl? Can

Re: case/java interop weirdness

2013-12-30 Thread Cedric Greevey
To do it with case, you'd need to wrap case in a macro that expanded to `(case ~thingy ~(eval case1) ...) or something along those lines, with the evals snapping lookups like FetcherEvent/EVENT_TYPE_FEED_POLLED to the associated constants. This will have the effect of classloading the class with

[ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
Clojure contrib wrapper for JDBC. This release contains minor bug fixes compared to 0.3.0, with the main focus being an overhaul of docstrings etc to improve the auto-gen'd documentation: http://clojure.github.io/java.jdbc/ The community documentation on clojure-doc has also had a major

Re: [ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
Just found a showstopping bug in 0.3.1 - 0.3.2 will be along shortly. TIL: protocols need implementations for both Object _and_ nil to work properly in the real world... :( Sean On Mon, Dec 30, 2013 at 8:46 AM, Sean Corfield seancorfi...@gmail.com wrote: Clojure contrib wrapper for JDBC.

Re: protocols and overloading

2013-12-30 Thread Massimiliano Tomassoli
On Sunday, December 29, 2013 10:11:47 PM UTC+1, tbc++ wrote: Not mentioned in Cedric's post are two other important things: Protocols can be extended to existing types. For example: (defprotocol IType (type-as-string [x])) (extend-protocol IType String (type-as-string [x] string)

Re: [ANN] clojure.java.jdbc 0.3.1 released

2013-12-30 Thread Sean Corfield
The tests have been updated to included nil cases now so I shouldn't make the same mistake again. On Mon, Dec 30, 2013 at 8:57 AM, Sean Corfield seancorfi...@gmail.com wrote: Just found a showstopping bug in 0.3.1 - 0.3.2 will be along shortly. TIL: protocols need implementations for both

Re: protocols and overloading

2013-12-30 Thread Cedric Greevey
On Mon, Dec 30, 2013 at 12:13 PM, Massimiliano Tomassoli kiuhn...@gmail.com wrote: On Sunday, December 29, 2013 10:11:47 PM UTC+1, tbc++ wrote: Not mentioned in Cedric's post are two other important things: Protocols can be extended to existing types. For example: (defprotocol IType

Re: [ANN] clj-refactor.el - A few Clojure refactorings for Emacs.

2013-12-30 Thread Alex Baranosky
Hi Magnar, I've been using this library for maybe a month. The refactorings I use by far the most are renaming files, and threading/unthreading. Thanks for your work on this. On Mon, Dec 30, 2013 at 7:52 AM, Magnar Sveen magn...@gmail.com wrote: clj-refactor.el

Re: protocols and overloading

2013-12-30 Thread Massimiliano Tomassoli
On Sunday, December 29, 2013 11:30:16 PM UTC+1, Cedric Greevey wrote: On Sun, Dec 29, 2013 at 4:11 PM, Timothy Baldridge tbald...@gmail.comjavascript: wrote: Not mentioned in Cedric's post are two other important things: Protocols can be extended to existing types. These are important

Re: protocols and overloading

2013-12-30 Thread Cedric Greevey
On Mon, Dec 30, 2013 at 12:30 PM, Massimiliano Tomassoli kiuhn...@gmail.com wrote: On Sunday, December 29, 2013 11:30:16 PM UTC+1, Cedric Greevey wrote: On Sun, Dec 29, 2013 at 4:11 PM, Timothy Baldridge tbald...@gmail.comwrote: Not mentioned in Cedric's post are two other important things:

Re: protocols and overloading

2013-12-30 Thread Massimiliano Tomassoli
On Monday, December 30, 2013 6:27:05 PM UTC+1, Cedric Greevey wrote: On Mon, Dec 30, 2013 at 12:13 PM, Massimiliano Tomassoli kiuh...@gmail.com javascript: wrote: On Sunday, December 29, 2013 10:11:47 PM UTC+1, tbc++ wrote: Not mentioned in Cedric's post are two other important things:

Re: protocols and overloading

2013-12-30 Thread Timothy Baldridge
C# extension methods are not polymorphic either. For example, casting a object to a parent type will cause a different extension method to be run. This is not the case in normal polymorphism, or for protocols (Clojure is a dynamic language, so casting doesn't exist anyways). You're right, you can

Re: protocols and overloading

2013-12-30 Thread Massimiliano Tomassoli
On Monday, December 30, 2013 6:31:52 PM UTC+1, Cedric Greevey wrote: On Mon, Dec 30, 2013 at 12:30 PM, Massimiliano Tomassoli kiuh...@gmail.com javascript: wrote: On Sunday, December 29, 2013 11:30:16 PM UTC+1, Cedric Greevey wrote: On Sun, Dec 29, 2013 at 4:11 PM, Timothy Baldridge

Re: protocols and overloading

2013-12-30 Thread Timothy Baldridge
If the Expression Problem consists in extending classes then non-OOP languages must be excluded because they don't have classes. No offense intended, but that is an incredibly wrong statement. Let's look up the official definition of the expression problem (via wikipedia): The goal is to define

Re: protocols and overloading

2013-12-30 Thread Timothy Baldridge
Ok, so if we take that definition of classes and methods, then what I'm saying is that the expression problem can be solved much easier via single dispatch polymorphic functions, and datatypes. At that point it's just a question of where the vtable is stored. In C++ it's in the object, in Clojure,

Re: protocols and overloading

2013-12-30 Thread Massimiliano Tomassoli
On Monday, December 30, 2013 6:46:13 PM UTC+1, tbc++ wrote: And what Cedric says is correct, encapsulation is rarely a good thing, and inheritance is overrated. That's your opinion, not a fact. By saying that something is overrated you're just admitting that many people don't agree with

Re: protocols and overloading

2013-12-30 Thread Gary Trakhman
There's been a trend against overuse of inheritance, first with java removing multiple-inheritance and the various private/protected nuanced inheritances, then generally accepted advice like 'prefer composition over inheritance'. Some people were still feeling the pain, and some of those are now

[ANN] clojure.java.jdbc 0.3.2 released

2013-12-30 Thread Sean Corfield
Clojure contrib wrapper for JDBC. This release contains minor bug fixes compared to 0.3.0, with the main focus being an overhaul of docstrings etc to improve the auto-gen'd documentation: http://clojure.github.io/java.jdbc/ The community documentation on clojure-doc has also had a major

ANN: ClojureScript 0.0-2134

2013-12-30 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2134 Leiningen dependency information: [org.clojure/clojurescript 0.0-2134] Enhancements: * Add ICloneable protocol, persistent

Re: protocols and overloading

2013-12-30 Thread Cedric Greevey
On Mon, Dec 30, 2013 at 12:45 PM, Massimiliano Tomassoli kiuhn...@gmail.com wrote: On Monday, December 30, 2013 6:27:05 PM UTC+1, Cedric Greevey wrote: On Mon, Dec 30, 2013 at 12:13 PM, Massimiliano Tomassoli kiuh...@gmail.com wrote: On Sunday, December 29, 2013 10:11:47 PM UTC+1, tbc++

Re: protocols and overloading

2013-12-30 Thread Cedric Greevey
On Mon, Dec 30, 2013 at 12:59 PM, Massimiliano Tomassoli kiuhn...@gmail.com wrote: On Monday, December 30, 2013 6:31:52 PM UTC+1, Cedric Greevey wrote: On Mon, Dec 30, 2013 at 12:30 PM, Massimiliano Tomassoli kiuh...@gmail.com wrote: On Sunday, December 29, 2013 11:30:16 PM UTC+1, Cedric

Creating a CMS with Clojure(Script)

2013-12-30 Thread Leon Talbot
Hello. I'll be ready to give away 100 $ to help you build this project. leontalbot a gmail com. -- -- 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

Re: Creating a CMS with Clojure(Script)

2013-12-30 Thread Eduardo Lávaque
Thanks for the offer Leon. :) Currently I'm busy with a lot of other stuff so I can't dedicate time to this but if I ever come back to this I'll contact you. :) On Monday, December 30, 2013 3:27:27 PM UTC-6, Leon Talbot wrote: Hello. I'll be ready to give away 100 $ to help you build this

Re: protocols and overloading

2013-12-30 Thread Sean Corfield
On Mon, Dec 30, 2013 at 11:30 AM, Cedric Greevey cgree...@gmail.com wrote: On Mon, Dec 30, 2013 at 12:59 PM, Massimiliano Tomassoli A class must support encapsulation, inheritance and polymorphism. If it doesn't, then it isn't a class. The same way, a method is a function that belongs to a

ANN: ClojureScript 0.0-2138

2013-12-30 Thread David Nolen
ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2138 Leiningen dependency information: [org.clojure/clojurescript 0.0-2138] Enhancements: * Implement specify, instance level

Re: ANN: Om, a ClojureScript binding to Facebook's React

2013-12-30 Thread David Pidcock
On Thursday, December 19, 2013 11:12:12 AM UTC-8, David Nolen wrote: Enjoy, http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/ David I've been playing around with some basics. I'm still a relative n00b when it comes to functional programming, and I've never looked at

Re: ANN: Om, a ClojureScript binding to Facebook's React

2013-12-30 Thread David Nolen
From a React dev: https://www.khanacademy.org/preview/content/items/xfa03b103 https://github.com/Khan/perseus/blob/master/src/widgets/orderer.jsx#L6-L439 I'm sure this can be adapted for Om. I may write up a simpler Om example in the future. David On Tue, Dec 31, 2013 at 12:43 AM, David