Fork me on GitHub
Drew Verlee00:10:16

@noisesmith @tbaldridge either of you going to clojure conj? I would like to buy you a round of something for helping me learn clojure and being such good people.


I appreciate the sentiment but I won't be there, I did Clojure/West as my paid conference this year


I’ll be there 😀

Drew Verlee00:10:15

I’ll send you a message at the conj, i got a lot of joy from your clojure videos and would like to thank you in person. Would love to chat a bit about whatever.

Lucas Barbosa00:10:35

Can you guys recommend some nice open source Clojure projects? I want to read some code, especially tests

Drew Verlee00:10:30

Depends on what your going for, Onyx is a pretty big open source project. I can’t speak for its tests or readability but the authors are both brilliant and helpful.

Lucas Barbosa00:10:29

I will give it a shot! Thanks

Lucas Barbosa00:10:36

I was about to start doing that with compojure, which is something that I have been using while learning Clojure, but I’d like to hear some opinions in order to build a list of stuff to rea


the flatland/useful utility library has good code that's readable in small chunks (since it's a utility library)


'funcool' is great reference


Question about a good way to approach this in Clojure; I was trying to port over a piece of JS that does something like this:

function handle-event = (e) => {
  let wall = false;
  if (somethingIsTrue) {
    htmlElements.foreach(() => {

      if (somethingElseIsTrue) {
        wall = !wall;

      if (wallIsTrue) {
        // do stuff
If I were to port this directly, I believe I run into issues like, I cannot reassign a lexically scoped value. For example,
(let [wall false]
   ;; somewhere here reassign wall)
I believe the above is not possible in Clojure or if it is, not idiomatic. One quick solution was to assign a lexically scoped atom which has a hasmap with a key of wall:
(let [hanlderState (atom {:wall false})]
   ;; somewhere here reassign wall)
Aside from the syntax being wrong in the above, I feel that this is an ugly solution. Which made me think that this is an example of code that should not be ported like this. Flags are very common in JS, but how would this be handled in a more Clojure way?


you can use a vector or hash map to represent multiple accumulated states in one reduce


(defn handle-event [e] (reduce (fn [wall element] .... (if some-condition wall (not wall))) false html-elements))


Hello, what do you think, why did I get 302.. and not logged-in?


I would like to create a little monitor app for me (personal) and that isn’t possible with the API.


Yes, I checked, but I didn’t get the answer.


I linked directly to the answer


:redirect-strategy :lax


Oh, thanks!!




@noisesmith I added the :redirect-strategy :lax to the request but I get still 302.


weird - according to the docs that should work


yes, I read that.


another thing to notice from those docs about your request: > NOTE: The options :force-redirects and :follow-redirects (present in clj-http 2.x are no longer used). You can use :graceful to mostly emulate the old redirect behaviour.


I can`t fix it.. I don`t know what is the problem.


it's saying that :force-redirects true doesn't do anything any more, but :redirect-strategy :graceful has a similar effect


I tried that too.


Many combinations..


I try with ““.. I saw others use that.


I sent wrong params..


I do apologize.


Is it normal to experience a delay when displaying logs for stuff I'm running in parallel through core.async? (in the REPL, while developing)


The final output looks about right but it takes a while to show up on the REPL for me


@noisesmith I see how you are using the reducer to accumulate states, as a next step, in your example, do we care if the reduce returns anything or are we simply using it as a way to record the state and operate on that inside of the reduce?


e.g. have reduce return something like [false, false, true, true, true, false] and than reduce over this again, or more

(reduce (fn [wall element]
   ;; do something
   ;; do something else 
   (if some-condition 
       (not wall))


How to solve with clj-http, if I used cookie-store.. but I got answer like “We’re sorry, there was a problem with your request. Please make sure you have cookies enabled and try again.” or “your browser not supported”


@tkjone you can do either one, it depends on what you were attempting. In your original it didn't look like you were tracking all the states, just the most recent, so that's what I showed


and no, I'd rarely reduce over the result of another reduce - if you have multiple things to operate on and care about more than one result, you can use a collection holding multiple values and that usually suffices


By the way, I figured out that the REPL issue I was seeing with core.async is specific to Cider. Just tested with nREPL using Cursive and everything is fine.