Fork me on GitHub

Hi @linux.soares - I live in New York City, NY, USA. We have an active Meetup here. I'm pretty new to Clojure, so I have only attended a few times. Each one has been hosted by a different local company that is using Clojure, so the adoption seems to be there.


Thanks @U86HEM0KX. I started study clojure a short time and would like to know if it is worth the effort and investment. I write some articles about clojure in portuguese… 🙂


Hi @linux.soares - apologies for my slow reply... I was away for the weekend.


I have really been enjoying learning Clojure and am just now starting to do some "real" work with it.


I hope you enjoy it as well. And if I could read Portuguese, I would check out your articles 😉


Hi @linux.soares. I'm in Edmonton, AB, Canada and use Clojure for work (I'm the only developer and have a lot of leeway on the technology choices) - there's no active meetup here, our monthly attendance was me and one other person, and he just moved so it kind of dissolved. Nubank uses Clojure and @lucascs has given a couple of great presentations at the Conj if you want to find a company in Brazil to talk to as well.


Hello @U054BUGT4. Thanks! I already went on Nubank, meetup Scaladores, but I never saw Clojure meetup. I wrote some articles about Clojure in portuguese, to help people who do not know English. I was trying to organize some meetup, or study group here, I’m studying Clojure and I’m enjoying it a lot!


i’m sure there’s an idiomatic way to solve this problem, i’m just having some sort of brainfart: i’m looking for a function that takes two arguments, like [1 4 2 5 4 3 4] and 4, and returns the first argument with a single instance of the second argument removed from it - so in that case it would return [1 2 5 4 3 4]


should i write my own, or is there something built in that does what i want?


i ended up with

(defn remove-value-from-hand [hand value]
    (take-while #(not= % value) hand)
    (rest (drop-while #(not= % value) hand))))
but i’m sure there’s a more elegant way to do this


hand is a seq with at most like ten items, so i’m not worried about performance here, just trying to figure out the nicest way to express this function

Bert Weidenflunders01:12:22

hey everyone, I thought you could use anything for keys of a map in cljs, but I'm getting weird output in

Bert Weidenflunders01:12:02

I'm entering {a 42 b 43}, but it returns {nil 43}

Bert Weidenflunders01:12:02

actually, I get it now. It's because it thinks a and b are symbols, but I never defined them. derp


You can quote them if you want just symbols


@jrheard I'd probably use a recursive function

(defn remove-value-from-hand [hand value]
  (cond (empty? hand) hand
        (= value (first hand)) (rest hand)
        :else (cons (first hand) (remove-value-from-hand (rest hand) value))))


nice, hadn’t considered that approach, thanks sean!


hey all, I'm having trouble running this core.async example


but when I run this code it just returns #object[cljs.core.async.impl.channels.ManyToManyChannel]


@derpocious go always returns a channel


that code should be putting log messages in the browser js console


ah true. I was looking for it in the klipse console, but I see it now in the dev tools logs.


Hi folks. Any hints as to why (int \5) would return 53?

Ryan Radomski13:12:41

(type \5) returns a java.lang.character. If you reference an ascii table, you will find that '5' is the 53rd ascii character

Ryan Radomski13:12:32

you'll find that calling int on any character will return the corresponding position in this table


Is it possible to have key/value pairs in a set?


I think the syntax is confusing me because #{ } looks like a map { }


but a set of more like a list of unique things, right?


Also, I'm confused whether #{ } is a hash-set or sorted-set. When I do this it returns true


(= (sorted-set 56 3 2 58 37 15) #{56 3 2 58 37 15})


@derpocious (= [1 2 3] (list 1 2 3) '(1 2 3) (map identity [1 2 3])) is also true, but they are different types


@derpocious you can put a key value pair in a set, but you can't look up by the key of that pair- a set is indexed by its elements themselves

Drew Verlee20:12:46

does anything detect un-used namespaces?

Arno Rossouw20:12:33

Just curious, why do some programmers make the excuse the code is too complex?


excuse for what?

Arno Rossouw20:12:12

Not to start and solve problems


because trying to solve problems I can't understand creates more problems


and complex code can create problems I don't understand

Arno Rossouw21:12:48

So isn't the answer to break things up into to smaller parts and solve it a step at a time


first I need to understand it enough to know where breaking it even makes sense

Arno Rossouw21:12:09

If you never attempt to solve a problem it will remain unsolved


This sounds so vague that there can't be a right answer. What prompted this


I'm not trying to defend a straw man here - @dpsutton indeed


What excuse do people make? I'm not following


you asked a question, I thought to myself "when have I said to myself that's too complex I'm not even going to touch it" and gave my answer

Arno Rossouw21:12:36

Its just that it seems that some people like to make excuses rather than apply thought to solve programming issues


that's great but it's off topic


@noisesmith I'm agreeing with you. I didn't mean for it to sound like calling you out if it did

Arno Rossouw21:12:44

Ok, sorry of topic.

Arno Rossouw21:12:32

I just find that some programmers have it easy by making excuses


we have an #off-topic channel

Arno Rossouw21:12:16

Ok, sorry man. Will try that

Drew Verlee21:12:45

For turning a project into a restful server thats going to have a couple api end points that server up JSON responses. SHould i look at anything besides Compojure?


sure, compojure is just a router, and there's other good options for routers out there. Liberator has a bunch of things for implementing REST if that's what you need