This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-04-08
Channels
- # bangalore-clj (4)
- # beginners (160)
- # calva (132)
- # cider (18)
- # clara (1)
- # cljsrn (2)
- # clojure (129)
- # clojure-boston (1)
- # clojure-europe (5)
- # clojure-italy (5)
- # clojure-losangeles (1)
- # clojure-nl (33)
- # clojure-uk (49)
- # clojurescript (88)
- # cursive (20)
- # datomic (5)
- # duct (3)
- # fulcro (33)
- # graphql (7)
- # jobs (3)
- # kaocha (3)
- # nrepl (41)
- # off-topic (58)
- # pathom (18)
- # re-frame (1)
- # reagent (5)
- # shadow-cljs (148)
- # spacemacs (7)
- # tools-deps (7)
morning morning
@lady3janepl - I applaud your approach, but my brain does not work like that... Also fog in London on a Monday morning means that my flight is delayed in leaving Glasgow (as it was today) so that's a bummer for me too.
the benefit of WFH is that your commute is very short (about 4m in my case) and fog is not usually an issue, but the disadvantage is you have to be disciplined about when you are at work and when you're not!
Quick interop question... If I want:
import gov.nasa.worldwind.geom.Angle;
import gov.nasa.worldwind.geom.coords.MGRSCoord
do I add all of:
gov.nasa.worldwind
as a dependency to the app and then import the bits I need?(:import [gov.nasa.worldwind.geom Angle]
[gov.nasa.worldwind.geom.coords MGRSCoord])
I’d just keep what you actually need.I’m quite pragmatic when it comes to imports @maleghast
@jasonbell - ok, but don't I need to declare a dependecy in the project aswell?
Last thing... Any pointers on "how to write a Clojure Library that wraps up Java stuff?"
Then I’d write a namespace to call the Java code. Did it quite a few times on previous projects.
There are times it’s not worth reinventing the wheel when a quick Java shiv will do fine.
Especially with libraries where there are well used Java examples. I’d use them and just send the require args data in.
From the school of “just get it working” and not fret about the beauty of it all. Happy chat it through @maleghast if you wish.
Clojure function that i found out about today: https://clojuredocs.org/clojure.core/find
(find {:a 1 :b 2 :c 3} :a)
;;=> [:a 1]
Returns a map entry :thumbsup:
You can call val
on it i think :thinking_face:good with (if-let [[_ v] ...)
if your values can be nil, so you don’t need to use contains?
find
pairs well with things like some
to find not only the value which matched, but the key too
obligatory http://diggercomic.com/ recommendation for people who haven’t seen it yet 😄