clojure-europe

For people in Europe... or elsewhere... UGT https://indieweb.org/Universal_Greeting_Time
2020-10-02T06:19:14.123400Z

Morning

slipset 2020-10-02T06:50:47.123800Z

God morgen!

2020-10-02T06:53:29.126200Z

God morgen!

pez 2020-10-02T06:54:42.127100Z

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…

2020-10-02T07:00:35.127600Z

partition sounds fine

pez 2020-10-02T07:39:47.130300Z

Yeah. It seems just asking the question helped. 😃

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

2020-10-02T07:51:27.131600Z

might https://clojure.github.io/clojure//clojure.core-api.html#clojure.core/random-sample be helpful for this ?

👍 2
pez 2020-10-02T07:59:21.134600Z

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.

plexus 2020-10-02T06:58:28.127500Z

Good morning and HAPPY FRIDAY 😸🤡👻

borkdude 2020-10-02T07:10:55.127900Z

Morning!

plexus 2020-10-02T07:30:14.128800Z

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

dharrigan 2020-10-02T07:38:37.129100Z

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

plexus 2020-10-02T07:38:57.129400Z

not helpful @dharrigan

dharrigan 2020-10-02T07:39:07.129700Z

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

dharrigan 2020-10-02T07:39:16.130Z

I've heard good things about using WSL2 on Windows

👍 3
dominicm 2020-10-02T07:51:11.131500Z

Gitbash does work, but wsl2 worked better. I believe John Stevens may have an article or guide on this

2020-10-02T07:55:35.131900Z

Morning

synthomat 2020-10-02T07:58:01.133300Z

@plexus but what exactly is special about windows? If IntelliJ is an option I would go with that and Cursive

synthomat 2020-10-02T07:58:51.134500Z

I even have installed a windows on a VM and use it as a remote Dev-Station. I‘m feeling so filthy 😭

RAMart 2020-10-02T08:16:17.137200Z

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

2020-10-02T08:28:52.137900Z

as someone who sticks w/emacs all the time. How easy is it to move from IntelliJ/VSCode/Atom+Chlorine?

2020-10-02T08:29:04.138200Z

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

2020-10-02T08:29:20.138600Z

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

raymcdermott 2020-10-02T08:44:52.144700Z

I was gonna go with happy wet ness day but it's a friday, still wet though ... good morning

RAMart 2020-10-02T08:50:12.150Z

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

slipset 2020-10-02T08:52:05.152200Z

@otfrom Intellij has decent emacs bindings these days, albeit slightly different from Emacs. Same goes for VS/Calva.

plexus 2020-10-02T09:04:15.153700Z

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

slipset 2020-10-02T09:48:50.155100Z

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.

plexus 2020-10-02T09:51:09.155600Z

I guess I use Spacemacs' "search project" for that. It's just a textual search but it works well.

pez 2020-10-02T10:07:50.159Z

@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?”

pez 2020-10-02T10:09:35.160100Z

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.

ordnungswidrig 2020-10-02T10:14:28.160300Z

Good friday!

2020-10-02T10:17:14.161500Z

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

ordnungswidrig 2020-10-02T10:17:34.161600Z

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.

pez 2020-10-02T10:35:48.164700Z

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

slipset 2020-10-02T10:38:33.164800Z

So does Cider

slipset 2020-10-02T10:39:18.165Z

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)

2020-10-02T11:02:11.165300Z

🙂

2020-10-02T11:02:26.165700Z

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

2020-10-02T11:02:48.166100Z

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

orestis 2020-10-02T11:05:59.167200Z

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

👍 1
2020-10-02T11:06:04.167300Z

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.

2020-10-02T11:06:39.168200Z

@orestis nothing wrong with vim at all. I just got differently damaged to start with. vim at least allows the above as well ^^

pez 2020-10-02T11:08:42.169900Z

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.

thomas 2020-10-02T11:42:56.170400Z

mogge

ordnungswidrig 2020-10-02T11:47:09.170500Z

Oh, sorry, I read that wrong 🙈

2020-10-02T11:51:44.170800Z

@pez interesting

2020-10-02T11:52:16.171400Z

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

2020-10-02T11:52:57.172100Z

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

2020-10-02T11:53:32.172900Z

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

pez 2020-10-02T11:54:33.173600Z

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

2020-10-02T11:54:45.173800Z

interesting....

2020-10-02T11:54:55.174100Z

kondo is what I'm trying to please here

borkdude 2020-10-02T11:55:02.174400Z

There is an issue in progress for this

borkdude 2020-10-02T11:55:27.174700Z

PR: https://github.com/borkdude/clj-kondo/pull/1025 But tests are failing, so if you have time to help dharrigan :)

borkdude 2020-10-02T11:55:42.175100Z

Else I'll take a look this weekend

pez 2020-10-02T11:56:49.175700Z

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

2020-10-02T11:57:11.175900Z

that is an advantage

borkdude 2020-10-02T11:58:12.176400Z

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

borkdude 2020-10-02T11:58:34.177Z

as in https://github.com/borkdude/clj-kondo/issues/1016 is created by you right?

pez 2020-10-02T11:58:41.177400Z

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

borkdude 2020-10-02T11:58:51.177600Z

this is only like one week ago - ok, two

pez 2020-10-02T11:59:13.178100Z

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

borkdude 2020-10-02T11:59:27.178500Z

who is @expez on github then

pez 2020-10-02T11:59:44.178800Z

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

borkdude 2020-10-02T12:02:08.179300Z

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

pez 2020-10-02T12:02:21.179800Z

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

borkdude 2020-10-02T12:02:23.179900Z

apparently pez-something is popular in Scandinavia

dharrigan 2020-10-02T12:03:47.180500Z

I dislike putting a special marker such as _ in front. It feels out-of-place and reminds me terribly of class level global variables.

pez 2020-10-02T12:12:36.182Z

I want the help from clj-kondo to tell me if I am not using variables. I might stop using them and such.

slipset 2020-10-02T12:42:38.183400Z

@borkdude you’re thinking about expez :)

slipset 2020-10-02T12:44:02.183800Z

expez is my colleague.

borkdude 2020-10-02T12:44:12.184Z

I figured :)

borkdude 2020-10-02T12:57:16.184700Z

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

🎉 3
slipset 2020-10-02T13:04:53.184900Z

w00t!