Fork me on GitHub

God morgen!


God morgen!


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 firsts…


partition sounds fine


Yeah. It seems just asking the question helped. 😃

(->> all
     (partition-all (/ total n))
     (map first))


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.


Good morning and HAPPY FRIDAY 😸🤡👻


I have a mentee who's getting started with Clojure on a windows machine. Any tips?


Yes, reformat and install Linux..... 😛


I know, I'm being silly this early morning.


I've heard good things about using WSL2 on Windows

👍 9

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?


is there a lot of relearning or is it pretty easy to swtich


I find myself pretty frustrated when I've tried switching over to other tools


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.


It’s 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. Btw. inf-clojure for emacs, which is ways simpler thatn cider, also supports jumping to a var’s source.


So does Cider


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)


Oh, sorry, I read that wrong 🙈


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. 😃


I reallise that my problem with other tools is my problem, not the tools 😄


it is what I get for using a pre-CUA editor


I gave up and went back to 10 years of Vim muscle memory 🙂

👍 3

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.


@pez interesting


I think the above type of layout has been my biggest barrier in using IDEs in general


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


You can prefix the :as symbol with an underscore to prevent clj-kondo from flagging it.




kondo is what I'm trying to please here


There is an issue in progress for this


PR: But tests are failing, so if you have time to help dharrigan :)


Else I'll take a look this weekend


I think _new is a better way to do it, because it also tells yourself that it is not used. 😃


that is an advantage


@pez Weren't you the same person asking exactly for what 1025 implements? now I'm puzzled


Haha, it wouldn’t surprise me if I was. I did say that I am of age above, didn’t I?


this is only like one week ago - ok, two


Haha, yeah, I am not that old. That is an impersonator.


who is @expez on github then


I am just @pez on github. ¯\(ツ)


Oh right, I'm mixing things up. I think it's a colleague of @slipset


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


apparently pez-something is popular in Scandinavia


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.


@borkdude you’re thinking about expez :)


expez is my colleague.


I figured :)


@slipset Well, you can tell your colleague that the tooling du jour now has granted his wish, credits to dharrigan for initiating the PR

🎉 9