ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. Swayze Para: did you ever stop to ask why :/ seems youre opening yourself up to being a good robot
  2. Swayze if you did understand the underlying reason for not doing something that should be the reason not because 'you might've read it somewhere'
  3. Swayze feels like ..
  4. Para Swayze: Why to what?
  5. Para The reasons for not using sun.* packages have been clear since time immemorial, and so are the counterarguments. I happened to agree from the get-go with the "don't" side.
  6. Para I've also used openjdk and other non Sun JDKs years ago where one couldn't rely on these classes existing/doing what they advertised to do exactly, so it has always been easier to just work with the given instead of trying to claim that I know better than the people who literally built the thing.
  7. Para And I'm sure I've transitively used something that did Weird and Dangerous things with sun.* classes, but I'm not responsible for other's choices in that regard either; if a dependency broke due to mystery issues (NIO in JDK7 springs to mind), it would get replaced.
  8. * Bombe is firmly in camp Para on this one. :)
  9. johnjay question. is there a way to use the lsp-server 'jdtls' with pre-21 versions of openjdk? the readme says version 21 is required, but this seems overly strict to me
  10. ernimril johnjay, what is the reason you want to use an old jdk?
  11. johnjay i assume they are still used sometimes. 11 and 17 for example are available in debian, and my mint system came with 11 installed by default
  12. johnjay fortunately debian allows multiple versions to coexist so I can just install 21. but jdtls gives an error if you try to use it with a pre-21 java
  13. johnjay and jdtls is the only lsp for java i am aware of
  14. ernimril so what is the problem with running jdtls with java 21 or later? (I would use java 25 most probably)
  15. ernimril if you want to compile for an older jdk you can use "-release 17" as a compiler flag, that will set the language _and_ API level to that given release
  16. johnjay well. presumably if i were debugging or analyzing java 17 code with jdtls it would show me features and classes that might not exist or be available
  17. johnjay as i said i don't know much about language-server-protocol in java, if there are others besides jdtls that would be useful to know
  18. dreamreal Do the lsps respect library version numbers? Like, okay, you use it with 25, but 25 introduces method X on class Y with @since 25, if you're using -release 17 does it still report Y.X as a possible completion?
  19. ernimril I have not tried it, I would consider it a bug if it it does
  20. johnjay i'm not sure i understand, i thought -release was a flag for javac ?
  21. ernimril yes, that is where it originated
  22. johnjay in the situation i was in my system was reporting 11 from 'java -versoin' and then it refused outright to run jdtls from a binary download on my mint pc
  23. johnjay meaning, jdtls requires 21 or later. i would *guess* that means it supports 25 completions as well. is there a class or member i could use to check?
  24. ernimril ct.sym has the information about what classes and methods are in each release (but it is binary so not trivial to read)
  25. johnjay would it maybe say in release notes?
  26. dreamreal I still don't know what would make an LSP compelling
  27. johnjay it provides completions, that's what i use it for mainly
  28. dreamreal sure. But why LSP? Does it cost less than eclipse or idea?
  29. johnjay that way i can use vscode or vim instead of a large ide
  30. johnjay in terms of wait time for them to load idk, maybe once idea loads fully they take comparable time?
  31. ernimril johnjay, when was the last time you tried idea? on what hardware?
  32. ernimril johnjay, it starts in a few seconds on my laptop (a few years old)
  33. dreamreal How many times are you starting your IDE anyway? That's like refusing to use java because the startup isn't <2ms
  34. dreamreal My IDEA has a running time of about 3 minutes less than my system uptime right now
  35. dreamreal mostly because I have to connect to a bunch of other services too and I just started it AFTER them, not really a reasoned "oh I must run things in this order"
  36. johnjay ernimril: i did try it for a few seconds but in my window manager i think i had something amiss, i couldn't close it
  37. johnjay but you're right it does seem faster than I remember
  38. nimaje the promise of LSP is to split away IDE features from IDEs into a LS, so that you can just use whatever editor as long as it supports LSP, that doesn't fully work out because LSP isn't that good a protocol. There is at least one project that turns idea into a java language server https://github.com/SuduIDE/ideals
  39. javabot nimaje's title: "GitHub - SuduIDE/ideals: Turns IntelliJ IDEA into a generic LSP server"
  40. nevet GitHub - SuduIDE/ideals: Turns IntelliJ IDEA into a generic LSP server
  41. johnjay nimaje: what are its shortcomings in your view? i've never really thought about its technical merits
  42. nimaje I don't remember fully, there where some reasons why you couldn't just have some generic LSP client, but still needed some language or server (not sure which) specific plugin to map stuff to your editor, of course smaller then a plugin for the language itself as the LS does most of the stuff and I think the protocol was some json messages via fake-http, which isn't really compatible to http and most
  43. nimaje implementations of that fake-http were broken in their own way
  44. jreicher nimaje: the promise of LSP is not just a potential diversity of editors. It means that even if you use just on editor, the maintainers of the editor don't need to write support for multiple different languages.
  45. jreicher The protocol isn't just for interoperability of software; it's also for interoperability of teams.
  46. dreamreal not sure interop of TEAMS is really all that affected
  47. dreamreal build tools would be the lever there
  48. jreicher Well AFAICT (from a distance), the VSCode maintainers haven't had to write Java intelligence. The Eclipse maintainers have done it for them. That's what I mean.
  49. dreamreal Yeah, I get the benefit as long as it works, but that's ... okay, so you're talking about different teams than I am. Shut up!
  50. dreamreal :D
  51. jreicher :)
  52. dreamreal jreicher: ++
  53. nevet jreicher now has karma of 1.
  54. nimaje jreicher: isn't that what I wrote? the developer of a editor only needs to write a LSP client, not full support for every language the editor should support
  55. dreamreal I think you guys are saying similar things, yes
  56. waz idea loads on startup for me
  57. waz VS code is just missing too many things I depend on
  58. jbosmans i'll double second that regarding vs code <-> intellij
  59. jreicher I've avoided vscode so far but I get the impression it's almost designed not to have much by default. The "extensions" are actually required. Might make sense for there to be a set of "core extensions" that are always installed by default.
  60. * kcomhnall havent used vscode since leaving coding bootcamp in 2020
  61. kcomhnall it's cool for Javascript projects
  62. Para It's basically typescript's companion.
  63. Para And fwiw it's kinda okay.
  64. kcomhnall if I *had* to use anything else besides intellij - I'd be using eclipse
  65. jreicher What's the advantage of eclipse over vscode with the eclipse language server?
  66. jreicher "Feels better"? (That's a thing; I'm not being sarcastic)
  67. kcomhnall dunno - but I won't be finding out anytime soon.
  68. kcomhnall I get to try out the spring tools I guess
  69. kcomhnall hm, vscode has spring extentions - unlike the full integration with eclipse. I suppose that's one advantage
  70. * kcomhnall goes back to understanding how spring aop handles classes that dont implement an interface
  71. jreicher kcomhnall: don't all classes "imply" an interface?
  72. jreicher (One of the things I don't like about typical OO, to be honest)
  73. PocketKiller I always walked around with the thought that every class is an implmentation of itself
  74. PocketKiller implementation*
  75. jreicher Yep
  76. kcomhnall AOP compliments OO...we know that. jreicher I actually mean in the context of proxying and if it uses the JDK Dynamic proxies or does something else.
  77. jbosmans yeah, well, imho there's no advantage of vs code over eclipse or vice versa, it'd be silly to not be using a jetbrains ide
  78. bdkl I was just about to ask if I should take advantage of my student status for jetbrains, so I guess there's my answer lol
  79. jbosmans bdkl, fwiw right, and ymmv etc :)
  80. jbosmans overall i'd say it's worth it
  81. jbosmans "says someone" etc :)
  82. bdkl jbosmans: i always appreciate the sage advice of my betters
  83. kcomhnall complements*
  84. kcomhnall brain is mush right now
  85. jbosmans bdkl, no-one is better, there's only those who aspire to grow, and those who .. don't
  86. jbosmans in any case, if price isn't an issue i would recommend a jetbrains ide, having used all the others myself way back when
  87. jbosmans well, probably not "all" the others :)
  88. jreicher I periodically repeat this conversation at work and that feedback is what I consistently get too. Jetbrains still seems to be the best.
  89. jbosmans sounds familiar :)
  90. jbosmans we ought to get paid
  91. jreicher People who use other things seem to have a "personal" preference rather than an objective evaluation. For example they might have an historic attachment to older tools and don't to learn something else unless the difference is very large.
  92. jbosmans fwiw jetbrains isn't the underdog anymore
  93. jbosmans yeah that makes sense
  94. jbosmans i quite liked eclipse "before", and didn't like intellij "at first'
  95. jbosmans *"
  96. jbosmans i grew up in a different time tho, and imho the way jetbrains/intellij did/made their ide(s) was best
  97. jbosmans code centric iirc way back when
  98. jbosmans quite different from attempts at "wizard driven development"
  99. kcomhnall heh, 'before' makes me think of the action taken by an aspect at a particular join point. an "Advice"
  100. jbosmans :D
  101. jreicher What is "wizard driven development"? (Sounds horrible, although I think I saw it)
  102. jbosmans AOP ftw :-) well, then again, no
  103. kcomhnall heh
  104. jbosmans i have/had a book about that
  105. jbosmans never did get around to properly levering AOP
  106. jbosmans spring supports it with proper annotations
  107. jbosmans jreicher, it's like "create a new servlet in this project" etc
  108. jbosmans you'd get a form or two to fill out and then proper changes are made for you
  109. jbosmans in the idea scenario ;)
  110. jreicher It gives you a code template that you then fill in, or it tries to write all the code? And what tools had this? I get it for very limited system, but a general purpose programming language??? Hell no.
  111. jbosmans yeah, it's sort of like "if you call this method on this object, do this or that before or after"
  112. jbosmans it can/could also be done for many similar invocations etc
  113. jbosmans i think in the long run the conclusion most people made was "we need to maintain this as well"
  114. jbosmans which was kind of a bummer
  115. kcomhnall ugh...found my answer : "By default, CGLIB is used if a business object does not implement an interface"
  116. kcomhnall https://docs.spring.io/spring-framework/reference/core/aop/introduction-proxies.html
  117. jbosmans mm sorry i came late to the party
  118. kcomhnall nothing much going on - just quizzing myself or some things.
  119. jbosmans wrapping/extending actual classes is always more "painful" than doing so for interface implementations
  120. jbosmans well, at least " having it done for you"
  121. jbosmans <- nite nite