Community
Chat Logs
Thursday, March 19, 2026
- klfList <Integer> numList =Arrays.asList("2383".split("")).stream().map(Integer::parseInt).toList()
- klfparseInt returns a (primitive) int, and not an Integer instance.
- klfwhy does the above java code works without first turning the returned int into an Integer instance?
- jreicherklf: What makes you think it's not doing that?
- klfif it does, then it is not apparent to me from that line of code, which is why I come to ask about it.
- jreicherhttps://docs.oracle.com/javase/tutorial/java/data/autoboxing.html
- javabotjreicher's title: "Autoboxing and Unboxing (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)"
- nevetAutoboxing and Unboxing (The Java™ Tutorials > Learning the Java Language > Numbers and Strings)
- jreicherMaybe you are unaware of this?
- klfI see.
- jreicherklf: It's a good question, by the way, because autoboxing in a situation like this is a performance hit.
- Swayzepeformance is only a concern if you're doing millions of requests per second or have some kind of reason to care?
- dreamrealSwayze: what?
- jbosmansif the main performance concern is the impact of autoboxing, someone's either doing a very good or a very bad job :-)
- ParaAutoboxingFactory
- jbosmansloll
- 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/
- javabotPara's title: "Livewire — Live nREPL wire into your Spring Boot app"
- nevetLivewire — Live nREPL wire into your Spring Boot app
- ParaMentioning Clojure here feels a bit silly, as it's entirely LLM prompting, but anyhoos.
- ParaYou can still run Clojure REPL stuff with it of course, but I guess the future is now and I'm the old man.
- jbosmansagree, impressive
- jbosmansdon't see myself using it yet on any main projects yet tho, so I'm the old man :)
- jbosmanscould be nice to try on a small hobby project in a sandboxed env
- ParaFWIW nREPL protocol does support ssh keys and all, so figure out how to enable that over the socket well before deploying... :)
- jbosmansi guess i would only use it in a dev setting anyway
- jbosmanshah it's at the bottom of the page: "Dev only. Not for production. You've been warned."
- 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.
- 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
- jbosmansand i guess value classes might soonish help out too