This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (12)
- # asami (5)
- # aws (3)
- # babashka (12)
- # beginners (86)
- # calva (14)
- # chlorine-clover (3)
- # cider (13)
- # clara (8)
- # cljdoc (1)
- # cljfx (2)
- # cljsrn (1)
- # clojure (69)
- # clojure-berlin (6)
- # clojure-czech (14)
- # clojure-dev (17)
- # clojure-europe (76)
- # clojure-france (14)
- # clojure-nl (43)
- # clojure-norway (6)
- # clojure-spec (7)
- # clojure-uk (13)
- # clojurescript (4)
- # code-reviews (1)
- # conjure (16)
- # cursive (2)
- # data-science (3)
- # datascript (1)
- # datomic (41)
- # events (4)
- # fulcro (9)
- # hugsql (3)
- # instaparse (5)
- # jobs (3)
- # malli (1)
- # mid-cities-meetup (1)
- # nrepl (22)
- # off-topic (25)
- # onyx (1)
- # pedestal (3)
- # remote-jobs (3)
- # shadow-cljs (61)
- # sql (22)
- # xtdb (12)
Good morning! My brain is stuck. I have a sequence from which I want to pick
n number of items evenly spaced out. So, like
take but not the first
n. Anyone understand what I am talking about and have an idea about how to go about it? Hmm, maybe I can partition and then pick
Yeah. It seems just asking the question helped. 😃
(->> all (partition-all (/ total n)) (map first))
might https://clojure.github.io/clojure//clojure.core-api.html#clojure.core/random-sample be helpful for this ?
Ah, very nice. I’ll consider if I should use that instead. My use case is that I am producing test data for a unit test suite. Introducing randomness might or might not be what I want. We already have quite a lot of generative testing, so I’m not afraid of random per se. Just need to ponder it a bit. 😃 I might use both, eventually.
Gitbash does work, but wsl2 worked better. I believe John Stevens may have an article or guide on this
@plexus but what exactly is special about windows? If IntelliJ is an option I would go with that and Cursive
I even have installed a windows on a VM and use it as a remote Dev-Station. I‘m feeling so filthy 😭
@plexus Same situation here. We used IntelliJ w/ Cursive in the past. This time we use Atom and Chlorine and a bunch of other Packages.
as someone who sticks w/emacs all the time. How easy is it to move from IntelliJ/VSCode/Atom+Chlorine?
I was gonna go with happy wet ness day but it's a friday, still wet though ... good morning
@otfrom I do the Clojure trainings here and for the courses I stick to the tools used by the attendees so I can answer questions. I used IntelliJ, VS Code and Atom (for Windows). Although it‘s getting better, I‘m always super happy when returning back to my Emacs (macOS). In my opinion it‘s just easy to switch if you use basic operations.
@otfrom Intellij has decent emacs bindings these days, albeit slightly different from Emacs. Same goes for VS/Calva.
yeah so I recommeded she starts with getting WSL set up, and then get the latest OpenJDK, and follow the linux instructions for Clojure CLI. She's used IntelliJ and VS Code in the past, so we'll probably go with Cursive or Calva
The one thing I find indispensable in Cursive is
find-usages . I know Cider has a version of that, it's just that Ciders version only checks within the loaded ns's whereas Cursive searches your whole project.
CMD-. for me in cider and it depends (like many lisp environments) from having the NS to be searched to be loaded. One of the advantages of Intellij IDEA’s “offline” code analysis.
inf-clojure for emacs, which is ways simpler thatn cider, also supports jumping to a var’s source.
But my thing is finding all usages, not jump to definition which in Cider is > M-. runs the command cider-find-var (found in cider-mode-map), which > is an autoloaded interactive compiled Lisp function in > ‘cider-find.el’. > > It is bound to M-., <menu-bar> <CIDER Interactions> <Find (jump to)> > <Find definition>. > > (cider-find-var &optional ARG VAR LINE)
I guess I use Spacemacs' "search project" for that. It's just a textual search but it works well.
@otfrom: is your question how easy it is to switch to emacs from those other tools? If so, my experience is that it is quite hard. I consider myself a quick and eager learner, but I'm also at an age where things I learn don't stick as long as they used to. So I could get up to speed using emacs reasonably quickly, but notice that today when I pick it up it is a bit like that first experience: ”OK, so how do I do anything with this?”
I'd say it is a more lot of relearning than it is switching between other more modern editors which have more paradigms in common with each other.
@pez I think I'd be going the other way around. I've got 20+ yrs of using emacs and want to try out other editors (to steal their ideas apart from anything) and find I just flail around in them and that they are difficult to set up and use.
I've seen quite a lot of struggle from Emacs users trying out VS Code. With Calva I've tried to make it reasonably familiar to CIDER users, but it only takes you so far. If you do pick Calva up, you are welcome to vent frustration and ask for help in the #calva channel. 😃
tho my general frustration w/IDEs is that I can't see enough of what I want to see which is other bits of code. If I could find another editor that allowed me to do this I might consider switching.
@orestis nothing wrong with vim at all. I just got differently damaged to start with. vim at least allows the above as well ^^
Whether VS Code could be configured like that is certainly a question you can ask in #calva. My guess is you can't get all the way, but I've seen quite bare bone chrome setups.
using new funky destructuring things. Reasonably happy with how it has separated getting things out of a map with putting them in a vector in the right order
I'm leaving in the
:as as documentation for me, but I'm not sure if there is a better way to do it than that
PR: https://github.com/borkdude/clj-kondo/pull/1025 But tests are failing, so if you have time to help dharrigan :)
_new is a better way to do it, because it also tells yourself that it is not used. 😃
@pez Weren't you the same person asking exactly for what 1025 implements? now I'm puzzled
I would never express myself like this, btw: > but I don’t want to refactor a rather large production app to conform to the worldview of the tooling du jour
I dislike putting a special marker such as
_ in front. It feels out-of-place and reminds me terribly of class level global variables.
I want the help from clj-kondo to tell me if I am not using variables. I might stop using them and such.
@slipset Well, you can tell your colleague that the tooling du jour now has granted his wish, credits to dharrigan for initiating the PR