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?
taylan(It was difficult to formulate that question even though it's a simple concept... Not sure I could have formulated it better.)
dreamrealtaylan: I think it'll match based on the actual values and not the ordinals. But javap should tell you that pretty clearly.
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.
taylanI'm not sure I understand what 'getstatic #13' and 'getstatic #23' do
dreamrealbuilt two directories, one with enum A, B, C, the other using that in a switch
dreamrealran the class, got the expected output
dreamrealthen I changed the enum to be C, A, B, recompiled it
dreamrealso then I ran the original main() (which was compiled with the other order in the enum) and got the same output
dreamrealso it's working as expected for me, I think
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.
* sweatiest joined #java
taylanthanks for testing btw 🙏
pingvenoSo, eventually answering my own question... the maven-dependency-plugin's copy-dependencies did the trick for me.
pingvenoNow time to get my dependencies upgraded for 2015
pingvenofrom*
* Ragnor joined #java
* B_fd joined #java
* pioto joined #java
* OmniRadix joined #java
DoofusCanadensisyay!
* pioto joined #java
* Cyp joined #java
* ChaiTRex joined #java
* Aedil joined #java
* marcel joined #java
* roesyyu joined #java
* five618480339176 joined #java
* ForeverDreaming joined #java
* ForeverDreaming joined #java
* Square3 joined #java
* roesyyu joined #java
* B_fd joined #java
* agnivn joined #java
* roesyyu joined #java
* roesyyu joined #java
* pr070cal joined #java
* acidjnk joined #java
* skum joined #java
* SJrX joined #java
* roesyyu joined #java
* agnivn joined #java
* vobar joined #java
* bfindlay joined #java
* MikeBux joined #java
* roesyyu joined #java
* roesyyu joined #java
* agnivn joined #java
* agnivn joined #java
* roesyyu joined #java
* tmm88 joined #java
* agnivn joined #java
* Successus joined #java
dreamrealpingveno: so you're using maven?
dreamrealI thought you were using ant and stuff
* Candle joined #java
* overholts00 joined #java
* roesyyu joined #java
* roesyyu joined #java
* stfstfm joined #java
* mwnaylor joined #java
* metalmaniac joined #java
* B_fd_ joined #java
* stfstfm_ joined #java
* roesyyu joined #java
* agnivn joined #java
* GreenResponse joined #java
* ForeverDreaming joined #java
* roesyyu joined #java
* waznot joined #java
* jreicher joined #java
* roesyyu joined #java
* Maxdamantus joined #java
* x1bncwn joined #java
* jamezp joined #java
* B_fd joined #java
* stewi joined #java
* leppard joined #java
* stfstfm joined #java
* vobar joined #java
* roesyyu joined #java
* roesyyu joined #java
* stfstfm_ joined #java
* stfstfm joined #java
* roesyyu joined #java
* roesyyu joined #java
* roesyyu joined #java
* agnivn joined #java
* polarian_ joined #java
* roesyyu joined #java
* stfstfm_ joined #java
* nevet joined #java
* CodeGeek!~codegeek@about/java/CodeGeek changed the topic to: Welcome! || Read Channel Rules at https://javachannel.org/ before participating. || Paste limit is two lines; ~pastebin lists options. || No applets, please. || Minecraft, Android, and Javascript all have their own channel. || You are being logged.
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.
* roesyyu joined #java
dreamrealyou're ... using ant... with a pom.xml? Oh, a dual structure. Why not use ivy to do the same thing in ant?
pingvenoOh, I'm just not familiar with ivy.
pingvenoAnd the Ant is maintained upstream, so I'm avoiding modifications as much as possible.
* roesyyu joined #java
pingvenoIt's all a bit of a mess :(
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.
Para(or somesuch, there's several possible options)
dreamreal~ivy
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
ParaIvy is probably one of my favorite small build tools ever.
* roesyyu joined #java
* roesyyu joined #java
* Cyp joined #java
pingvenoHuh, okay, I'll have to look into it. Thanks for the **ptrs.
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
* kathadris joined #java
* jwisbell35 joined #java
dreamrealthey may not have a choice to migrate to something sensible, though
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
jbosmansdepending on how long/short of a commitment, i'd always go for maven, and then make ant work again if/when needed
ParaThere's an Ant executor plugin for Maven, I think. Just to really lay down that concrete.
dreamrealI would push for maven at all possible costs too
jbosmans:D
jbosmansyeah, for me it was always about project/dependency sanity
dreamrealand predictability
jbosmanstotally
dreamrealwith ant, you can do whatever you want. With maven, the phases are deterministic.
dreamreal"you WILL have this execution. Whether it does what you want... well, you CAN screw that up if you like."
jbosmansyeah and project structure etc
jbosmansmodules
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.
jbosmansPara, ~which year?
Para2006 or -07, I think.
jbosmansi remember hearing a teacher saying "you can use spring but that's too hard"
jbosmanshah yeah
jbosmansJSP was the name of the game back then
dreamrealspring's too hard compared to WHAT
ParaI think that was also my first case of somewhat malicious compliance.
dreamrealOMG, do people just not remember j2ee?
ParaThe intent was to 1) deploy the website to school's server and 2) copy the file to shared disk :P
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..."
ParaI remember being absurdly lost when I saw uhhh what was it even called the first time, the whole j2ee service thing.
jbosmansyeah it was all part of the times, and i didn't know better
jbosmansJNDI :')
jbosmans"magically just works"
dreamrealI had no problems with JNDI BUT expecting every developer to understand all the roles was dumb
dreamrealespecially when it was obvious they didn't
jbosmansyeah, it really was early days in ways
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 :)
jbosmansEJB?
ParaEJB local/remote thing
dreamrealremote and local interfaces. And those were LATE EJB.
dreamrealand even those were a sop to IBM and BEA for being incompetent at server design.
jbosmansthose were the days
ParaBack when engineers had to engineer!
jbosmansone eyed king in the land of the blind
dreamrealI have both pity and understanding but no forgiveness
jbosmansbtw <dreamreal> spring's too hard compared to WHAT -> plain servlet + jsp iirc
jbosmans"just the servlet container"
dreamrealjbosmans: so, uh, how does the servlet get JDBC connections? What about looking up other services?
jbosmansdatasources work iirc ?
jbosmansmy teacher said that right? not me
jbosmansit was real early days for spring
dreamrealJNDI data sources?
dreamrealI mean, JNDI is how the app is SUPPOSED to get things from the container
jbosmansand i figure he couldn't tackle spring himself those days
jbosmansiirc datasources can work in a servlet container context "iirc"
dreamrealjbosmans: so they manage the drivers themselves?
dreamrealthere's no "IIRC" here, I know the answers.
dreamrealI don't know what your teachers were saying, of course, but I was there myself.
jbosmansiirc the servlet container yes ?
dreamrealjbosmans: no, the war
jbosmansgiven right declarations in servlet.xml or whatever
jbosmansit's been too long :)
dreamrealdid you deploy a driver in the .war? Or did you get the connection from JNDI?
jbosmansi "think" latter
jbosmansbut it was tomcat for sure
jbosmansearly days tomcat
ParaWell, jogged Claude to get a simple example of that local/remote interface and fuck, no wonder I was confused as a youngling.
jbosmansmm maybe it wasn't tomcat
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"?)
dreamrealtomcat had a JNDI container, because it had to
dreamreallike I said, I was there, I remember
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
ParaIt was also fun to deploy on customer's Tomcat.
jbosmansi only remember the early servlet + jsp days where i had a teacher who said spring's too complicated
Para"Yeah so we have these JARs shared by all apps so make sure they don't conflict"
dreamreal think your teacher was a fool
jbosmansit was about passing
jbosmanshe was okay, i learned a lot
dreamrealsure
jbosmanshe wasn't all knowing obv
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)
jbosmansiirc spring used ivy for a while
ParaI want to claim a false memory of Ivy stabilizing the idea of provided scope.
jbosmanscould very well be, i couldn't comment
jbosmansjakarta EE still going strong seems like
jbosmansafaik a different kind of spring where capabilities are delegated to the runtime
jbosmansnumber of compliant runtimes seem to be slowly decreasing
jbosmansalas i still have a bunch of velocity templates for one project, may intellij's support never go away
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.
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 :)
jbosmanshaha yeah
jbosmansit all pivoted more and more towards best IDE support for me
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
jbosmansi recently did get the thymeleaf layout dialect out of all projects that used it
jbosmansno more groovy runtime ^
dreamrealjakarta EE is never going to go away
dreamrealspring never tried to get rid of j2ee/javaee/jakarta ee
jbosmansi think that'd be good if it never went away
jbosmansyeah i know
dreamrealjust made the low hanging fruit *truly* low hanging fruit and made testing much more easy like it always should have been
jbosmansit's a nice back and forth between jakarta EE and other frameworks, a symbiosis
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
jbosmansyeah i see what you mean && can sympathize
dreamrealsrticle Spring and J2EE
dreamreallogs 75m
dreamrealincludeai
dreamrealdone
dreamrealdang it, I wish I felt good unmuting nevet in here
dreamrealit's just that javabot's sort of the channel pet project, and nevet and javabot would overlap
jbosmansi'd clear that out
jbosmansand set goals, last of which for MVP == unmuted
jbosmansafterwards, it's just a matter of ticking boxes
* jbosmans && full blown getting things done mode in ways
dreamrealwhat do you mean?
dreamrealI don't have a goal of deprecating javabot
dreamrealjavabot's used as a dev platform for a lot of useful projects
javabotdreamreal, what does that even *mean*?
jbosmansit's not about javabot, it's about nevet, you want to unmute it?
jbosmansso what's needed to get that done etc
jbosmans"it can't conflict with javabot" "so make sure it doesn't" etc
dreamrealFor nevet to be unmuted HERE it'd have to be replacing javabot, as some of their feature sets overlap
jbosmanssetting goals && ticking boxes
dreamrealand I do not have a goal of unmuting nevet here
jbosmans<dreamreal> dang it, I wish I felt good unmuting nevet in here
jbosmansi misunderstood you
jbosmanss/you/what you meant
dreamrealI can see value in it being unmuted without a specific goal of unmuting it
dreamrealit would be trivial to actually unmute it, it's a flag in the system
jbosmansyeah i understand irc
dreamreal"don't mute irc for channel #java on libera"
dreamrealand it's not muted on the server level, it's a flag inside nevet itself
dreamrealand it's specifically a flag on THIS channel
jbosmansright, understand, many roads to rome
jbosmansif commands/triggers don't conflict ..
dreamrealbecause I didn't want nevet's url title operation clashing with javabot's, or karma, or factoids, or anything else
dreamrealwell, there are things that are not triggered specifically
dreamreallike url titles, etc
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
jbosmansyeah i understand
dreamrealI can set factoids in nevet here, but it won't emit them here
dreamrealand I don't see it as a competition, because nevet's not "a better javabot," it's a different infobot
jbosmansjust wanted to say, depending on what you want i'd guess you can make it happen :)
dreamrealI could make it happen pretty easily, although I'd want cheeser's permission in any event
dreamreal(it'd be a one-line command to nevet, actually)
jbosmansso there's a checkbox right there :)
jbosmans"an actionable action" (iirc)
dreamreal69
nevet69 is the Java classfile format number for Java 25. Nice! ... and being the product of two primes is neat, too.
dreamrealsee?
Para67
nevet67 is the Java classfile format number for Java 23.
Paraaww
dreamrealI turned it back off :D
dreamrealLike I said, it's a competiton between infobots where I choose specifically to have nevet lose
jbosmansi just meant identify the hills to climb, and climb them
jbosmansnah
dreamrealjbosmans: in general, already done
Para~nevet++
nevet~nevet now has karma of 1.
javabotnevet has a karma level of 1, Para
jbosmanschoose a different trigger char or whatever
dreamrealjbosmans: sure, again, already done
dreamrealsee the ! as opposed to javabot's ~ (and you can set that per network/medium, too)
jbosmansfrom my end, these are trivial challenges given (i'm guessing) all the work that went into nevet
javabotdreamreal's title: "Tela: encrypted remote access from a single binary"
dreamrealhrmm. Wonder what happened THERE?
dreamrealoh, I know
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
dreamrealgenerally not worth it
jbosmanswell, you know best in any case
jbosmansi was just trying to point out a complementary approach instead of exclusive
dreamrealI dunno about "best" but I had to make choices and made them the best I could
jbosmansfrankly i'd settle for ! or !! or $ or $$ or ... to trigger
jbosmansif you don't expose functionality, nobody will ever use it, you solved that yourself
dreamrealnevet uses !, javabot uses ~, but there are triggerless functions
jbosmansyeah i understand, so start of with disabling the triggerless functions instead of disabling everything?
jbosmansanyhow, just a suggestion
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
dreamrealOh, I didn't type "!article" - I typoed it!
dreamrealNo wonder!
dreamrealarticle Spring vs J2EE: not a competition
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.
dreamreallogs 90m
nevetAdded 100 log messages (last 1h) as content block #1.
dreamrealincludeai
nevetAI summary enabled for "Spring vs J2EE: not a competition". On 'done', a generated summary and suggested tags will be appended to the draft.
dreamrealdone
nevetIdea saved as draft: "Spring vs J2EE: not a competition" (1 content block). AI summary appended for admin review.
dreamrealsince nevet was muted, I figured its silence was a natural outcome :D
dreamrealI figured something was up to swallow the output on the server, turns out I never gave it the START trigger
* stfstfm joined #java
jbosmansyeah, typo'd the trigger :)
dreamrealI just got back from the eye doctor, getting a new prescription, primarily for my work computers :/
jbosmans:/ i can relate
jbosmanscan't read properly late in the evening
dreamrealhuh, that actually worked out pretty well
jbosmansfor me it's fatigue
jbosmansi'm hoping !
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
dreamreal(and has a note: "this is not publishable: please edit into shape")
dreamrealoh, none of them belong, but the "!logs" goes back and includes ALL OF THE LOGS
dreamrealso ifthere're more than one thing being discussed, it's including them all
jbosmansyeah makes sense
jbosmansit's often mostly about input
dreamrealyeah, the whole goal of nevet was to make discovery easy, and that means trimming things out
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,
dreamrealwould you?
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.
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