Fork me on GitHub
#off-topic
<
2019-11-08
>
borkdude07:11:55

Java lib author asking how he can make his lib more Clojure friendly: https://twitter.com/picocli/status/1192612734619115521?s=20

👏 2
bherrmann12:11:34

String docstring = "Usage: prog [options]\n\nOptions:\n-h, --help  Print help.";
    AbstractMap<String, Object> result = clj.docopt(docstring, args);

kulminaator10:11:51

anyone here using metabase ? are you happy with it ?

dominicm12:11:16

When making a comparison table, do you differentiate properties of the construct vs properties of the artifact, e.g. storing in namespace means singleton.

vemv12:11:11

hey, ace table (for anyone lacking context: https://clojurians.slack.com/archives/C06MAR553/p1573217468113700?thread_ts=1573136280.098800&amp;cid=C06MAR553)! kudos. I don't understand the question. I think those are rich terms which exact intent I forgot ;p

borkdude13:11:20

I'm often confused when people use the word transparent. Does it mean "easy to perceive" or "invisible"?

borkdude13:11:44

Async is handled "invisible".

dominicm14:11:21

In this context it means that it is invisible to someone. In this case, it is invisible to the start/stop concept that async is happening

mloughlin14:11:43

Surely, an appropriate time to use the phrase "abstraction"?

dominicm14:11:55

I'm inclined to avoid the word invisible as it has magical connotations. What I'm referring to is the same as the ability for you to layer caching into an existing thing, without that thing having to make everything aware of caching

dominicm14:11:42

Automatic could be a better word? I fear abstraction would imply I'd created my own async abstraction, which I've not.

dominicm14:11:00

Artifact vs construct is, the result vs what you type.

dominicm14:11:16

You type into a namespace, the result is that you have a Singleton

mloughlin14:11:12

It's possible there's no perfect way to describe the "transparent"/"invisible" stuff - look at literature on aspect-oriented programming, they have to invent their own jargon to get the point across

borkdude14:11:38

Maybe: async is supported?

dominicm14:11:00

Async means different things

borkdude14:11:37

You're already using that word though?

dominicm16:11:44

I mean that async is meaningless without contextually pointing out what is async

borkdude16:11:08

You put it very well 🙂

😂 1
andy.fingerhut18:11:57

I have a bash script I wrote that contains about half dozen commands that are run via sudo, and many more that are not run via sudo, and I would like only the ones with sudo to run as root. That all works as desired, except that the script is fairly long running (about an hour), and if more than 15 minutes or so pass between two sudo commands, the later sudo again prompts the user for their password. Does anyone know a way to enable the user entering their password once, regardless of the timing?

andy.fingerhut18:11:36

The script is only intended to work on Ubuntu Linux, so I'm fine with methods specific to that, if it makes it any easier.

Jan K18:11:43

Run the whole thing as root and use sudo to switch to the non-priviledged user for non-root commands (`sudo -u <normaluser> <command>`)

andy.fingerhut18:11:34

Hmm. I hadn't thought of that approach. It will be a lot of sudo -u <normaluser> commands, but yeah, seems workable.

andy.fingerhut18:11:11

Thanks! I'll give it a whirl and see how it goes.

hiredman18:11:36

you could also increase the timeout in the sudo configuration

hiredman18:11:14

or launch a subprocess that calls sudo in a loop and keeps the credentials fresh

andy.fingerhut18:11:59

Yeah, finding several alternatives via Google searches, too, including those.

andy.fingerhut20:11:01

@jkr.sw Your approach is mostly working, but I had not anticipated that some of the commands in my script are invoking other bash scripts, which use sudo to elevate privileges inside of them... Ugh.

andy.fingerhut20:11:37

I can make patches to those scripts that edit them in similar ways as the top level script, but it is getting tedious.

andy.fingerhut20:11:08

Maybe hiredman's subprocess idea is worth pursuing...