off-topic

https://github.com/clojurians/community-development/blob/master/Code-of-Conduct.md Clojurians Slack Community Code of Conduct. Searchable message archives are at https://clojurians-log.clojureverse.org/
idiomancy 2020-09-11T00:16:37.188400Z

i need to go back to school.

chucklehead 2020-09-11T00:19:32.189600Z

ah, that's where the message I was replying to went 🙂

💨 1
chucklehead 2020-09-11T00:20:08.190300Z

as someone going back to school, the number of arithmetic errors I've made doing linear algebra has been humbling

jumar 2020-09-11T02:54:38.192300Z

Great, thanks for sharing.

2020-09-11T05:06:57.192800Z

Thank a lot!

slipset 2020-09-11T12:56:13.199200Z

Just because it’s Friday. What would it take for you to consider applying for a job (given that you had one you’re not totally miserable in)?

👍 1
Ruy Valle 2020-09-11T12:58:16.199800Z

Consider applying for a job or consider starting a new job?

slipset 2020-09-11T12:58:47.200500Z

I guess the combo.

slipset 2020-09-11T12:59:13.200900Z

Or if you have different answers to the two options, both would be interesting.

Ruy Valle 2020-09-11T13:03:13.201400Z

I’ll start with the latter: • Using good/interesting tech/not using bad/uninteresting tech • Good compensation (salary, possibility for company stocks after an initial “checking I’m serious” period) • Flexibility (not feeling like I have to work a certain number of hours, not being overly rigid about company policies in general) • Company mission: I would very much like to contribute to something good for humanity, like making efficient systems that help reduce waste • The rest of the staff: feeling like people who work there are generally happy, friendly, have good values, are interesting • Possibility for growth: feeling like in the long-term I will be able to learn, take on larger/more important tasks if I want to, feeling like there is a future for the company, etc.

👍 3
Ruy Valle 2020-09-11T13:03:32.201600Z

some of these will likely change as my life situation changes

Ruy Valle 2020-09-11T13:07:31.201800Z

To apply I think it doesn’t take much. Right now I want to start applying to jobs to see what kind of response I get and to be able to negotiate well with my current job. I am quite happy with my current job, but I definitely want to get an idea of what my options are. I will likely apply to jobs I am not all that interested in, just to see what kind of response I get, and I will be upfront about that with my interviewers. I will tell them that I am happy with my current job and will only consider changing if I get a very appealing offer, and that I am applying at several places to get an idea of the options I have.

2020-09-11T14:47:29.204500Z

Because it’s Friday, I’ll repeat something I’ve said over the years only half joking - I want a job where I don’t have to report time. Projects/activities/time types/... argh. Just work, ok? 😄

👍 2
lread 2020-09-11T15:55:17.204700Z

I’m frugally “retired” ala Mr. Money Moustache… which I seem to be liking. I loved my paid jobs, but I like this even better. So now taking on a job for me is working on open source projects. I’ve dipped my toe in one non-Clojure project where I personally found the lead a bit difficult, so I left before dipping my whole foot in. All my Clojure efforts have been both fun and warmly received by a great community, so I’ll stick around!

👍 3
souenzzo 2020-09-11T20:27:13.208800Z

Is teorically possible to create a command-line tool that create uberjars like this: echo "$(clj -Sdeps):bundle" | uberjar --path - --output app.jar --main-class clojure.main --main-opts -m --main-opts my-app.main I'm missing some parameter/complexity?

dominicm 2020-09-11T20:29:22.209200Z

Yep, that is it.

kenny 2020-09-11T20:29:29.209500Z

You'll probably want to merge data_readers.clj if you use that.

dominicm 2020-09-11T20:29:43.210Z

Well, presumably uberjar does that

1
dominicm 2020-09-11T20:29:57.210400Z

Frankly, that sort of stuff is best avoided

dominicm 2020-09-11T20:30:17.211300Z

Most tools don't merge data_readers properly afaik.

kenny 2020-09-11T20:30:25.211400Z

Agree. Just remember that being a pre-req when I wrote an uberjar fn way back.

kenny 2020-09-11T20:31:04.212800Z

Also interesting to look at the other "clashes": https://github.com/seancorfield/depstar/blob/5e605b019d6641cca22f47502a82ccbf1e540f12/src/hf/depstar/uberjar.clj#L80

dominicm 2020-09-11T20:31:14.213300Z

Nope. It changes behavior from clojure. In clojure, if you get 2 conflicting keys you get an error. That tool just silently merges them.

✔️ 1
seancorfield 2020-09-14T04:08:30.257900Z

Note that depstar treats the data readers as EDN and merges them as such, so that doesn't work for .cljc files that contain reader conditionals. Clojure reads them as code, with conditionals supported. I'll implement that if anyone actually trips over that in real life. I'm not convinced it's worth implementing "on spec" in advance.

dominicm 2020-09-14T06:13:02.258800Z

The .cljc file can't actually support that anyway.

dominicm 2020-09-14T06:13:15.259Z

It's not read in a way to support it

seancorfield 2020-09-14T17:22:11.262Z

The code in Clojure reads the .cljc with reader conditionals allowed:

