This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (2)
- # beginners (53)
- # boot (151)
- # cider (11)
- # cljs-dev (60)
- # cljsrn (36)
- # clojure (71)
- # clojure-austin (13)
- # clojure-berlin (2)
- # clojure-czech (11)
- # clojure-dev (35)
- # clojure-dusseldorf (2)
- # clojure-france (6)
- # clojure-japan (9)
- # clojure-russia (183)
- # clojure-uk (18)
- # clojurescript (155)
- # cursive (6)
- # datomic (25)
- # euroclojure (6)
- # funcool (6)
- # hoplon (229)
- # instaparse (10)
- # jobs (9)
- # leiningen (5)
- # off-topic (70)
- # om (29)
- # onyx (18)
- # planck (1)
- # proton (5)
- # re-frame (8)
- # reagent (32)
- # untangled (4)
Hey when I want to write a lot of comments in a namespace do I do it before or after the namespace declaration?
What is the best way to embed an NREPL server in a jar? I have a job that I am running on a remote server that I want to be able to hook into via nrepl. Right now I am adding a dependency to NREPL and running
(nrepl/start-server :port 7888) but it opens a repl prompt when running the jar. What I am looking for is for it to allow connections in the background without opening the prompt.
@casperc: AFAIK clojure.tools.nrepl.server/start-server does not start a repl prompt, it just runs the server
@fp: not open source projects, but there’s a bunch of math/algorithmic exercises on http://www.4clojure.com
@casperc: here is what I do to start an nREPL server to run a bunch of tests against it: https://github.com/binaryage/dirac/blob/master/src/test/dirac/test/nrepl_server_helpers.clj
@fp well, I am working on a web framework, but as this is not really math / algorithm stuff it might not be for you
Thanks @zzamboni ive also done a number of the advent of code exercises that were fun -> http://adventofcode.com/
@fp yw, there’s also an interesting thread about this right now in #C053AK3F9, with a bunch of good pointers
@fp no, more like RoR so a combination of front end backend, whereas most work is done in clojure up to now
@fp http://open-source.braveclojure.com/ shows a list of OS projects in Clojure looking for active development
does anybody know if Peter Taoussanis (@ptaoussanis) hangs out on this slack somewhere? or any channel for / related to Sente (https://github.com/ptaoussanis/sente) ?
I wrote article when use vars, atoms, agents, refs and async. I share it with you http://clojure.wladyka.eu/posts-output/2016-04-06-concurrency.html Please give me feedback if all is clear. Maybe i can improve something? It is very complex topic and i want stay with short text. What do you think about flowchart? Do you agree with it? Any idea how can i do it better? I feel i can do it better but i need some feedback
@kwladyka: your let example is not an example of vars - those are local bindings, which are not global (and not vars)
well, it doesn't match how I think about it, but I'm not a big fan of these flowchart things
It is complex topic, it is hard to make it clear on flowchart. I am open for suggestions
so is a flowchart that recommends "async" over the other reference types for performance
I think you are mashing together state and concurrency when they are separate concerns
I tried to summarize the concurrency part of things here http://clojure.org/guides/faq#concurrency_features
It's distracting, looking at it I was like, uhm, something is wrong here, reading @alexmiller answer made it clear what it was.
another quasi category of things are things that do value conveyance - chans, promises, and maybe Java queues fit in that category
So i will remove async part and change the topic to Share state - when use vars, atoms, agents and refs? I will write about concurrency maybe in another article. This one i think is closer to sharing state then concurrency.
the other split is in the usage of channels, queues, etc, core.async provides channels which are about value conveyance, and the go macro stuff which lets you write code that is asynchronous in its usage of channels that looks synchronous, but you can use channels synchronously as well using the block ops just fine and they work great
yeah, you could see future, async/thread, and async/go, and maybe even Java executors as "process-like" things
I wonder if I can bug you with a question: Is it considered more idiomatic / better practice to create several single-purpose helper functions, or to do the work with let binding (assuming each intermediate value doesn't require a ton of code)?
@ethan826: What I mostly do is thinking about the function name. If it is save-to-db-and-send-mail it should be two functions instead. But if I can find a good name that tells the purpose of the function I'll leave it like that, as always this is a rule of thumb with exceptions.
@sveri: Okay, that's very helpful. In my case, the stuff in the let binding is filtering, applying frequencies, sorting by frequencies, etc., all in the service of a single purpose.
Another pointer is that maybe some code can be reused for similar datastructures, but that then mostly goes into some kind of a helper namespace
And finally, try yourself out, make mistakes, look back in 3 months, 6 months. You will recognize what you did good and what was bad.
@ethan826: I am doing register-step-1, register-step-2 (as business language) and inside this functions call save-to-db and send-email (technical language). Personally i always care about simplicity, clear architecture, readability and flexibility for changes. Make glue register-step-2 for db-changes and send-email is one of the things what i am doing to achieve that. Choosing the name is sometimes difficult task
I published ring middleware for auth through Okta https://github.com/Hendrick/ring-okta
Wow, Hendrick auto was big in the area I grew up. I can't believe clojure has caught on there