This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-12
Channels
- # alda (3)
- # beginners (17)
- # boot (157)
- # cider (15)
- # cljs-dev (30)
- # cljsjs (4)
- # cljsrn (5)
- # clojure (70)
- # clojure-austin (3)
- # clojure-canada (2)
- # clojure-colombia (1)
- # clojure-czech (1)
- # clojure-dev (27)
- # clojure-greece (34)
- # clojure-japan (6)
- # clojure-russia (114)
- # clojure-sg (3)
- # clojure-uk (8)
- # clojurescript (63)
- # cursive (9)
- # datomic (40)
- # devcards (11)
- # euroclojure (4)
- # events (8)
- # hoplon (61)
- # incanter (1)
- # instaparse (16)
- # jaunt (6)
- # jobs (6)
- # jobs-discuss (52)
- # ldnclj (1)
- # leiningen (2)
- # off-topic (3)
- # om (73)
- # onyx (101)
- # overtone (25)
- # re-frame (18)
- # reagent (6)
- # ring (7)
- # ring-swagger (36)
- # spacemacs (5)
- # sydney (1)
- # untangled (41)
- # yada (6)
are there any really good articles to try and convince my CTO to let us (the data team) continue using clojure despite his stance that it will inhibit cross team functionality?
I don't really know of anything sort of targeting that, depending on what he means by inhibiting cross teem functionality. if he means members of teams that aren't using clojure and don't know clojure won't be able to read your code, well that is kind of a fact
by cross team functionality he means services in language A won't interop well in services in language B, well that is the internet for you
What he means to say, primarily, is that given the LISP-syntax of clojure it will be too difficult to get people on it quickly.
so more the former which is true, but he’s trying to force scala upon us which from my experience has a much higher bootstrapping cost and is much more difficult to begin writing idiomatically. so it’s like ahhhh idk
Huh? I was expecting he'd blame dynamic typing. I'd say scala syntax is more inhibiting.
This from someone who's in the middle of onboarding Scala developers.
Scala give you lots of bullets to shoot yourself in the foot when you're starting imho. many ways/styles to achieve the same task. You can get up to speed and write horrible code quickly yes but I am not sure that count as a +. Clojure on the other hand has a much simpler core and concepts.
As for recruiting I am not sure that's true anymore. Then again there are more Scala dev on the market for sure, but that doesn't necessarly mean it ll be easier to find good devs.
@puhrez Probably not exactly what you want, but I find following talk quite interesting: https://www.youtube.com/watch?v=BsLiPt90HDo&list=PLZdCLR02grLrl5ie970A24kvti21hGiOf&index=19
that reminds me, https://www.youtube.com/watch?v=VSdnJDO-xdg is a nice video which rich discussing the value of clojure
What is the best way to convert LinkedHashMap
with nested ArrayList
s, String
s, and other LinkedHashMap
s into Clojure data structures? Since into {}
is shallow, I presume something from clojure.walk
?
clojure.walk
only works on Clojure data structures. If you have Java data structures, you'll need to write your own recursive code to transform them.
@bostonaholic thanks, I'll have a look
I have this code composition issue: I have a stream, of points: [:a ["1", 10]] [:a ["4", 40]] [:b ["2" 100]]. I need to interpolate points of like keys. So :a and 😛 will be interpolated and new points added for "2" and "3". Also in the case of 😛 it extrapolates to "1". The function I have to do it handles it all as one operation, but I think it would be cleaner to do an extrapolate map, and an interpolate map, then the reduce separately. I'm having trouble thinking of a way to save the metadata I need to perform the interpolate/extrapolate. Essentially I'd have a map in the metadata for key :a, saying it's starting point was "1" and had a value of 10. Seems like a common pattern I'm missing or just too brain dead to think of
I found myself about to implement deep-merge
and I decided to google it. Do y'all usually just copy and paste one of the implementations listed? http://dev.clojure.org/jira/browse/CLJ-1468
yeah, I think I'm going to use this one: https://github.com/puppetlabs/clj-kitchensink/blob/cfea4a16e4d2e15a2d391131a163b4eeb60d872e/src/puppetlabs/kitchensink/core.clj#L311-L332 my naive implementation was actually not that deep, it only handled 2 levels
Does anyone know if/how I can call another lein task from within the code of my own lein plugin? (besides delegating it to a shell)
Hi! I’m having a hard time passing a little Ruby function to Clojure (it’s for a little test I did). I was able to do it in Ruby no much trouble, I'm a Rails guy, but I don’t understand almost nothing of Clojure as I only did some little things with Clojure some years ago. Is a little function to print an array of strings (and nested arrays of strings) with a each index.
For example, if you have this array: list = ['a stringy', ['y','e','s'], 'cheese', ['tomato']]
and you call the function printList (let’s call it that way) like this printList('Goo', list)
, you would get the following output: Goo.0: a stringy \n Goo.1.0: y \n Goo.1.1 : e
etc
I pasted in http://Repl.it if you want to see my little Ruby solution: https://repl.it/CEt1/0
Imagine you can do that little function in 2 minutes, just iterate each with index and print if its a string, or call itself recursively if not. However, to pass that to Clojure no idea, I took the FizzBuzz code for Clojure from Rosetta code but can´t understand it, it’s like backwards haha. Anyone could guide me a bit? 😁
So to declare the list or array, I figured out it's like this: (def List ["a stringy", ["y","e","s"], "cheese", ["tomato"]])
there are a number of beginning clojure guides, tutorials, and books (free and otherwise), you can find them in google
but don´t know how to make the loop recur and check each item to see if it´s a string or not, and call itself if it´s not
sure, but starting at 0 you won't get very far poking at things yourself, if you go with some learning resource you will bootstrap faster and more effectively
def printList(str, arr)
arr.each_with_index do |val,index|
if val.is_a? String
puts "#{str}.#{index}: #{val}"
else
printList("#{str}.#{index}", val)
end
end
end
(defn printList [str arr]
(map (fn [n]
(cond
(string? n) "String"
:else (printList "Goo" n)))
(map-indexed vector arr)))
i guess its a bit tricker than that, conditionally applying the last arg if provided - but that’s a different question