(let [read-opts (if (.endsWith (.getPath url) "cljc")
                        {:eof nil :read-cond :allow}
                        {:eof nil})
            new-mappings (read read-opts rdr)]
        (when (not (map? new-mappings))
          (throw (ex-info (str "Not a valid data-reader map")
                          {:url url})))
(I thought it supported .cljs as well, but it doesn't, although of course depstar has to support it for building projects that support ClojureScript)

dominicm 2020-09-15T07:21:20.263300Z

They're allowed, but no features are selected.

dominicm 2020-09-15T07:21:35.263500Z

You always end up on :default

dominicm 2020-09-15T07:21:44.263700Z

Maybe that's a bug though

kenny 2020-09-11T20:31:53.214100Z

"idiotic-log4j2-plugins-file" 😆

dominicm 2020-09-11T20:32:24.215100Z

The classpath isn't supposed to be flat. There's plenty of tools which rely on scanning to work, and hopefully your uberjar is kind enough to cover the tools you use

dominicm 2020-09-11T20:32:57.215900Z

Lein has a disgusting function which merges arbitrary xml

dominicm 2020-09-11T20:33:33.217Z

Oh, and lein violates the rules of apache license by not preserving each Copyright notice. Maven's uber does this.

dominicm 2020-09-11T20:34:51.217700Z

Depstar ignores license files, so has the same problem.

dominicm 2020-09-11T20:36:43.218400Z

Uberjars squash all the files together

dominicm 2020-09-11T20:37:01.218700Z

It's like copying them into a directory

dominicm 2020-09-11T20:37:22.218900Z

Because they're all in a single directory, it's got to decide how to put them together

dominicm 2020-09-11T20:38:27.220400Z

@souenzzo I'm the author of pack, which is the only clojure uberjar tool (I know of) which preserves the classpath. It uses classloader tricks to achieve that.

kenny 2020-09-11T20:41:44.220800Z

I'm actually curious what you're doing to require the classpath be preserved?

souenzzo 2020-09-11T20:41:45.221Z

uberjar can't store each project inside it's coordinate?

kenny 2020-09-11T20:42:57.221200Z

You mentioned tools that rely on scanning so you must be using one of those.

souenzzo 2020-09-11T20:44:25.221400Z

I will take a look at pack

seancorfield 2020-09-11T21:36:52.222500Z

FYI #depstar has its own channel now, in case folks have questions about it.

seancorfield 2020-09-11T21:38:35.222600Z

Don't get me started on how bad that was to deal with at work... logging just randomly failed on some systems but not others (for JARs built on different systems -- the same JAR worked identically, or failed identically, on whichever system you deployed it).

kenny 2020-09-11T21:40:27.223100Z

Oh my... That sounds awful. It did give me a good chuckle though 😄

seancorfield 2020-09-11T21:43:07.223300Z

There are lots of comments in the log4j2 bugbase complaining about it, going back years 😐

🤪 1
dominicm 2020-09-11T22:02:33.223600Z

Probably copied from lein

dominicm 2020-09-11T22:06:41.223800Z

@kenny honestly, I looked at the merging code in existing tools and decided there had to be a better way.

dominicm 2020-09-11T22:06:57.224Z

Lambda actually support this out of the box with zips

dominicm 2020-09-11T22:07:23.224200Z

Docker support is something I also particularly love, as it avoids this problem.

kenny 2020-09-11T22:08:23.224400Z

Ohh. I assumed that given the plethora of tools you mentioned previously that it'd be highly likely to run into a scenario where the uberjar tool did not work as expected. It sounds like it may be more of an edge case?

dominicm 2020-09-11T22:09:39.224600Z

Well, log4j2, clojure, webjars(maybe?) rely on this.

dominicm 2020-09-11T22:10:09.224800Z

I was writing a tool at some point which relied on this too

dominicm 2020-09-11T22:10:24.225Z

There's a bunch of java libraries which rely on this behavior, hence the merging

dominicm 2020-09-11T22:11:51.225200Z

Unfortunately my notes didn't start until after this project, but the maven shade plugin's source is very instructive wrt properly handling this. It's the closest tool to correct.

dominicm 2020-09-11T22:12:07.225400Z

It handles licenses properly

kenny 2020-09-11T22:12:35.225700Z

Huh. Sounds like depstar should, perhaps, include a warning that if you're using any of those tools you may get unexpected behavior.

dominicm 2020-09-11T22:16:28.225900Z

Well, it tries to merge them for you. They're known.

dominicm 2020-09-11T22:16:50.226100Z

Not sure if it handles components.xml, or the new java service loader stuff.

dominicm 2020-09-11T22:17:08.226300Z

Frankly, the approach seems bankrupt to me. Too many edge cases.

dominicm 2020-09-11T22:17:24.226500Z

I like my tools to be a reliable foundation that I trust to work 100% of the time.

kenny 2020-09-11T22:20:05.226700Z

Fair enough. I have not hit a problematic case with depstar yet but I imagine it'd be a total nightmare to debug.

dominicm 2020-09-11T22:21:55.226900Z

Exactly. I've hit weird stuff one too many times in my career. I'd rather do things at that level "properly" - or at least according to original intent without stripping features.

dominicm 2020-09-11T22:22:26.227100Z

I'm not too zealous with programming perfection or anything. But I feel like the tools we build on need to have our trust. Libraries, etc.

✔️ 1
dominicm 2020-09-11T22:26:03.227400Z

Perfection isn't the right word. I don't aim for correct programs. Bugs are ok. We're as inaccurate as the world lets us be. Embrace the chaos.

dominicm 2020-09-11T22:27:43.227600Z

But wasting time on why logging doesn't work is a pointless use of human effort that derives from chasing a clever trick to gain a single deployable, at the expense of breaking the model of how the path works. Better to find an alternative.

kenny 2020-09-11T22:29:14.227800Z

Think of all those wasted hours that could've been used for betterment... 🙂

2020-09-11T22:58:21.230600Z

not sure what's a good place to (re-)mention this -- i have seen a few mentions of the http://clojurians.net site having difficulty. atm it's "Application error" for me. it seems that (used to be?) was the way to get invites(?) to get access to clojurians.slack and various resources link to it (e.g. http://calva.io). is this something that's worth trying to do something about? perhaps it is being attended to and i haven't missed such a message (though a quick search didn't seem to turn up anything relevant).