This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-12-15
Channels
- # admin-announcements (60)
- # adventofcode (37)
- # beginners (53)
- # boot (94)
- # bristol-clojurians (1)
- # cider (21)
- # clara (19)
- # cljsrn (1)
- # clojure (222)
- # clojure-chicago (1)
- # clojure-dev (2)
- # clojure-nl (11)
- # clojure-russia (301)
- # clojure-turkiye (1)
- # clojurecup (6)
- # clojurescript (30)
- # core-async (3)
- # cursive (64)
- # datascript (2)
- # datomic (55)
- # devops (16)
- # editors (1)
- # emacs (16)
- # ldnclj (6)
- # off-topic (18)
- # om (113)
- # onyx (3)
- # parinfer (1)
- # proton (48)
- # re-frame (20)
- # reagent (7)
I'm working my way through the clojure for the brave and true and as a Java developer it's just very hard to grasp the recursion and functional programming, very frustrating!
@joshua.d.horwitz: It's definitely a different way of thinking. Stick with it and it will eventually click.
What’s the best way that you guys have learned? What’s the recommended books etc..
Hey @joshua.d.horwitz I worked with Java for about 15 years, have been purely Clojure the last 2. I found just coding it the best way to learn, rather than reading, but if you're not lucky enough to work on real-world Clojure projects I also find that if I ever need to work in Java these days I always have a REPL open - it's invaluable, anything you want to test in Java is readily available to you.
(pprint
(let [partitioner (DefaultPartitioner. (VerifiableProperties.))]
(map (fn [[key val]] [key (map first val)])
(group-by second (map (fn [mta-host]
(let [k-part (.partition partitioner mta-host 3)]
[mta-host k-part]))
["mta1101" "mta1102" "mta1103"
"mta1201" "mta1202" "mta1203"
"mta3101" "mta3102" "mta3103"
"mta3201" "mta3202" "mta3203"])))))
=> ([2 ("mta1101" "mta1203" "mta3102" "mta3201")]
[0 ("mta1102" "mta1201" "mta3103" "mta3202")]
[1 ("mta1103" "mta1202" "mta3101" "mta3203")])
@joshua.d.horwitz: I really liked The Joy of Clojure but it’s not recommended as an introductory book. I did some FP back in college before a career of C, C++, and lots of Java. I’d been doing recursion ever since I was doing assembler back in the 80’s tho’ so that probably helped
As @d-t-w says, keep a REPL open and experiment a lot. Try out every piece of code you see. Try solving problems in the REPL using Clojure even if you’re going to use Java for the actual problem later.
You might like http://4clojure.com as a set of interactive puzzles with easy / medium / hard levels.
Thanks @seancorfield and @d-t-w , I appreciate the help! I’m in the position where I’m wondering if I should just focus on learning Java as much as I can and all the frameworks, or to learn Clojure. I really like Clojure and the community.
I’m not sure I’d recommend Clojure as a learning experience if your goal is making a website for a nonprofit — there are definitely easier tools for building websites (esp. pure content-based sites) — but learning Clojure to become a better programmer overall is certainly reasonable.
I was already learning Clojure, the website just came along out of nowhere so I thought it might be a good project to practice on.
@joshua.d.horwitz: Another option would be to go through something this this, building a website and getting a feeling for Clojure along the way: http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645
^ highly recommend this book if you want to get your job done but it isn't for those wanting to learn the fundamentals.
Really? Maybe I will check that out
I do have that book, through my company we have a safari online account.
@joshua.d.horwitz: http://learnyouahaskell.com/ was my introduction to functional programming. it's a great book not just for learning haskell, but it also does a great job of teaching functional programming concepts in an easy-to-understand way
Thanks @dave , I have access to that book as well. Maybe I will try that first
this has nothing to do with clojure, but holy cow does Go really upset me. I know I should just take some time to learn the basics, but I don't want to. I want to use a project written in Go but I can't even freaking figure out how to build it!
why shouldn't I just be able to download a couple of .go files anywhere and just go build
or something?
Any Cursive users around? Trying to force myself to stick to structural editing as much as possible (still being Clojure beginner), I know I can wrap stuff in parens just by selecting it and hitting (
, but what if I want to do the opposite? E.g. I have fiddled with parens and ended up with sth like this (((str “Hello “ “World”)))
. How can I get rid of these redundant form parens (I have “standard” Cursive keybindings over MacOSX 10.5+ set)?
I just highlight then use the delete key. Quite a hassle really and I'm sure that's not the right way.
I have a feeling we are supposed to think in a 'parenedit' way, but I could be completely wrong, prolly am.
I feel like hacking Cursive way by just using “Delete” But looks like it’s way to go from what you say
thanks, will check it too. We got “Splice” working (on #C0744GXCJ) in this particular case (I mean remove redundant parens pair)
I just finally remembered to support Clojars on bountysource: https://salt.bountysource.com/teams/clojars In case anyone else was meaning to and needed a reminder.
I hate to think of what would happen if there was a sustained Clojars outage. Many thanks to tcrawley for all of his work, and, of course, xeqi, too.
Hi, anybody knows a clojure library for websockets? I tried gniazdo, but this seems to break my project with classpath issues. Sente seems to be only able to open a client on cljs side.
Aleph seems to have a client thought https://github.com/ztellman/aleph#websockets
http-kit has client and server APIs, but not client-side websockets. That would most likely be a substantial amount of work, although if you needed this for some reason you could probably do it.
@jeff what do you mean exactly with "just a socket"? What i want is to connect to a websocket endpoint from clojure side. Which "socket" implementation should i use for that?
you could use this: http://www.eclipse.org/jetty/documentation/current/jetty-websocket-client-api.html
@sveri: you could copy the wrapper parts of gniazdo into your own projects, or use the jetty Java library directly