Fork me on GitHub
#off-topic
<
2023-05-18
>
teodorlu10:05:47

Hi! I just watched an amazing conj talk about compiling Clojure to Java and Rust (link below). Write clojure with some metadata hints for types, and poof, you get Rust source. Have similar things been tried for compiling to webassembly? I imagine a similar approach could work well. https://m.youtube.com/watch?v=terdLf0ribg&amp;list=PLZdCLR02grLpIQQkyGLgIyt0eHE56aJqd&amp;index=23&amp;pp=iAQB

☝️ 6
Kent Bull01:05:22

Wow, this is cool.

2
borkdude15:05:42

Does anyone know a dependency with an insane amount of transitive dependencies? I'm trying to force a "too long filename" problem on Windows which happens only with long classpaths

p-himik15:05:30

Can't you force it with [nested] functions with long names?

p-himik15:05:36

Function names get converted to class names. Nested functions include the name of the outer function.

borkdude15:05:53

I need something I can add to deps.edn class names are not part of the classpath, just .jar files and directories

Daniel Craig15:05:33

I guess it would be possible to make your own right?

p-himik15:05:21

List all of Clojars and add it all to deps.edn? :)

😆 4
Daniel Craig15:05:52

Yeah that's what I'm thinking! You just have to make sure they're available to client code as transitive dependencies

borkdude15:05:51

yeah, but how do I get all of clojars (or at least, 100 or so) in a deps.edn easily? I tried copy pasting some stuff but it gets tedious very fast

borkdude15:05:15

curl  | jet --from json --keywordize -t '(map (fn [{:keys [group_name jar_name latest_release]}] {(symbol group_name jar_name) {:mvn/version latest_release}}))'

borkdude15:05:25

I added 100+ deps now and still can't repro it

borkdude15:05:35

I'll just wait for the Windows people to come with a repro then

Daniel Craig15:05:11

Does deps.edn put transitive dependencies on the classpath of client code like this by default? Gradle used to but as of Gradle 5 it no longer does

borkdude15:05:47

transitive deps are deps too, so I don't understand why gradle would not add them to the classpath

Daniel Craig16:05:03

I don't know deps.edn particularly well but it might have a similar approach to what's described here in the docs

Daniel Craig16:05:24

but then again, gradle is not at play here and may be totally unrelated

respatialized16:05:55

tech.ml.dataset, particularly when you begin adding its https://techascent.github.io/tech.ml.dataset/tech.v3.libs.parquet.html, is a good candidate. I have had to move my m2 dir because of the long classpath issue in the past with projects relying on it.

lassemaatta17:05:02

are you sure the problem is a really long classpath itself or rather a really long entry within the classpath? I remember running into various "too long filename" problems years (or actually decades) ago with C compilers in windows with c:\work\projects\foo\ .. deeply nested.. \bar.h

4
teodorlu09:05:33

I've run into "too long filename" Windows too. In my case, moving from C:\Users\teodor\stuff\too\long\didnt\read\project\subproject\bundles\some-bundle\some-thing to C:\dev solved it for me then. I think there was a limit of 250 or so characters.

borkdude09:05:59

@U3X7174KS The newly released deps.clj should solve it now. Try scoop install clj-deps from the scoop-clojure by @UBLU3FQRZ

teodorlu10:05:12

@U04V15CAJ The issues I ran into were not Clojure related, sorry if that was unclear! Just wanted to share what I did to solve it. I think it's quite common for Windows developers to just assume that their files are being put "somewhere near toplevel".

borkdude10:05:50

ok just mentioning in case

👍 2
teodorlu10:05:04

Glad you were able to fix it! Last time I tried using deps on Windows (probably four years ago), I just got stuck and gave up.

littleli13:05:40

Yes. This is a general mess.

Ludger Solbach19:05:05

apache spark has an aweful lot of dependencies, if you are still searching.