This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (50)
- # beginners (4)
- # boot (31)
- # cider (25)
- # clojure (120)
- # clojure-brasil (1)
- # clojure-germany (2)
- # clojure-india (9)
- # clojure-italy (6)
- # clojure-japan (104)
- # clojure-nl (13)
- # clojure-norway (1)
- # clojure-russia (6)
- # clojure-sg (23)
- # clojure-spain (37)
- # clojure-turkiye (2)
- # clojurescript (115)
- # core-matrix (1)
- # datomic (63)
- # editors (32)
- # euroclojure (56)
- # events (6)
- # ldnclj (71)
- # off-topic (27)
- # onyx (7)
- # overtone (2)
- # reading-clojure (16)
- # reagent (5)
- # slack-help (10)
say I have an atom with a map. now say I would like to purge values from that map after a certain time, what would be the best way of doing that?
this isn’t exactly what you want, but core.cache has a TTL algorithm that you could look at
how use local library with leiningen? I do not want to install local jar to maven repository.
@alexmiller: crazy thought, would it be possible to do a Clojure 1.6.1 release with just Reader Conditional support?
@akiva: i was making a short deployment tutorial and using an embedded h2 db; the problem is the db file is separate from the jar
danielcompton: indeed the backporting issue is a barrier for adoption
danielcompton: although if updating to a 1.6.1 to use, why not update to 1.7? (presuming we get it released soon)
@alexmiller: there were some breaking changes from 1.6 to the 1.7 alphas, have all of those been resolved in the RC? It would take away any resistance to porting libraries, because people will have a trivial upgrade path.
@akiva: derp, i just needed to make sure i had my sample h2 db in the right path where my jar expected it. but throw away in memory is not a bad idea either
danielcompton: no simple answer. I would expect the majority of users, using RC and newer versions of libs, to experience few or no problems with RC1. RC2 will address a couple additional and less common issues.
@danielcompton: I don’t know but https://stuarth.github.io/clojure/pedestal-browser-repl/ has a lot of it
remove needs to realize the whole sequence anyway no? there’s where laziness ends, as far as I can see?
hah. I've seen so many memcached clients that throw exceptions when the hosts die 😕
anyone actually used core.memoize with a pluggable backend? docs are pretty thin
Yeah, I see that issue with 1.6, but updating to 1.7 it is resolved. I guess it is time to upgrade
Yeah, here's the ticket. Interesting issue anyway...and a reason for people to upgrade if they haven't yet. http://dev.clojure.org/jira/browse/CLJ-738
@isaac maybe someone answered already and I missed it, but you can use
lein install to make your lib available to other projects locally
Our local Clojure group (Clojadelphia, covering the great Philadelphia area) is going to be doing a free all-day intro-to-Clojure workshop soon...we've got material for that. But we've also been asked by a local convention (http://fosscon.us) if we'd like to do a three-hour, hands-on workshop.
Any suggestions for preexisting materials that would be suitable for a beginner-oriented workshop of that length?
we haven't really publicized it yet but the clojure training materials we used for the pre-clojure/west intro workshop are oss
that was a 2-day training but you could cut it down to something you like
@noisesmith: I mean that, I have a jar lib, and I want to add it to dependencies of my Clojure project.
pataprogramming: https://github.com/cognitect/clojure-lab is the repo - it uses Gorilla repl for an interactive experience
@alexmiller: Hm, thanks. I'll take a look, and we could try cutting it down . If I can find something battle-tested for a short workshop, that'd be ideal...I want to make sure that the attendees get to leave feeling that they've done something cool, or at least learned something.
pataprogramming: it includes a mixture of materials and labs for each unit
clojurebridge also has some intro workshop stuff available of course including their Quil-based project which is kind of fun
@isaac see the “add jar to local maven directory” bit here: http://www.thesoftwaresimpleton.com/blog/2014/12/06/om-local/
The clojurebridge materials are what we're looking at for our (non-clojurebridge) all-day workshop, but my co-presented is dubious about whether we'd be able to squeeze into a much shorter slot while still remaining useful.
@martinklepsch: I don’t think so - he has a non leiningen local jar file from what I can discern from the scrollback.
it's a little tricky to configure (intentionally) but it is possible to create a directory in your project and have lein treat it as a repo
you need both to have the proper sub-directory structure (with some of the metadata files) and also configure lein appropriately
it is not the first or even second thing I would recommend but I have done it in the past
maybe it would be easier to install with the normal maven jar installation command, and then copy the relevant subdirectory to your project, and then point leiningen at that.
@isaac: I think this is what you want, IFF you want to go down this road: https://github.com/technomancy/leiningen/blob/stable/sample.project.clj#L119
@isaac I hope you understand that a lein or maven "install" simply puts the jar in a special cache folder in your home directory, so other projects can find it. If it is a clojure lib, you can use a checkout via lein to use the code directly. But lein install must be done first or the checkout won't work.
so in the end, you’ll still need to “install” the jar with maven, but you can manage the libraries in git in some local subdir.
also, if you have collaborators, don't use checkouts or install, it's just too messy. Use a private shared rep instead.
@noisesmith: that will be better if there has a plugin of leiningen can do this directly
isaac: another option is to put the jar into your resouces dir and add the jar itself to the :resources-path of your project.clj
isaac: if the jar is in your resource-path (both it's location, and the jar itself need to each be there I think) then uberjar should handle this properly
isaac: but to some degree you are fighting against the package management here, because the overall assumption with lein or maven is that independent artifacts are each available from some repo (and when I switched over and finally started using a private repo at work, everything got much simpler)
One thing is that
system is compatible with boot. Other than that, I'm not seeing much difference.
jeff.terrell: if you look at the source code for either of those components, you'll see that they are pretty trivial to generate yourself. Make a start and stop function, that's it. I like to assert a little bit more control over the components we use.
It's not that I specifically have a problem with those libraries, but I have a problem with people telling me what to do 😃
Another pattern that has proved extremely useful is to have a component's constructor take data and only data to configure itself
For example, our DB connection pool component has a constructor function that will check args and call the underlying component's
map->DBConnection function. (that is provided by a defrecord by default)
if you have to construct the component, then call functions on it or simply assoc stuff onto it, you're not taking full advantage