Chat Logs

  1. klfList <Integer> numList =Arrays.asList("2383".split("")).stream().map(Integer::parseInt).toList()
  2. klfparseInt returns a (primitive) int, and not an Integer instance.
  3. klfwhy does the above java code works without first turning the returned int into an Integer instance?
  4. jreicherklf: What makes you think it's not doing that?
  5. klfif it does, then it is not apparent to me from that line of code, which is why I come to ask about it.
  6. jreicherhttps://docs.oracle.com/javase/tutorial/java/data/autoboxing.html
  7. javabotjreicher's title: "Autoboxing and Unboxing (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)"
  8. nevetAutoboxing and Unboxing (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
  9. jreicherMaybe you are unaware of this?
  10. klfI see.
  11. jreicherklf: It's a good question, by the way, because autoboxing in a situation like this is a performance hit.
  12. Swayzepeformance is only a concern if you're doing millions of requests per second or have some kind of reason to care?
  13. dreamrealSwayze: what?
  14. jbosmansif the main performance concern is the impact of autoboxing, someone's either doing a very good or a very bad job :-)
  15. ParaAutoboxingFactory
  16. jbosmansloll
  17. ParaHere's something that's kinda insane, Clojure REPL which hooks into a running Spring Boot app, allowing live rewrites of functionality. And it's being driven through Claude, so check the video/terminal recording. https://brdloush.github.io/livewire/
  18. javabotPara's title: "Livewire — Live nREPL wire into your Spring Boot app"
  19. nevetLivewire — Live nREPL wire into your Spring Boot app
  20. ParaMentioning Clojure here feels a bit silly, as it's entirely LLM prompting, but anyhoos.
  21. ParaYou can still run Clojure REPL stuff with it of course, but I guess the future is now and I'm the old man.
  22. jbosmansagree, impressive
  23. jbosmansdon't see myself using it yet on any main projects yet tho, so I'm the old man :)
  24. jbosmanscould be nice to try on a small hobby project in a sandboxed env
  25. ParaFWIW nREPL protocol does support ssh keys and all, so figure out how to enable that over the socket well before deploying... :)
  26. jbosmansi guess i would only use it in a dev setting anyway
  27. jbosmanshah it's at the bottom of the page: "Dev only. Not for production. You've been warned."
  28. jreicherjbosmans: I think I understand why you say that, but I'm not sure it's completely true. I can imagine someone making a mistake with a very large generic list of integers, iterating over them all and modifying them. They might be confused why it takes longer than they expect.
  29. jbosmanshopefully if it's down to that (or all about that), same someone might look into some dedicated libs for dealing with large primitive collections etc
  30. jbosmansand i guess value classes might soonish help out too