This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-26
Channels
- # announcements (6)
- # beginners (328)
- # boot (2)
- # cider (72)
- # clara (6)
- # cljdoc (4)
- # cljsrn (5)
- # clojure (78)
- # clojure-europe (3)
- # clojure-italy (22)
- # clojure-nl (4)
- # clojure-spec (3)
- # clojure-uk (114)
- # clojurescript (22)
- # clojurex (54)
- # copenhagen-clojurians (1)
- # core-async (20)
- # cursive (8)
- # data-science (1)
- # datomic (22)
- # duct (11)
- # emacs (32)
- # events (1)
- # figwheel (2)
- # fulcro (18)
- # graalvm (53)
- # graphql (39)
- # luminus (6)
- # nrepl (6)
- # off-topic (53)
- # om (1)
- # re-frame (8)
- # reagent (19)
- # reitit (3)
- # shadow-cljs (28)
- # spacemacs (10)
- # sql (37)
- # tools-deps (33)
- # vim (9)
- # xtdb (6)
I'm not sure if @cbrfereday is here or not
Charlotte's back in Londonshire nowadays
Nick Ogden is still based in Glasgow I think
https://previ.se/ also has at least one clojure guy working out of Glasgow
morning
Morning
if I want to drop the first element of a vector is (comp vec next)
my best option?
pop
seems promising, but works on the wrong end
#(dissoc % 0)
didn't work
disappointingly
ah perfick. thank you
Just done my ClojureX proposal…. have you done yours? https://docs.google.com/forms/d/e/1FAIpQLSfVgdajHWMYOGh02jXRt02-Px54dnPHjeZP1PrF89D2yJGllA/viewform Just call me #ClickbaitJase 🙂
performance considerations of (subvec ...)
vs (drop ...)
are different quite IIRC - I think subvec was constant time operation
both are constant time for n=1
(true that drop
is linear!, but in this case it wouldn't matter), although drop has a slightly larger constant factor -- but the important thing is the data structure they return: subvec
returns a vector while drop
returns a seq, operation on those have highly different time complexities
though bronsa is correct to point out that subvec holds the original vector in memory
I like testing out function performance with time
or even better https://github.com/hugoduncan/criterium and then investigate why (time permitting)
are you sure he's not called Duncan Hugo?
both are constant time for n=1
(true that drop
is linear!, but in this case it wouldn't matter), although drop has a slightly larger constant factor -- but the important thing is the data structure they return: subvec
returns a vector while drop
returns a seq, operation on those have highly different time complexities
oh he looks like the grandfather in 'Derry Girls'
I assume that's an underlying theme that I completely missed
You know, I've been a happier since I disabled my parinfer, doing it by hand seems to suit me better 🙂
is the "re-arranges the parens when you change the whitespace" doing lisp in a python like fashion?
what’s wrong with paredit?
(not trolling, just trying to understand what the use case for parinfer is)
I found parinfer caused quite alot of bugs
and consumed more time than I though it was worth
i tried parinfer once and didn't like it
this seems like lots of maths and faff for an academic exercise when structural editing just works:tm:
its a cool idea
but didn't work for me
your scientists spent so long wondering whether they could, they never stopped to consider whether they should
parinfer does have a lower barrier to entry than paredit
idk I taught it to our apprentice in an hour flat on monday
after six weeks of wax on wax off with visually balancing parens though I guess anything was a step up and worth grokking 😂
but yes you’re probs right @ben.hammond
how do you feel about rainbow parens?
(I find them distracting)
love ’em, used to hate ’em
call me a minimalist, but i don't really want anything more than slurp, barf, kill-sexp, forward-sexp, backward-sexp
I found that I needed a more obnoxious colour scheme so that they blend in, @otfrom can confirm
wouldn't want to be without split
I love everything about @alex.lynham's colour scheme except the bright pink the the org-tables 😉
hahaha!
probably, I don’t use org as much as you do (and I like the pink!) - but I can see what you mean, it should probably be an accent and not one of the main bits…
trying to picture in my head what it looks like - got a screenshot?
oooh wasn't there a BBC (micro) mode for that
ah yeah
that needs to be inverted I reckon
background colour as per main (or the light blue accent) and then pink for the text 😛
my mistake, the org bit hasn’t had as much love
put in a PR!
I like a combo of paredit and aggressive indent (so I get the white space clues, but I use the parens to move around the whitespace)
i like rainbow-parents
does everyone have a different indent
and a tug-of-love every time they edit a file
i don't like aggressive-indent, it messes up git commits in a team
If you are going to use aggressive indent it does need to match with your coding standards
can't you get your git setup to change the whitespace
on the fly?
I've never bothered, but I vaguely remember that it is possible
@otfrom can you get the exact same indent config across different editors ?
yeah, you can use a formatter (or have it as a part of your pipeline). I would want my emacs indentation to match whatever the formatter was going to do
@mccraigmccraig possibly not the same config (as it wouldn't be in elisp), but I would have thought roughly the same values (as it is all about the spaces unless you are some sort of tab using monster)
on a different team we had a git pre hook that linted so even if your editor moved stuff around it was linted pre push
that worked p well across like 4-5 diff editors and 8 devs
can you do that on GH @alex.lynham ?
linted and formatted, sorry
nah it was a git hook that ran a cli utility
was a node and python project though, so easier to have opinions in some ways
lisp weenies are unique ❄️s
it’s one of those things where atm my formatter is paredit so I’m happy for it to get outsourced to a tool as long as the config isn’t mentalllll
I use clj-format now and again, but I find that my vim plugins do a good job of keeping everything formatted correctly
yeah, clj-format and clojure-mode should produce the same indentation (or at least that is the intention IIUC)
I don't view parinfer/paredit as an either/or situation -- I have both installed in Atom. I like paredit for explicit structural editing and I like parinfer for general code writing and when I'm move blocks of code around. I agree that parinfer sometimes does the wrong thing tho'...
For what it's worth, that strikes me as an expression of the core LISP philosophy. The language should support the tools (or their construction) best fit to the problem at hand, and you shouldn't feel pigeonholed by your tech.
maybe i'm missing the point @seancorfield - what does parinfer do for you that isn't structural editing ?
Because it re-structures the code as you indent/undent it -- which I find useful.
I can copy'n'paste a block of lines and then move it right/left into the right place, and all the parens are taken care of.
I do both -- structural editing and "regular" cut'n'paste/copy'n'paste -- which makes it less of a transition as I work across different types of files. If I was only ever editing "Lisp", I'd probably stick to more structural editing.
I use Atom as well with parinfer and I like it... and yes, sometimes it gets things wrong... but then again... so do I.
ah, ok - i generally have smartparens and strict-mode in emacs, kill will only ever kill a sexp and if you select a region which isn't a whole sexp and try and kill it you get an error
so you use the same kill/yank ops you use in non-lisp buffers, but they magically never mess up your lisp
For what it's worth, that strikes me as an expression of the core LISP philosophy. The language should support the tools (or their construction) best fit to the problem at hand, and you shouldn't feel pigeonholed by your tech.