Chat Logs

  1. taylanQuestion: If a class A contains code switching over enum E and the values of E are reordered and E recompiled, but A not recompiled, will the switch statement in A still switch over the names of the values, or were the names in the case labels just a stand-in for their ordinal position at the time A was compiled and the cases now apply to different names based on their new ordinal position?
  2. taylan(It was difficult to formulate that question even though it's a simple concept... Not sure I could have formulated it better.)
  3. dreamrealtaylan: I think it'll match based on the actual values and not the ordinals. But javap should tell you that pretty clearly.
  4. taylanI'm looking at the bytecode but don't have any experience reading JVM bytecode. Apparently it creates a SwitchMap populated at class init, and I guess that maps the actual enum value objects to integers, so should be fine I guess. It still calls .ordinal() on them which confused me a bit.
  5. taylanhttps://godbolt.org/z/4qcrWcGnT
  6. nevetCompiler Explorer - Java (jdk 25.0.1)
  7. dreamrealokay, I just ran a test
  8. taylanI'm not sure I understand what 'getstatic #13' and 'getstatic #23' do
  9. dreamrealbuilt two directories, one with enum A, B, C, the other using that in a switch
  10. dreamrealran the class, got the expected output
  11. dreamrealthen I changed the enum to be C, A, B, recompiled it
  12. dreamrealso then I ran the original main() (which was compiled with the other order in the enum) and got the same output
  13. dreamrealso it's working as expected for me, I think
  14. taylanApparently the operand of getstatic is an index into the runtime constant pool which in turn contains *symbolic* references to fields, and that's how it calls ordinal() on the correct enum objects at init.
  15. taylanthanks for testing btw 🙏
  16. pingvenoSo, eventually answering my own question... the maven-dependency-plugin's copy-dependencies did the trick for me.
  17. pingvenoNow time to get my dependencies upgraded for 2015
  18. pingvenofrom*
  19. DoofusCanadensisyay!
  20. dreamrealpingveno: so you're using maven?
  21. dreamrealI thought you were using ant and stuff
  22. pingvenodreamreal: I am using ant. This is my pom.xml: https://gist.github.com/adevore/78b33f9ce306d801b267c64335b92bb3
  23. nevetpom.xml for management of a set of jar files
  24. pingvenoIt won't be run as part of the regular build. Just as part of updating that set of jars. At least for now, I might figure out how to integrate maven into the build system.
  25. dreamrealyou're ... using ant... with a pom.xml? Oh, a dual structure. Why not use ivy to do the same thing in ant?
  26. pingvenoOh, I'm just not familiar with ivy.
  27. pingvenoAnd the Ant is maintained upstream, so I'm avoiding modifications as much as possible.
  28. pingvenoIt's all a bit of a mess :(
  29. Parayou can probably use YourFavoriteAI to ask it to give you the Ant script in some Maven executor plugin garble and then ditch the Ant part.
  30. Para(or somesuch, there's several possible options)
  31. dreamreal~ivy
  32. javabotivy is a dependency manager for ant (but can run stand-alone). It has transitive dependencies and multiple configurations per module. See http://ant.apache.org/ivy/ to get started
  33. ParaIvy is probably one of my favorite small build tools ever.
  34. pingvenoHuh, okay, I'll have to look into it. Thanks for the **ptrs.
  35. dreamrealhttps://bytecode.news/posts/2026/04/securing-claude-code-guardrails-for-ai-assisted-development-by-jim-manico
  36. jbosmanswhen choosing between ant and maven I'd at least make choice, and not try to keep/make both working. Do, or do not. There is no try. (except version control rollback i guess) Lame SW ref included for free
  37. dreamrealthey may not have a choice to migrate to something sensible, though
  38. jbosmansyeah understand. Old enough to've been there done that, i've had the luck to be able to create deliverables (jar/war/ear files) using maven while rational app dev/arch was the assumed route
  39. jbosmansdepending on how long/short of a commitment, i'd always go for maven, and then make ant work again if/when needed
  40. ParaThere's an Ant executor plugin for Maven, I think. Just to really lay down that concrete.
  41. dreamrealI would push for maven at all possible costs too
  42. jbosmans:D
  43. jbosmansyeah, for me it was always about project/dependency sanity
  44. dreamrealand predictability
  45. jbosmanstotally
  46. dreamrealwith ant, you can do whatever you want. With maven, the phases are deterministic.
  47. dreamreal"you WILL have this execution. Whether it does what you want... well, you CAN screw that up if you like."
  48. jbosmansyeah and project structure etc
  49. jbosmansmodules
  50. ParaBack in school I did get some extra credit for using Ant to create a simple JSP website which also contained a link to a download which had the whole project embedded as ZIP because we were supposed to return it as part of the assignment.
  51. jbosmansPara, ~which year?
  52. Para2006 or -07, I think.
  53. jbosmansi remember hearing a teacher saying "you can use spring but that's too hard"
  54. jbosmanshah yeah
  55. jbosmansJSP was the name of the game back then
  56. dreamrealspring's too hard compared to WHAT
  57. ParaI think that was also my first case of somewhat malicious compliance.
  58. dreamrealOMG, do people just not remember j2ee?
  59. ParaThe intent was to 1) deploy the website to school's server and 2) copy the file to shared disk :P
  60. dreamreal"look, all you have to do is run ejbc, then put on a deployer hat and figure out your specific app server's JNDI configuration, then deploy and set up resources that JNDI points to..."
  61. ParaI remember being absurdly lost when I saw uhhh what was it even called the first time, the whole j2ee service thing.
  62. jbosmansyeah it was all part of the times, and i didn't know better
  63. jbosmansJNDI :')
  64. jbosmans"magically just works"
  65. dreamrealI had no problems with JNDI BUT expecting every developer to understand all the roles was dumb
  66. dreamrealespecially when it was obvious they didn't
  67. jbosmansyeah, it really was early days in ways
  68. ParaI have to take a moment to jog the poor ol' brain cell, I want to see if I arrive at the right name on my own :)
  69. jbosmansEJB?
  70. ParaEJB local/remote thing
  71. dreamrealremote and local interfaces. And those were LATE EJB.
  72. dreamrealand even those were a sop to IBM and BEA for being incompetent at server design.
  73. jbosmansthose were the days
  74. ParaBack when engineers had to engineer!
  75. jbosmansone eyed king in the land of the blind
  76. dreamrealI have both pity and understanding but no forgiveness
  77. jbosmansbtw <dreamreal> spring's too hard compared to WHAT -> plain servlet + jsp iirc
  78. jbosmans"just the servlet container"
  79. dreamrealjbosmans: so, uh, how does the servlet get JDBC connections? What about looking up other services?
  80. jbosmansdatasources work iirc ?
  81. jbosmansmy teacher said that right? not me
  82. jbosmansit was real early days for spring
  83. dreamrealJNDI data sources?
  84. dreamrealI mean, JNDI is how the app is SUPPOSED to get things from the container
  85. jbosmansand i figure he couldn't tackle spring himself those days
  86. jbosmansiirc datasources can work in a servlet container context "iirc"
  87. dreamrealjbosmans: so they manage the drivers themselves?
  88. dreamrealthere's no "IIRC" here, I know the answers.
  89. dreamrealI don't know what your teachers were saying, of course, but I was there myself.
  90. jbosmansiirc the servlet container yes ?
  91. dreamrealjbosmans: no, the war
  92. jbosmansgiven right declarations in servlet.xml or whatever
  93. jbosmansit's been too long :)
  94. dreamrealdid you deploy a driver in the .war? Or did you get the connection from JNDI?
  95. jbosmansi "think" latter
  96. jbosmansbut it was tomcat for sure
  97. jbosmansearly days tomcat
  98. ParaWell, jogged Claude to get a simple example of that local/remote interface and fuck, no wonder I was confused as a youngling.
  99. jbosmansmm maybe it wasn't tomcat
  100. dreamrealsure. Getting the connection from JNDI: did you set to the tomcat JNDI connection or access the JDBC connection directly? (java:comp/env/jdbc/foo, or "java:/foo"?)
  101. dreamrealtomcat had a JNDI container, because it had to
  102. dreamreallike I said, I was there, I remember
  103. dreamrealI don't know what YOU did but I know what you SHOULD have done and I know what most people ACTUALLY DID and they were not the same things
  104. ParaIt was also fun to deploy on customer's Tomcat.
  105. jbosmansi only remember the early servlet + jsp days where i had a teacher who said spring's too complicated
  106. Para"Yeah so we have these JARs shared by all apps so make sure they don't conflict"
  107. dreamreal think your teacher was a fool
  108. jbosmansit was about passing
  109. jbosmanshe was okay, i learned a lot
  110. dreamrealsure
  111. jbosmanshe wasn't all knowing obv
  112. Para(that's actually part of the reason why we found Ivy so convenient back then, one could make a negation profile of these deployment targets easily and basically tell to compile with all, package with those excluded)
  113. jbosmansiirc spring used ivy for a while
  114. ParaI want to claim a false memory of Ivy stabilizing the idea of provided scope.
  115. jbosmanscould very well be, i couldn't comment
  116. jbosmansjakarta EE still going strong seems like
  117. jbosmansafaik a different kind of spring where capabilities are delegated to the runtime
  118. jbosmansnumber of compliant runtimes seem to be slowly decreasing
  119. jbosmansalas i still have a bunch of velocity templates for one project, may intellij's support never go away
  120. ParaI wish the startup I worked for somehow would've been able to give us the source codes of things before it went totally bust.
  121. ParaWe did fun things for Velocity, for example slurp XML and manipulate it with Velocity as if it was actually easy to work data structure :)
  122. jbosmanshaha yeah
  123. jbosmansit all pivoted more and more towards best IDE support for me
  124. jbosmansthymeleaf is pretty nice, but it'd probably still be velocity (or something extremely dumb & low tech) if the IDE support wasn't up to par
  125. jbosmansi recently did get the thymeleaf layout dialect out of all projects that used it
  126. jbosmansno more groovy runtime ^
  127. dreamrealjakarta EE is never going to go away
  128. dreamrealspring never tried to get rid of j2ee/javaee/jakarta ee
  129. jbosmansi think that'd be good if it never went away
  130. jbosmansyeah i know
  131. dreamrealjust made the low hanging fruit *truly* low hanging fruit and made testing much more easy like it always should have been
  132. jbosmansit's a nice back and forth between jakarta EE and other frameworks, a symbiosis
  133. dreamrealI guess. It's really more that most developers didn't need j2ee, didn't want j2ee, just had no other tools to work with, so when all they had was a hammer, everything looked like a nail
  134. jbosmansyeah i see what you mean && can sympathize
  135. dreamrealsrticle Spring and J2EE
  136. dreamreallogs 75m
  137. dreamrealincludeai
  138. dreamrealdone
  139. dreamrealdang it, I wish I felt good unmuting nevet in here
  140. dreamrealit's just that javabot's sort of the channel pet project, and nevet and javabot would overlap
  141. jbosmansi'd clear that out
  142. jbosmansand set goals, last of which for MVP == unmuted
  143. jbosmansafterwards, it's just a matter of ticking boxes
  144. * jbosmans && full blown getting things done mode in ways
  145. dreamrealwhat do you mean?
  146. dreamrealI don't have a goal of deprecating javabot
  147. dreamrealjavabot's used as a dev platform for a lot of useful projects
  148. javabotdreamreal, what does that even *mean*?
  149. jbosmansit's not about javabot, it's about nevet, you want to unmute it?
  150. jbosmansso what's needed to get that done etc
  151. jbosmans"it can't conflict with javabot" "so make sure it doesn't" etc
  152. dreamrealFor nevet to be unmuted HERE it'd have to be replacing javabot, as some of their feature sets overlap
  153. jbosmanssetting goals && ticking boxes
  154. dreamrealand I do not have a goal of unmuting nevet here
  155. jbosmans<dreamreal> dang it, I wish I felt good unmuting nevet in here
  156. jbosmansi misunderstood you
  157. jbosmanss/you/what you meant
  158. dreamrealI can see value in it being unmuted without a specific goal of unmuting it
  159. dreamrealit would be trivial to actually unmute it, it's a flag in the system
  160. jbosmansyeah i understand irc
  161. dreamreal"don't mute irc for channel #java on libera"
  162. dreamrealand it's not muted on the server level, it's a flag inside nevet itself
  163. dreamrealand it's specifically a flag on THIS channel
  164. jbosmansright, understand, many roads to rome
  165. jbosmansif commands/triggers don't conflict ..
  166. dreamrealbecause I didn't want nevet's url title operation clashing with javabot's, or karma, or factoids, or anything else
  167. dreamrealwell, there are things that are not triggered specifically
  168. dreamreallike url titles, etc
  169. dreamrealthey're both infobots: you really don't want multiple infobots in a single channel. So nevet watches for information it can use (karma, channel logs) and has a flag to never emit content here
  170. jbosmansyeah i understand
  171. dreamrealI can set factoids in nevet here, but it won't emit them here
  172. dreamrealand I don't see it as a competition, because nevet's not "a better javabot," it's a different infobot
  173. jbosmansjust wanted to say, depending on what you want i'd guess you can make it happen :)
  174. dreamrealI could make it happen pretty easily, although I'd want cheeser's permission in any event
  175. dreamreal(it'd be a one-line command to nevet, actually)
  176. jbosmansso there's a checkbox right there :)
  177. jbosmans"an actionable action" (iirc)
  178. dreamreal69
  179. nevet69 is the Java classfile format number for Java 25. Nice! ... and being the product of two primes is neat, too.
  180. dreamrealsee?
  181. Para67
  182. nevet67 is the Java classfile format number for Java 23.
  183. Paraaww
  184. dreamrealI turned it back off :D
  185. dreamrealLike I said, it's a competiton between infobots where I choose specifically to have nevet lose
  186. jbosmansi just meant identify the hills to climb, and climb them
  187. jbosmansnah
  188. dreamrealjbosmans: in general, already done
  189. Para~nevet++
  190. nevet~nevet now has karma of 1.
  191. javabotnevet has a karma level of 1, Para
  192. jbosmanschoose a different trigger char or whatever
  193. dreamrealjbosmans: sure, again, already done
  194. dreamrealsee the ! as opposed to javabot's ~ (and you can set that per network/medium, too)
  195. jbosmansfrom my end, these are trivial challenges given (i'm guessing) all the work that went into nevet
  196. dreamrealbut then you run into url titles
  197. jbosmansso disable that
  198. jbosmansand provide a custom trigger for nevet
  199. dreamrealdisable... the triggerless options?
  200. jbosmansurl www.google.com
  201. jbosmanswhatever
  202. dreamrealew
  203. jbosmanswell if nothing is better .. :)
  204. dreamrealSo there's this project, https://telaproject.org/ and it's very cool
  205. nevetTela
  206. javabotdreamreal's title: "Tela: encrypted remote access from a single binary"
  207. dreamrealhrmm. Wonder what happened THERE?
  208. dreamrealoh, I know
  209. dreamrealBut anyway, THAT's the problem: the utilities between nevet and javabot clash in a lot of ways, and disabling the utilities on a provenance level gets expensive and kinda painful
  210. dreamrealgenerally not worth it
  211. jbosmanswell, you know best in any case
  212. jbosmansi was just trying to point out a complementary approach instead of exclusive
  213. dreamrealI dunno about "best" but I had to make choices and made them the best I could
  214. jbosmansfrankly i'd settle for ! or !! or $ or $$ or ... to trigger
  215. jbosmansif you don't expose functionality, nobody will ever use it, you solved that yourself
  216. dreamrealnevet uses !, javabot uses ~, but there are triggerless functions
  217. jbosmansyeah i understand, so start of with disabling the triggerless functions instead of disabling everything?
  218. jbosmansanyhow, just a suggestion
  219. dreamrealYeah, that's definitely an option, but having a breaker based on *provenances* is something I'm trying to resist, since it's limited so much to specific channels like this one
  220. dreamrealOh, I didn't type "!article" - I typoed it!
  221. dreamrealNo wonder!
  222. dreamrealarticle Spring vs J2EE: not a competition
  223. nevetIdea session started: "Spring vs J2EE: not a competition". Use 'content <text>' to add body paragraphs, 'includeai' to enable AI summary/tags, 'done' to save, or 'cancel' to discard.
  224. dreamreallogs 90m
  225. nevetAdded 100 log messages (last 1h) as content block #1.
  226. dreamrealincludeai
  227. nevetAI summary enabled for "Spring vs J2EE: not a competition". On 'done', a generated summary and suggested tags will be appended to the draft.
  228. dreamrealdone
  229. nevetIdea saved as draft: "Spring vs J2EE: not a competition" (1 content block). AI summary appended for admin review.
  230. dreamrealsince nevet was muted, I figured its silence was a natural outcome :D
  231. dreamrealI figured something was up to swallow the output on the server, turns out I never gave it the START trigger
  232. jbosmansyeah, typo'd the trigger :)
  233. dreamrealI just got back from the eye doctor, getting a new prescription, primarily for my work computers :/
  234. jbosmans:/ i can relate
  235. jbosmanscan't read properly late in the evening
  236. dreamrealhuh, that actually worked out pretty well
  237. jbosmansfor me it's fatigue
  238. jbosmansi'm hoping !
  239. dreamrealIt included the entire log, so it noted that there were ancillary topics (velocity, ivy, thymeleaf) but actually got the core of the concept down pretty well as a draft summary
  240. dreamreal(and has a note: "this is not publishable: please edit into shape")
  241. jbosmansnice, llm's being leveraged :)
  242. jbosmansone doesn't belong tho: velocity, ivy, thymeleaf
  243. dreamrealwell, the "!includeai" is releant there
  244. jbosmansor another is missing
  245. dreamrealoh, none of them belong, but the "!logs" goes back and includes ALL OF THE LOGS
  246. dreamrealso ifthere're more than one thing being discussed, it's including them all
  247. jbosmansyeah makes sense
  248. jbosmansit's often mostly about input
  249. dreamrealyeah, the whole goal of nevet was to make discovery easy, and that means trimming things out
  250. dreamrealBTW, *everyone*, I'd appreciate it greatly IF you think bytecode.news is worth reading and IF you'd then propagate the URL about as much as you're willing to. If you don't think it's worth reading, acknowledged (what would change that?) and if you think it's not worth sharing, I understand that too (and what would change THAT?) But if you think it's good and worth sharing... do a brother a solid,
  251. dreamrealwould you?
  252. dreamrealthe site's not monetized and I have no plans to monetize it yet - the backend server is the valuable tech, to me. (content's too easy to fake and find, anyway.) but I'd still like it to be read.
  253. dreamrealIf I could FIND a way to monetize the site after it has decent readership that it deserves, I'm willing to consider it, but... right now, no plans