bind
is in some Clojure library somewhere? I don't know what the #{a} m
part is supposed to do, but it doesn't quite look like legal Clojure destructuring syntax.
i just made that as a macro specifically so that would work as destructuring syntax
it just expands to {:keys [a]}
Hi all, I work at a rather large company that has very restrictive rules about open source which unfortunately makes it impossible for me (and my colleagues) to use Clojure in production. For some reason the legal departement has decided that it is not ok to distribute software to customers that contain components licensed under EPL 1.0. I am not smart and/or interested enough to understand the implications of the license but I trust Rich more than I trust the knowledge of software in our legal department so I am not arguing any change in license for Clojure. What I am wondering is if there is anyone that has been in a situation like mine and if so what I can do about it, are there any arguments that I can bring to the legals or is there some other way to tackle this? I have reached the point at which I really don’t want to continue programming using (in my view) inferior tools and if I cannot start using Clojure I might have to look around for another job. @alexmiller does Cognitect have any strategy to help or give guidance in cases like these?
@amorokh Do you have to ship the Clojure library along with your product? Can the product simply download the clojure library as part of the install on the clients site? Then you can use what ever license you like for your own product (which I assume you do anyway). If you are not distributing Clojure then its license is not an issue. Licensing is another reason to build services rather than installed products.
@jr0cket Thanks for your response! However, I am not in the position of deciding how our products are delivered so unfortunately downloading the Clojure library is not an option since we are delivering docker containers running in a very restricted environment (i.e. not internet connection). I realize that distributing the library makes the license an issue (apparently), however, legal seems to think that EDL (Eclipse Distribution License) is ok and I would really like to understand the difference here. Unfortunately I have not yet received any feedback from legal about their reasoning regarding EPL.
The EPL was chosen due to it being enterprise friendly! Seems like a mistake has been made.
Yes, that’s exactly the point, however I think that for me trying to argue with legal is a dead end, so I am looking for advice
Is it intended that s/keys always checks all keys, even when they are not explicitly mentioned in :req
or :opt
? Example: (s/def some-spec (s/keys :req [:foo/bar :bar/baz]))
Now somewhere else a spec for :example/key
is defined. Then if :example/key
is present in a map that is checked against some-spec
it is checked as well.
Yes
The docstring is quite explicit about that
Thank you, I found must have overlooked that explicit part.
I don’t think either I or Cognitect is in a position to give legal guidance. What are their objections?
I don’t know, in this big company the distance between different parts of the company is very large and the desicions regarding OSS has been defined globally but I will try to get some more detailed information
If I had to guess the policy was set based on the assumption that programmers are not experts enough to evaluate the licenses that code is released under and maybe legal aren't "experts enough to make sure that the code is all under the right license"
So if you want to make some headway, my best guess is that you should talk to legal and help them work out an approval process that works on a case by case basis.
Plus, you definitely use open source software already to some degree if you use any programming language
so they had to have done their legal due diligence at least once
Yes we sure do use open software, however so far nothing licensed under EPL 1.0 so the issue as I see it is that our lawyers have a different understanding of that particular license than the rest of the world
Hi guys, to preface this, the qn i'm asking is a coding task I need to complete to register to an event. I think I could have worked it out with Python but they listed Clojure as one of the languages so I wanted to give it a shot ... Given an array of integers, return the smallest set of indices of numbers such that they add up to a target number. You may not use the same element twice. Examples: [1,2,6,3,17,82,23,234] -> 26 Solution [3,6] [1,2,6,3,17,82,23,234] -> 40 Solution [4,6] [1,2,6,3,17,82,23,234] -> 23 Solution [6] So thus far only have the backbone of what I would want to do. So far have done sorting and filtering out the numbers that would be too high
(defn foo
([ls target] (let [new-ls (filter #(> target %)
(sort ls))]
(foo (butlast new-ls) target (last new-ls))))
([ls target sum]
(list ls target sum)))
I was thinking a naive way to solve this would be to iterate through the remaining elements from the back. In the case of 1 2 3 4 5, would 5. So there's a path where you try 4+5, 3+5, 2+5, 1+5. And if it exceeds the target you ignore it. if it is lower, and there are still elements before that you iterate through those. I'm not really sure how I can express this with maps and perhaps making use of multi arity functions for recursion
I just realised that I still need to make sure the solution is the smallest set possible .... Anyone has any thoughts or is Clojure not too great for such tasks?Sounds like you got to work out an algorithm for it first. Nothing Clojure can do before that 😝
Right I thought that naive way was kinda an algorithm but I think you got me to find something. Shall try working with that first! :)