This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-16
Channels
- # announcements (1)
- # babashka (23)
- # beginners (157)
- # boot (3)
- # calva (2)
- # chlorine-clover (12)
- # cider (14)
- # clara (5)
- # clj-kondo (6)
- # cljs-dev (61)
- # cljsrn (30)
- # clojure (65)
- # clojure-argentina (8)
- # clojure-berlin (2)
- # clojure-europe (13)
- # clojure-france (9)
- # clojure-germany (2)
- # clojure-italy (4)
- # clojure-nl (6)
- # clojure-portugal (2)
- # clojure-romania (2)
- # clojure-uk (76)
- # clojurescript (56)
- # conjure (52)
- # core-async (37)
- # datomic (209)
- # duct (17)
- # emacs (17)
- # exercism (1)
- # fulcro (26)
- # graalvm (5)
- # instaparse (2)
- # jackdaw (9)
- # jobs-discuss (27)
- # joker (2)
- # juxt (23)
- # leiningen (4)
- # malli (11)
- # midje (3)
- # pedestal (2)
- # quil (2)
- # re-frame (78)
- # reagent (8)
- # reitit (18)
- # remote-jobs (1)
- # ring (2)
- # ring-swagger (1)
- # shadow-cljs (29)
- # sql (11)
- # test-check (12)
- # tools-deps (5)
- # xtdb (16)
- # yada (4)
Mornin'
Binge-watching Hawaii Five-O Season 10, drinking beer, and just about to go to bed 🙂 Our routine is all over the place at this point.
Morning 😄
morning
on the js front - add eslint as a precommit hook, enforce one function style, prefer arrow functions, disable any var usage in favour of const... and you're most of the way to a decent lang
although pervasive, always on async behaviour gets tiring after a while. sometimes when ya don't need it the extra overhead of async is wearing.... to me, anyway
yeah I'm not a fan of the syntax, but getting rid of the baggage of yeah it's also a type with this
binding and whatnot is valuable imo
unless there's an amazing reason for it, I prefer always arrow fns
(for new projects)
@alex.lynham I assume you mean for anonymous, not named?
if you have an older code base I like adding the eslint rule that forces one function style for named as well
so you either have all fns hoisted or none, ya know?
@dominicm well, you're able to shuffle them into a const anyway, so both I guess
lol was just looking at some side project code and it uses 2/3 types of fn, oh well. I'm more disciplined when somebody else is paying me I swear haha
Arrow functions feel like they were for anonymous, not for named. Not for any reason.
yeah I think that's the intention
but because they strip some of the OO indirection, in a functional or rx code base you can use them as your main type of fn
html comments work
dafuq
@dharrigan the rules in question are off the top of my head no-var
and config around func-style
yeah, that must have slipped down the ol memory hole for me too
Man, I just love being able to ssh to my machine at work, fire up a repl and work on code 🙂
yeah I think from memory the last large project I did we did prefer non-hoisted, prefer arrow and then caught it in code review, although I can't think of many APIs in redux/react land that had lots of this
ing
a fair bit in the UI as I recall
I think that would have been from react class use, but it was a couple of years ago so don't fully recall. remember that most of the selectors and actions and whatnot were pretty clean and functional, p easy to test with pure data
I remember there were 1700 tests with a couple expectations per test and it ran in 29s
> Could it be that n –> 0 is really just n– > 0 (n minus minus is greater than zero)?
So n--
>
0
this is pretty interesting https://www.reddit.com/r/Clojure/comments/g1zhk0/how_do_people_feel_about_using_in_production_code/
Dumb question, but what does that mean. Like is that a util function which is public but can change at anytime so only devs who work on clojure should use it?
More like, it was added as an idea and experimented with, but never documented. Not part of the API that is promised to stay.
I mean obviously, you don’t need to use a method marked internal, as it may change etc, but it feels like the path is there for this sort of thing…
FWIW this is technically a documented feature. It’s documented on the var *read-eval*
It’s use has always been discouraged though
yeah you're right haha! https://clojuredocs.org/clojure.core/*read-eval*
@wesley.hall You certainly could be right, I was looking up the default shortcuts for a tutorial I’ve been writing and couldn’t find them, so I’m not sure if my memory is correct here at all =)…
I’m trying to work out what Send form before caret to REPL
and Send top-level form to REPL
is for various editor combos…
emacs + Cider
I thought was CTRL-x CTRL-e
, but as you say it might be CTRL-c CTRL-e
Intellij + Cursive
vscode + Calva
appears to be unset
vim + fireplace.vim
appears to be cp
and cpp
Anyone who can confirm these would be appreciated!
@folcon For Atom/Chlorine, there are no default key bindings but there are examples on the package's home page and CTRL-; b
and CTRL-; B
are likely the most common (for evaluate block and evaluate top block, which are Chlorine's names for the two commands you listed).
Thanks @U04V70XH6 =)…
here's an interesting clojure related story: https://docs.google.com/presentation/d/1sowJrQQfgxnLCErb-CvUV8VGXdtca6SWYWWLRPZgaHI/edit#slide=id.ga3a076b34_0_12
an old colleague in another slack posted it... it was totally random that it had a clojure connection