ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. noobiewan Hi, is there a channel dedicated to Spring?
  2. cheeser not that i'm aware of. at least not on libera.
  3. GreenResponse there is #spring.io but it has only 2 people there
  4. dreamreal noobiewan: if you have a question, ask
  5. dreamreal there are people who know spring well here
  6. cheeser the poor sods
  7. Swayze lol
  8. Swayze that speaks nothing to the actual popularity and commerical use cases for spring
  9. Swayze especially with all these so called 'supply chain' hacks on the public non-curated eco-systems of late
  10. Swayze non-centrally-curated*
  11. Swayze and the last decade of performance and language enhancements
  12. Swayze java and spring is not going anywhere anytime soon ...
  13. dreamreal I'm not sure what the point would be
  14. Fiji the point would be we're here to argue about why quarkus is better than spring!~!!
  15. cheeser fuck yeah!
  16. dreamreal argue away then
  17. dreamreal I'll watch from way over here
  18. Para Ah, the Jerry Springer method. "He's cheating on you. I'll just leave this knife here. Discuss."
  19. dreamreal nah, it's just not my monkey, not my circus
  20. dreamreal if people want to have that argument, they're welcome to, it's just not mine
  21. Para As my high school principal told us on the day of graduation, "Clowns are leaving but the circus will remain."
  22. noobiewan I'm just starting with Spring and I'm trying to figure out what's the best way to write a simple, run-once-or-twice "script"? I just want to run some experiments or have some utilities that I can run from time to time, but taking advantage of the spring context (database configs etc). All ideas I got from LLMs are a bit cumbersome, nothing quick and dry, like having a CommandLineRunner + graddle
  23. noobiewan task for instance. Is there a better way?
  24. cheeser why would you need/want spring for that?
  25. sonOfRa For a single one-off script it seems odd, but I guess the database stuff is nice to have and might be annoying in a shell script?
  26. noobiewan I'm working on a project that will use spring... for instance right now I'm testing some database stuff so I'm generating fake data, usually I would just write a script in python or whatever but then I would need to make sure to have the same configuration in two different places, similar libraries etc
  27. dreamreal spring has CLI tools, spring-shell is a thing
  28. sonOfRa If you already have a project, why not add a maven/gradle submodule that does your shell stuff?
  29. noobiewan the way I got it working was by creating a new class that implements CommandLineRunner and is annotated with @SpringBootApplication, then I run it with the flag --spring.main.web-application-type=none
  30. dreamreal sure
  31. dreamreal so do that?
  32. sonOfRa Wouldn't want it packaged with the main application when building the deployment artifacts, but that's what build systems are for!
  33. dreamreal I mean, it's overkill but it gives you what you need
  34. noobiewan but since I'm new, it seems overkill like you said, so I'm wondering if there is another way
  35. dreamreal nah
  36. dreamreal do what works
  37. dreamreal ~suffering
  38. javabot Suffering-oriented programming: make it work, make it pretty, make it fast - in that order. http://nathanmarz.com/blog/suffering-oriented-programming.html
  39. nevet Suffering-oriented programming - thoughts from the red planet - thoughts from the red planet
  40. dreamreal if you're using spring, this encourages reuse, it's a lot for a CLI but eh
  41. sonOfRa And the way spring shell works is nice honestly. Easy definition of options for the scripts etc. We use it for some admin tasks in our Keycloak instance. Did it with shell scripts and curl at first, but it's much easier with the keycloak-admin-client java library, and so we went with spring-shell
  42. noobiewan I will take a look, thanks
  43. dreamreal and oh yeah just to satisfy the punters, QUARKUS IS SO MUCH GOODER
  44. dreamreal (I do not believe that but I'm tryna shut them up before they start shouting the same thing)
  45. dreamreal (I also do not believe "spring is so much gooder" but the spring people tend to be less rabid about that sort of thing, not that the stupid quarkus fanbois are stupid or anything)
  46. cheeser less rabid, eh?
  47. dreamreal YES AND HOW DARE YOU IMPLY OTHERWISE ABOUT THE BENEVOLENT SPRING OVERLORDS
  48. dmlloyd stupid quarkus fanbois are very smart, thank you very much
  49. dreamreal they're too stupid to not point out that they're very smart, though
  50. dreamreal you're WELCOME
  51. * dreamreal runs
  52. sonOfRa I feel so dirty using a spring app to admin keycloak (quarkus)
  53. jbosmans 't is good to have options
  54. Drixtan I am doing some PoC for an app I want to make, testing quarkus (new to me) was a breeze, now I am testing go, and I want to die for 3 days right now... my first impression was _very_ good to be honest :-/
  55. dreamreal go is good?
  56. Drixtan no, other way around, go = wanna die
  57. dreamreal ah, your first impression of GO was good, and then it eroded?
  58. Drixtan no, let me rephrase. I tested quarkus, its new to me, all good, I was pleased. I am testing go for 3 days now, I want to die.
  59. dreamreal ah, okay
  60. dreamreal I was struggling trying to parse what you'd written
  61. Drixtan I saw that hehe
  62. dreamreal quarkus IS good, but you kinda have to think quarkus; it's pretty opinionated, largely to your benefit
  63. dreamreal spring is opinionated but in different ways and to different degrees; if you need the flexibility, there you are, and the ecosystem is broader
  64. dreamreal I actually don't have a lot of preferences; I know spring better but meh, if someone asked me what *I* would use it'd be spring, but if they asked me what THEY should use, I'd shrug
  65. dreamreal and go is okay but the ecosystem around it is... a little more fast and loose than I would like, I think
  66. dreamreal a lot of go devs are like "what, you don't test in prod like I do?"
  67. Drixtan I fail to see a positive point for go right now, I don't want to be "one of those bashing a language", but so far, so many "wtf is that" moments, so much boiler plates - I thought java had boilerplates, but go has boilerplate for your boilerplates. :P
  68. dreamreal (a friend of mine wanted me to run 18MB of artifacts written in go... with zero tests in the codebase. Um...)
  69. Drixtan I thought, since I love doing C, that I would like go; there is probably something wrong with me, so I keep trying
  70. dreamreal you'd probably be happier with zig (as long as you don't mind throwing code away when they find a better path, a lot like scala but MUCH nicer as a community) or rust
  71. Drixtan I did some zig, 0.13 to 0.15 (io gate)
  72. dreamreal I actually respect zig's mindset: they're not intentionally unstable but they're willing to say "look, what we did wasn't right"
  73. Drixtan I stayed outside that gate, I had enough of the changes. It's all fine, it's not 1.0 yet, but I don't think I am going to see 1.0 in my lifetime
  74. dreamreal yeah, well, there IS that
  75. dreamreal so that leaves you with rust :D
  76. dreamreal or the JVM
  77. dreamreal just don't use scala
  78. dreamreal I'm pretty open-minded in general but scala is to be avoided
  79. Drixtan yea, I am checking rust, see if it's going to take so much more time than go, for example.... but right now, Quarkus is high in the picking list
  80. dreamreal the language itself is great, I think, but everything else about it is the worst
  81. dreamreal quarkus is great as long as you fit its opinions about design, which is a pretty broad umbrella, honestly
  82. Drixtan is scala still at thing? I remember back then, people were like: "it's the future, java's dead!", and look at that today
  83. dreamreal it's still a thing, yes, but the ecosystem's toxicity is working against it, and no real loss
  84. Drixtan since you seem to know quarkus, what are the things I should watchout, like the gotcha gotcha that could come bite me in the ass - "because you just had to know before"
  85. dreamreal I wouldn't be the one to document them: I don't know quarkus all that well, I've just kicked the tires
  86. dreamreal and for what it advertises itself as being good at doing, it does what it says on the tin
  87. Drixtan yea, it's java at the end of the day, can't be that bad
  88. Drixtan anyway, I wanted to pitch in this discussion, since it's kind of relevant of what I am doing this week, I wanted some expert voices on that :P - and perhaps take a break of go a little bit...
  89. dreamreal I know a lot of the quarkus devs and respect those I know. I don't have anything bad to say about it apart from the stridency of advocates... but if that's a quibble, it's not one unique to quarkus AT ALL. And note that the stridency of which I speak is not present here EVEN THOUGH some of the quarkus devs are present themselves. :D
  90. Drixtan I think we can find this trait in most part of the tech world. That's a nerd thing I believe.
  91. dreamreal nerds are the worst.
  92. Drixtan I know right