This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-08
Channels
- # aleph (11)
- # arachne (7)
- # aws (1)
- # bangalore-clj (4)
- # beginners (24)
- # boot (128)
- # bristol-clojurians (23)
- # cider (1)
- # cljs-dev (43)
- # cljsrn (6)
- # clojure (178)
- # clojure-austin (3)
- # clojure-chicago (1)
- # clojure-dusseldorf (14)
- # clojure-finland (15)
- # clojure-france (6)
- # clojure-italy (18)
- # clojure-portugal (2)
- # clojure-russia (67)
- # clojure-spec (148)
- # clojure-uk (55)
- # clojurescript (199)
- # core-async (4)
- # cursive (18)
- # datascript (5)
- # datomic (120)
- # devcards (3)
- # dirac (53)
- # emacs (11)
- # events (3)
- # gsoc (7)
- # jobs (1)
- # lein-figwheel (25)
- # leiningen (5)
- # lumo (12)
- # off-topic (29)
- # om (174)
- # om-next (2)
- # onyx (7)
- # perun (10)
- # protorepl (6)
- # re-frame (12)
- # remote-jobs (1)
- # ring (19)
- # ring-swagger (25)
- # rum (6)
- # spacemacs (13)
- # sql (3)
- # untangled (88)
- # yada (7)
Morning.
haha, exactly!
Actually I haven’t had the coffee yet - still on the train. Thankfully the kid was relatively good last night, so I probably had 6 hours of broken sleep - but final presentation on current project bid today, so will need caffeine in lavish amounts
Bore da
@jonpither didn't get a chance to catch up last night...full of cold. Maybe next time?
i did give a try to mount a while ago. liked the simplicity. but recently all microservices with aws lambdas mainly so no need to add any component stuff
morning!
welcome @jamesalmond
Morning @thomas and @glenjamin
@jonpither i'm using my own bounce-inspired thing instead of component
just doing some more work on it now after talking with @jarohen last night triggered some thoughts
@jonpither I've done extensive research into mount & the philosophy behind it. Because I was really confused before I did.
Namespace vars?! For state?! ARE YOU MAD!
What I got out of it is that mount doesn't complect state management & dependency injection together. You are a grown up, if you decide you want DI, you can do that through proper programming yourself (I get the impression that the proponents of mount actually use it this way).
Mount is really fun, you don't need a special reset
, you use your plain old tools.refresh (or just re-eval!) and it will only restart the components that have updated. This is quite a nice feature.
Mount is definitely written about in this article by it's author https://www.dotkam.com/2016/11/21/no-ceremony/ (though not really mentioned until the end).
Mount now supports re-binding in tests (I believe it just uses with-redefs
under the surface or something similar). I've used it in pet projects. I think it's quicker to start with & with self discipline perfect for teams. Especially on projects where you catch yourself passing around state to 90% of your code base (cough cough it begins with l and ends with m_cough cough_)
just spent several hours finding the place where to add width: 200
in the code... I just love to computers...
does anyone know of a good way to find unused requires/imports in a project?
@peterwestmacott see https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-clean-ns
..but obviously thank you for the swift reply!
we just lost over an hour because the curl command we gave someone to run, had something like “curl blah blah ‘foo=bar’ blah"
@korny heard a similar story where something got pasted into chat and added “invisible” non printable chars, so the code barfed with weird errors. The lesson: secret gist over cut & paste.
@peterwestmacott should be available in vim too...
I’m on Cursive, and in fact asking the question has prompted me to rummage through the menus and find some pretty good stuff...
I was hoping for more of an automatable solution, eg. a lein plugin
i am not really savy with cursive naturally 😉 so it does not have clean ns or similar?
it lets you know when your requires and imports are unused by highlighting them differently in the editor
and there’s IntelliJ functionality to run the inspection over the whole project and get a list of unused imports/requires (and a host of other warnings/errors)
I’m not aware of a namespace tidy up function in cursive
@peterwestmacott have you tried eastwood
?
https://github.com/jonase/eastwood
seems like there is :`unused-namespaces` linter. Never used this myself tho
oh, that’s a good idea
this gives some hints: https://github.com/clojure-emacs/refactor-nrepl/blob/master/test/refactor_nrepl/client.clj
alas eastwood’s :unused-namespaces
appears to be broken.
it claims that there are unused things, but they are clearly used.
well yes, I’ll put that on the list with all the other reasons...
for now Cursive does a very nice and reliable ad-hoc analysis though
is there a scenario where “smart” quotes improves understanding over normal straight ones?
perhaps if you had nested quotes it would allow disambiguation of start/end ? though the convention seems to be also to alternate single/double quotes for that case - https://en.wikipedia.org/wiki/Nested_quotation