Fork me on GitHub
#cider
<
2018-04-12
>
arrdem05:04:09

Waiting for the Travis build to go green but https://github.com/clojure-emacs/cider-nrepl/pull/517 should be ready to go

arrdem05:04:33

Turns out there's a JDK 1.7 compatible way to base64 encode some byte[]s

arrdem05:04:43

and addressed the typo

arrdem05:04:04

gonna take a look at re-doing the CIDER side of the changeset.

arrdem05:04:15

merge conflicts hit the original cut pretty hard

arrdem05:04:28

whatever. just gonna find a way to disable this feature in 1.7

bozhidar05:04:00

@arrdem I think that’d be best. As I mentioned in the ticket that’s going to be our final release supporting Java 7 anyways. No need to support a JDK which almost no one is using.

bozhidar05:04:56

As a server == something akin to using https://github.com/facebook/nailgun ? You’re looking to reduce the time it takes to spin the JVM, right?

arrdem05:04:44

It looks like technomancy has something for this - https://github.com/technomancy/grenchman which does at least some of what I'm after.

arrdem05:04:48

Been thinking about ways to do amortize lein's project loading over many task runs - the midldleware we use at work can make it pretty slow so having an nREPL that can persist a fully evaluated project state for many commands could speed things up a bit.

arrdem05:04:42

Yeah I remember using vim-clojure's nailgun whatever when I was first getting started.

bozhidar05:04:42

I think that alternatively you can defer the loading of your middleware as cider-nrepl does - all middlewares start life as dummies and the real code gets loaded the first time a middleware op gets invoked.

arrdem05:04:29

hummm is there prior art in CIDER right now for features with JVM or library requirements?

arrdem05:04:46

I know there's some compatability checking for refactor-nrepl and soforth

bozhidar05:04:12

@bhauman Yeah, tools like rebel-readline are prime candidates to share such functionality. Same goes for REPL-y, and every REPL client that bases its functionality on inspecting running REPL state, instead of some static code analysis (like Cursive does).

bozhidar06:04:14

@arrdem The clojure.spec support does something similar - it creates a couple of dummy functions in case the real ones don’t exist. I’m guessing in your case you dynamically require problematic class and that should be OK. I’m not very familiar with the refactor-nrepl codebase, so I can’t speak for it.

bozhidar06:04:52

You can also disable tests on 1.7 using a test selector, which might be acceptable as well and would move the version check to the client.

arrdem06:04:02

@bozhidar cool I'll take a peek at the spec stuff

arrdem06:04:48

lets see if I can get this adapted before my laptop dies and I'm done for the night 😉

arrdem06:04:45

@bozhidar how do you feel about adding a dependency on org.apache.commons.codec.binary.Base64 or something else from the Apache commons collection?

arrdem06:04:09

I've got an if-class macro all wired up which "solves" the 1.7 compat issue the way you'd expect

bozhidar06:04:50

I guess I shouldn’t answer the previous question then. 🙂

bozhidar06:04:51

In general I’m wary of adding a dependency to account for compatibility with barely used JDK - if more people were on 1.7 I’d be fine with this.

bozhidar06:04:08

But if this library is small I can live with adding it for one release and dropping it afterwards.

bozhidar06:04:28

(together with the support for Java 7)

arrdem06:04:12

Nah it looks like a monster.

arrdem06:04:39

Updated the patchset to return an {:error "\java.util.Base64\` is unavailable, \`slurp\` op is disabled"}` response

arrdem06:04:58

Alright. New patch is pushed and I'm out of power. Will check in in the morning.

arrdem06:04:31

the CIDER side of this is gonna get a little more interesting because it has to do a second nREPL op to get the image content now, but that's doable.

bozhidar06:04:15

Get some well-deserved rest!

bozhidar06:04:17

I was offline for a few days for the Easter holidays and I now it seems I’ve got a lot of catching up to do. 😄 Spending a few days in a remote Ukrainian village without Internet was definitely refreshing!

arrdem06:04:18

nice! I got to spend a couple days down at gramas for the first time in several years which was lovely. Rich may be on to something with all this hammock time talk 😉

bozhidar06:04:58

He certainly is! I confirm this every time when I spent an entire night not being able to figure something out and they after sleeping on it I come up with a much better approach in like 10 minutes. 😄

bozhidar06:04:52

I think many OSS projects are pretty messed up mostly because the only time you have for them is after work when your mind is not fresh and creative. And of course then you’re fine with cutting all sorts of corners.

theeternalpulse15:04:27

This is better than coming from work and not having the mental energy to touch a damn thing lol.

xiongtx20:04:21

> And of course then you’re fine with cutting all sorts of corners. Ironically, this hurts you the next day at work when you use the OS products! 😆

arrdem21:04:35

This is why you spend work hours on OS products and convince your manager that they’re a priority!

arrdem21:04:47

sharpen your :knife: