Re: namespace scope

2015-06-05 Thread Andy Fingerhut
A single file can define multiple namespaces, and a single namespace's definition can be spread across multiple files. However, I have not seen either of those things done very often in Clojure projects. By far the most common approach is to have one file per namespace, and each namespace

Re: How to include ... in project.clj

2015-06-05 Thread skuro
There's something fishy going on with that dependency: the SHA1 hash of the artifact doesn't match with the expected one coming from the repo. Try adding a :checksum :ignore to shapshots-repo in project.clj, it should solve your issue. HTH, c. Il giorno giovedì 4 giugno 2015 18:07:58

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
Hi Colin, I'm a huge fan of Cursive, and have heard you discuss the challenge of earning back your investment, so I'm completely on your side on that. This idea is for people who wish to dual-license their tech, but can't see a simple way to have both a GPL-based community and a revenue stream.

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Magnus Therning
On 5 June 2015 at 13:16, Colin Fleming colin.mailingl...@gmail.com wrote: I'm the author of Cursive, which I'm planning to sell and which will be (mostly) closed source. What I don't see here is what would be the advantage to me in using this license? I'm not releasing closed source because I'm

[ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
An old-school C++ dev and I have started an initiative to combine the best of Open Source with a limited commercial license. It's not a new idea - MySQL creator Monty Widenius thought of something less viral in 2013 [1]. The Time-Bombed Open License [2] is the commercial side of a dual-licensed

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Colin Fleming
I'm the author of Cursive, which I'm planning to sell and which will be (mostly) closed source. What I don't see here is what would be the advantage to me in using this license? I'm not releasing closed source because I'm evil, but because I want Cursive development to be sustainable so I can

[ANN] unilog 0.7.5: logging should be easy

2015-06-05 Thread Pierre-Yves Ritschard
Hi #clojure, I just released unilog 0.7.5 (previously logconfig). Unilog provides a map-based configuration interface for logback, which will be picked up by clojure.tools.logging, log4j, JuL and commons-logging - the standard JVM logging mechanisms. If you're writing executables (daemons,

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Franklin M. Siler
On Jun 5, 2015, at 0517, Fergal Byrne fergalbyrnedub...@gmail.com wrote: An old-school C++ dev and I have started an initiative to combine the best of Open Source with a limited commercial license. It's not a new idea - MySQL creator Monty Widenius thought of something less viral in 2013

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Luc Prefontaine
I agree. I can't see how you can build a business model out of this. We already lower the cost for our customers by using open source as much as possible. Luc P. Sent from my iPhone On Jun 5, 2015, at 12:16, Colin Fleming colin.mailingl...@gmail.com wrote: I'm the author of Cursive,

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
Hi Frank, That's a great post (and the Mailpile post is also a great discussion of the topic), thanks for sharing. The GPL already has a clause which allows the owner (and downstream user) to defer, for 12 months, the full obligations of GPL - see this guy's take:

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Daniel Kersten
To chime in on why would I do this: Lots of companies already are successfully built on open source, so I don't buy the *but then I can't make money* argument - at least, not as a blanket statement . There are two models I've commonly seen used: The direct Red Hat model (open source software,

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
Great comments, Dan. Cognitect has the advantage that they already own the Open Source tech used by Datomic, so they can internally commercially license that to themselves. You can't do this (sell commercial products) including GPL software you don't own to begin with. This idea is an attempt to

Re: I created a new macro if-let-all

2015-06-05 Thread Fluid Dynamics
On Friday, June 5, 2015 at 1:53:07 AM UTC-4, crocket wrote: Ouch, I didn't write. Gary Fredericks wrote it. I simply modified his if-let-all macro a little bit. On Friday, June 5, 2015 at 2:44:22 PM UTC+9, crocket wrote: The macro below is called if-let-all. (defmacro if-let-all

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Franklin M. Siler
On Jun 5, 2015, at 0711, Fergal Byrne fergalbyrnedub...@gmail.com wrote: The GPL already has a clause which allows the owner (and downstream user) to defer, for 12 months, the full obligations of GPL - see this guy's take:

Re: ANN: ClojureScript 0.0-3308, fixes enhancements

2015-06-05 Thread Max Gonzih
On Monday, June 1, 2015 at 8:47:51 PM UTC+2, David Nolen wrote: ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript Leiningen dependency information:     [org.clojure/clojurescript 0.0-3308]

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
LOL. That would require they be sold to Oracle, Magnus. That. Seems. Unlikely. On Fri, Jun 5, 2015 at 3:37 PM, Magnus Therning mag...@therning.org wrote: On Fri, Jun 05, 2015 at 12:46:54PM +, Daniel Kersten wrote: [..] This is likely only relevant to early stage startups, however. An

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Magnus Therning
On Fri, Jun 05, 2015 at 12:46:54PM +, Daniel Kersten wrote: [..] This is likely only relevant to early stage startups, however. An established company like Cognitect likely doesn't have this issue and therefore has more flexibility in how they offer their products. They can, however, be

Re: multi-arity functions with macros

2015-06-05 Thread Phillip Lord
Fluid Dynamics a2093...@trbvm.com writes: (defn ^:private form-with-arity[n] ;; left as an exercise for the reader ) (defmacro ^:private m-default-ontology `(defn default-ontology ~@(map form-with-arity (range 1 10 (m-default-ontology) Or am I missing something

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Phillip Lord
Fergal Byrne fergalbyrnedub...@gmail.com writes: That's a great post (and the Mailpile post is also a great discussion of the topic), thanks for sharing. The GPL already has a clause which allows the owner (and downstream user) to defer, for 12 months, the full obligations of GPL It really

Re: A one line macro that looks right, but just won't work.

2015-06-05 Thread Ben Wolfson
On Fri, Jun 5, 2015 at 4:53 AM, Jordan Schatz jor...@noionlabs.com wrote: Hello! So here is a short example: - ;; Story: ;; I have an EDN data structure from an external API ;;

Re: multi-arity functions with macros

2015-06-05 Thread Phillip Lord
Interesting -- it's certainly more generic than the solution that I have worked up. I'd need to add something for the variadic fall-back call. Thank you! Francis Avila fav...@breezeehr.com writes: This is exactly the approach to take: a macro which expands to a defn with all your arities

Re: [BUG?] loading Clojure source files from various data sources (classloading)

2015-06-05 Thread Henrik Heine
Alex - I had no problem doing what you describe. Both namespaces load fine. I use an URLClassLoader to mimic what I think your code is doing. I triped over a few things: - first I got the alter-root wrong doing it from Java. - I had to load clojure.lang.RT before clojure.lang.Compiler - otherwise

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Andy Fingerhut
I don't have any comment on the license, except to say that the escrow approach suggested by Franklin Siler seems like it should address this concern, and I believe has been frequently used by large companies wanting a small don't-know-how-long-they'll-exist company to escrow their source code in

A one line macro that looks right, but just won't work.

2015-06-05 Thread Jordan Schatz
Hello! So here is a short example: - ;; Story: ;; I have an EDN data structure from an external API ;; I extract several patterns of records from it. ;; I would like to treat the

Help with data structure transformation

2015-06-05 Thread gvim
I have a YeSQL query: (get-signs {:em emails}) ;; emails is a vector of email address strings ... which produces this list of maps: ( {:email a...@gmail.com, :sign Scorpio, :planet Mercury, :surname Blogs, :first_name Joe} {:email a...@gmail.com, :sign Leo, :planet Moon, :surname Blogs,

Re: [ANN] Time-Bombed Open License - thoughts?

2015-06-05 Thread Fergal Byrne
That phrase (giving it back) refers to improvements to or extensions of the codebase made by commercial licensees. The GPL has a clause which allows improvers' and extenders to delay reintroducing their extensions by up to 12 months for this very reason. Apart from having some more

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Laurens Van Houtven
Hi Dru, I think you're looking for: http://clojure.org/reader hth lvh On Fri, Jun 5, 2015 at 3:05 PM, Dru Sellers d...@drusellers.com wrote: Trying to google what #' means is tricky to say the least. Is there a good name for these that I can google to read up on them? Thank you. -d

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Ben Smith-Mannschott
try googling for clojure reader macros. Dru Sellers mailto:d...@drusellers.com June 5, 2015 at 22:05via Postbox https://www.postbox-inc.com/?utm_source=emailutm_medium=sumlinkutm_campaign=reach Trying to google what #' means is tricky to say the least. Is there a good name for these that I

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Dru Sellers
perfect, thank you. On Fri, Jun 5, 2015 at 3:07 PM, Laurens Van Houtven _...@lvh.io wrote: Hi Dru, I think you're looking for: http://clojure.org/reader hth lvh On Fri, Jun 5, 2015 at 3:05 PM, Dru Sellers d...@drusellers.com wrote: Trying to google what #' means is tricky to say the

Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Dru Sellers
Trying to google what #' means is tricky to say the least. Is there a good name for these that I can google to read up on them? Thank you. -d -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Help with data structure transformation

2015-06-05 Thread James Reeves
Perhaps something like: (defn planet-sign-map [signs] (into {} (map (juxt :planet :sign) signs))) (defn extract-planet-signs [signs] (for [[email signs] (group-by :email signs)] {:email email, :signs (planet-sign-map signs)})) (defn find-planet-signs [emails] (extract-planet-signs

Re: Is there a cheet sheet for some of the pure symbolic functions like #'

2015-06-05 Thread Franklin M. Siler
On Jun 5, 2015, at 1505, Dru Sellers d...@drusellers.com wrote: Trying to google what #' means is tricky to say the least. Is there a good name for these that I can google to read up on them? Good article. https://yobriefca.se/blog/2014/05/19/the-weird-and-wonderful-characters-of-clojure/

namespace :as vs :require

2015-06-05 Thread Todd Stout
What is considered idiomatic when using :as and :require in your namespace declarations? I understand that :as will require everything in the namespace to use symbol/fn syntax. The :require usage will mandate more verbose symbol references in the ns declaration, but your code in that namespace

Re: Help with data structure transformation

2015-06-05 Thread gvim
I must re-read Clojure Programming (O'Reilly) in that case as I don't recall the authors mentioning this kind of destructuring. gvim On 06/06/2015 03:33, Fluid Dynamics wrote: On Friday, June 5, 2015 at 10:07:05 PM UTC-4, g vim wrote: That works but I missed this possibility because I'm

Re: Help with data structure transformation

2015-06-05 Thread gvim
That works but I missed this possibility because I'm still not clear how: (group-by :email signs) which produces a map of the form: {a...@gmail.com [{:email a...@gmail.com, :sign Cancer, :planet Mars, :surname Blogs, :first_name Joe} . ]} can be destructured with the

Re: Help with data structure transformation

2015-06-05 Thread Fluid Dynamics
On Friday, June 5, 2015 at 10:07:05 PM UTC-4, g vim wrote: That works but I missed this possibility because I'm still not clear how: (group-by :email signs) which produces a map of the form: {a...@gmail.com javascript: [{:email a...@gmail.com javascript:, :sign Cancer,

Re: Help with data structure transformation

2015-06-05 Thread gvim
Yes, I'm fine with the concept. Just can't remember coming across it in the textbooks but maybe I wasn't paying attention :) gvim On 06/06/2015 04:08, Sean Corfield wrote: It’s because if you treat a hash map as a sequence — as `for` does — you get a sequence of pairs (key/value — map

Re: Help with data structure transformation

2015-06-05 Thread Sean Corfield
Page 84 is where it shows that maps are a sequence of pairs. The destructuring in James's code is on vectors -- the pairs in the sequence. Hope that helps? Sean On Fri, Jun 5, 2015 at 8:11 PM, gvim gvi...@gmail.com wrote: Yes, I'm fine with the concept. Just can't remember coming across it

Re: Handling exceptions with Reader Conditionals

2015-06-05 Thread Daniel Compton
Looking closer, it looks like this was carried over from the Feature Expressions design page, and related to the inability in ClojureScript to catch all. However with http://dev.clojure.org/jira/browse/CLJS-661, it is now possible to use :default, so it looks like this comment no longer applies.

Re: Help with data structure transformation

2015-06-05 Thread Sean Corfield
It’s because if you treat a hash map as a sequence — as `for` does — you get a sequence of pairs (key/value — map entries): (seq {:a 1 :b 2}) ;;= ([:a 1] [:b 2]) Does that help? Sean On Jun 5, 2015, at 7:41 PM, gvim gvi...@gmail.com wrote: I must re-read Clojure

Re: namespace :as vs :require

2015-06-05 Thread Sean Corfield
I think you mean :as vs :refer? The consensus is that using :as makes it easier to see where each symbol comes from when you're reading the code -- and avoids name conflicts between functions in different namespaces. If you use :refer, you lose that visibility. However, there are some symbols