i need to go back to school.
ah, that's where the message I was replying to went 🙂
as someone going back to school, the number of arithmetic errors I've made doing linear algebra has been humbling
Great, thanks for sharing.
Thank a lot!
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)?
Consider applying for a job or consider starting a new job?
I guess the combo.
Or if you have different answers to the two options, both would be interesting.
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.
some of these will likely change as my life situation changes
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.
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? 😄
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!
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?
Yep, that is it.
You'll probably want to merge data_readers.clj if you use that.
Well, presumably uberjar does that
Frankly, that sort of stuff is best avoided
Most tools don't merge data_readers properly afaik.
Agree. Just remember that being a pre-req when I wrote an uberjar fn way back.
depstar does I believe: https://github.com/seancorfield/depstar/blob/5e605b019d6641cca22f47502a82ccbf1e540f12/src/hf/depstar/uberjar.clj#L83-L84
Also interesting to look at the other "clashes": https://github.com/seancorfield/depstar/blob/5e605b019d6641cca22f47502a82ccbf1e540f12/src/hf/depstar/uberjar.clj#L80
Nope. It changes behavior from clojure. In clojure, if you get 2 conflicting keys you get an error. That tool just silently merges them.
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.
The .cljc file can't actually support that anyway.
It's not read in a way to support it
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)They're allowed, but no features are selected.
You always end up on :default
Maybe that's a bug though
"idiotic-log4j2-plugins-file" 😆
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
Lein has a disgusting function which merges arbitrary xml
Oh, and lein violates the rules of apache license by not preserving each Copyright notice. Maven's uber does this.
Depstar ignores license files, so has the same problem.
Uberjars squash all the files together
It's like copying them into a directory
Because they're all in a single directory, it's got to decide how to put them together
@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.
I'm actually curious what you're doing to require the classpath be preserved?
uberjar can't store each project inside it's coordinate?
You mentioned tools that rely on scanning so you must be using one of those.
I will take a look at pack
FYI #depstar has its own channel now, in case folks have questions about it.
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).
Oh my... That sounds awful. It did give me a good chuckle though 😄
There are lots of comments in the log4j2 bugbase complaining about it, going back years 😐
Probably copied from lein
@kenny honestly, I looked at the merging code in existing tools and decided there had to be a better way.
Lambda actually support this out of the box with zips
Docker support is something I also particularly love, as it avoids this problem.
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?
Well, log4j2, clojure, webjars(maybe?) rely on this.
I was writing a tool at some point which relied on this too
There's a bunch of java libraries which rely on this behavior, hence the merging
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.
It handles licenses properly
Huh. Sounds like depstar should, perhaps, include a warning that if you're using any of those tools you may get unexpected behavior.
Well, it tries to merge them for you. They're known.
Not sure if it handles components.xml, or the new java service loader stuff.
Frankly, the approach seems bankrupt to me. Too many edge cases.
I like my tools to be a reliable foundation that I trust to work 100% of the time.
Fair enough. I have not hit a problematic case with depstar yet but I imagine it'd be a total nightmare to debug.
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.
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.
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.
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.
Think of all those wasted hours that could've been used for betterment... 🙂
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).