Fork me on GitHub
#beginners
<
2016-04-07
>
krchia02:04:22

defrecord for the class?

plexus06:04:18

depends how you want to use. Seems like it could be just a function.

lmergen12:04:32

what's Clojure's alternative to Haskell's seq_, where you apply a function for each item in a sequence/vector and discard the results?

lmergen12:04:02

i was thinking doseq, but it appears that that also involves actually creating the sequence?

lmergen12:04:31

oh wait, no i am an idiot

lmergen12:04:37

doseq it is simple_smile

eenblam13:04:20

Just googled around regarding the EPL, which is new to me. I've been able to identify that I don't need to ship my source with my binaries unless I modify source under EPL. However, I'm not finding it to be as clear whether or not I can ship my derivative work under a different license. Tl;dr: Leiningen starts my repo with an EPL license. Is it okay to replace that with Apache2? EDIT: For context, I just want to push a toy library I'm writing as I learn Clojure to GitHub. I'm not trying to, say, make a business decision.

plexus13:04:11

for what it's worth, I find http://tldrlegal.com a good starting point for learning about unfamiliar licenses

plexus13:04:09

note that that Quora answer is incomplete at best, this phrase "You can pick whatever license you want for your open source Clojure project." is misleading. You can't distribute binaries that depend on both EPL and GPL code, making GPL unsuitable for Clojure libraries

plexus13:04:21

You can get around that by releasing a library as GPL + a "linking exception", stating that the GPL'd code in that library may be linked against EPL code, but it's somthing to be aware of

seancorfield16:04:26

I mostly ignore GPL because it places so many restrictions on use (and there are lots of companies that won’t touch GPL code at all): https://clojurians.slack.com/archives/beginners/p1460036109000975

seancorfield16:04:56

Being able to distribute Clojure programs in source form that bring in their dependencies at runtime via lein/boot does mitigate a lot of that (not a scenario that most of the OSS licenses really seem to handle well).

seancorfield16:04:33

So the real TL;DR is "It really depends on what you want to do with your code". If you’re in the binary distribution camp, there are more restrictions to consider when combining code with different licenses. If you’re in the hobby camp of just putting a library up on GitHub for folks to look at @eenblam then you might as well stick with EPL and not worry about it, unless you have fundamental moral objections to EPL simple_smile

seancorfield16:04:23

FWIW, I put out most of my stuff under ASL2 in general (FW/1 for Clojure), but some of my Clojure stuff is EPL (engine, cfml-interop, the contrib libs I maintain). But then clj-time and congomongo are MIT. I use GPL if I really want to make sure folks can’t use it commercially in modified form (mostly that’s excerpts from code that comes from where I work that we’re putting out as examples, rather than actual libraries).

seancorfield16:04:34

(I’m actually a bit surprised no one has written a longer answer to that Quora question!)

alexmiller16:04:33

All the contrib libs are EPL but Cognitect has released things like Transit or the non-Clojure transducers libraries under ASL2

bronsa17:04:14

@alexmiller do contrib libs have to be EPL? never quite understood that. I would've released my contribs under EPL anyway but I'd like to know if there's the choice

alexmiller17:04:00

I believe that was the intention so that we could include them in core without having to relicense (but this pre-dates me being involved)

bronsa17:04:31

ASL2 is Apache?

eenblam17:04:56

@bronsa: Yep! @seancorfield: I did go with EPL for my hobby project, as I expect the license to be rather inconsequential in this case. I was just curious about what I could generally expect to do, since I'm a bit more familiar with ASL2 and have used it for other projects. I'm a student, not a professional developer, and I just haven't had cause to become especially familiar with how all the legal bits fit together yet. I'm trying to fix that, though, so thanks for the link to tldrlegal, @plexus!

eenblam18:04:15

@bronsa: Yep! @seancorfield: I did go with EPL for my hobby project, as I expect the license to be rather inconsequential in this case. I was just curious about what I could generally expect to do, since I'm a bit more familiar with ASL2 and have used it for other projects. I'm a student, not a professional developer, and I just haven't had cause to become especially familiar with how all the legal bits fit together yet. I'm trying to fix that, though, so thanks for the link to tldrlegal, @plexus!

seancorfield18:04:26

@eenblam: Yeah, licensing for "real" projects can be a pain in the ass due to the implications of packaging code with multiple licenses. I’ve always used ASL2 prior to writing Clojure (unless I’ve needed to heavily restrict commercial usage, in which case I’ve used GPL). With Clojure I often default to EPL unless I have a specific reason not to.