Community
Chat Logs
Monday, February 16, 2026
- enoqregarding value classes: they are copied when returned from a method, correct?
- enoqor is there some kind of optimization that uses pointers once it goes beyond a certain size?
- dreamrealvalue classes in what context?
- dreamrealThis got brought up on reddit recently, is why I ask, where a professor apparently is arguing the wrong thing
- enoqah, not referencing reddit
- dreamrealthat's fine, the question remains
- dreamrealI was explaining why I was asking
- enoqcorrect me if I'm wrong, but my impression is that value classes are allocated entirely on the stack
- enoqso if I create a big one holding a lot of ints and what not, it's going to perform a lot of copies
- dreamrealagain, what do you mean by "value class"
- dreamreala record, an immutable?
- enoqproject valhalla
- dreamrealokay, that's what I was looking for
- dreamrealI do not know your answer
- enoqmaybe memcopy is so fast when your memory is nicely laid out that it doesn't matter unless you hit a really big chunk
- dreamrealmy guess is that a bag of ints is a bad candidate for a value class, but like I said, I do not know
- dreamreal~pbv
- javabotIn Java, all parameters are passed by value. For a simple explanation see here https://bit.ly/2B1KVuo [cheeser's blog] or a more technical explanation see https://bit.ly/2VaGXGR.
- nevetjavabot mentioned urls: https://bit.ly/2B1KVuo ("Java References for Newcomers โ antwerkz") and https://bit.ly/2VaGXGR ("Java: What to Know About Passing by Value")
- enoqpointers are copied I guess since they're cheap and primitives are also copied
- dreamrealenoq: the pbv thing was for me, I was curious what the bot had on it
- dreamrealwasn't trying to inform you :) I figured you knew already
- enoqah, thanks :)
- dreamrealin the reddit thing, a professor is confusing copies of references with "pass by reference," which is unfortunate for a professor
- enoqto be fair there are a lot of different ways to pass stuff
- dreamrealOf course
- dreamrealbut java's is well-known and has been consistent for literal decades - it wouldn't have occurred to me to wonder if valhalla changes that, but what do I know
- Parare: pass by value, for the _logical_ behavior better description would be pass value by reference, but in that specific corner of the CS domain that doesn't make sense... :)
- ParaI've long ago settled on it works logically and without suprise.
- dreamrealI'd say it was pass references by value, you dumbie!
- Para...yes
- ParaAlso could I be a dumble instead, it's delicious (it's a chocolate+taffy candy)
- ParaOr Dumle? Damn, maybe I _am_ a dumbie.
- dreamrealno, but dumble amps are *fantastic*
- dreamreal~karma eclipse
- javaboteclipse has a karma level of -694, dreamreal
- dreamreal~karma idea
- javabotidea has a karma level of 179, dreamreal
- dreamrealChronos: ^^
- Chronosdreamreal: hahahaha good point :)
- Chronos(Even if I don't necessarily agree with those results)
- dreamrealI think it's a little unfair to eclipse, which is why nevet's karma works like it does :D
- dreamrealin nevet, for eclipse to KEEP that karma it would have to be CONSTANTLY maintained at that level
- gas51627hi all. Could you please advise a java playground that can run java code and also allows sharing the link to the runnable code?
- gas51627the standard java playground does not allow sharing the links unfortunately: https://dev.java/playground/
- javabotgas51627's title: "The Java Playground - Dev.java"
- dreamreal~ideone
- javabotdreamreal, ideone is http://ideone.com/
- gas51627thank you
- dreamreal~glot.io
- javabotdreamreal, what does that even *mean*?
- dreamrealhmm, hold on
- dreamreal~glot.io is <reply>https://glot.io/new/java is an online Java pastebin that can run code similar to ~ideone.
- javabotOK, dreamreal.
- dreamreal~ideone is <reply>https://ideone.com is a simple online java platform that can run code. See also ~glot.io
- javabotI already have a factoid named 'ideone', dreamreal
- dreamreal~no, ideone is <reply>https://ideone.com is a simple online java platform that can run code. See also ~glot.io
- javabotOK, dreamreal.
- dreamrealman, now I'm all disappointed we don't already have a URL to look at.
- gas51627https://glot.io/snippets/hfuzhn4xs2
- nevetgas51627 mentioned url: https://glot.io/snippets/hfuzhn4xs2 ("Untitled")
- gas51627please
- gas51627Ok, maybe this is more clear: https://glot.io/snippets/hfuzmmmdtb
- nevetgas51627 mentioned url: https://glot.io/snippets/hfuzmmmdtb ("Untitled")
- dreamrealokay, you prrrrrrrobaby want to actually present a problem statement
- gas51627i am bragging
- dreamrealbecause otherwise we're looking at going "oh look it's code"
- dreamrealokay, oh look it's code :D
- gas51627it statically checks that Duck sort of implements my interface.
- gas51627With this code I can define an interface and than check that Duck sort of implements it.
- gas51627If Duck does not implement it, then the compilation fails.
- gas51627(sort of implements it)
- dreamrealOkay. How is this USEFUL, though? I mean, I guess you're forcing the compiler to validate it... but you're binding a lot of bits of the compilation unit together, which doesn't scale well
- gas51627it's for hibernate stuff and it wants methods with the same name on the interface as on the class.
- dreamrealnot to harsh on anyone's mellow
- gas51627"you're binding a lot of bits of the compilation unit together" what do you mean?
- dreamrealwell, you have the interface, which has to know about the entity, and the interface then can say "I'm going to require the open extension fulfill this requirement"
- gas51627what is the "open extension" in this case?
- gas51627the class right?
- gas51627the Duck
- dreamrealyeah
- dreamrealit has to be extensible, which fits, honestly, given the scope you're talking about
- gas51627yes indeed the Duck must be open
- gas51627that is, it must be extendable, otherwise I couldn't create that "check extension".
- dreamrealyes
- dreamrealand given HIBERNATE, that makes sense
- gas51627indeed, the extended class the Duck must be extendable. Extension can be open or closed.
- gas51627basically, the thing is, that in spring -jpa, I can provide projection interface to project my entity, with some of the properties from the entity. With this, I can declare the projection and then statically check that MyProjection will work with this entity.
- gas51627so I just wanted to send my colleague a link to that snippet, but couldn't find how to send it. So thanks a lot.
- dreamrealOf course, and good work!
- gas51627thank you
- NeXeNwhat's up
- ParaCPU prices, GPU prices, RAM prices, and how HDD prices.
- Para*now
- ParaI also somehow broke my page up.
- yamadajava dies
- yamadaram prices :D
- ParaAverage Electron app takes more RAM than an average Java webapp these days.
- yamadaelectron rescues java
- ParaSome sort of JavaFX Electron shim thingamajig would actually probably be pretty nice.
- dreamrealhmm, i haven't needed to buy ram recently at all
- dreamrealwhy would you need java/electron though?
- ParaWell, it's now ridiculously expensive so better hope such need doesn't arise.
- ParaAI ate all the hardware.
- * dreamreal is on mac so there
- dreamrealall the ram that went away is on others' hardware
- ParaThat's the grand plan.
- ParaDon't sell hardware to people anymore, make them rent everything.
- NeXeNPara: javafx has a chromium based webview, and there's also jcef
- NeXeNwait, is it chromium or webkit based ? i forget now
- NeXeNi would like to build jcef apps, use java as the surrounding buttons and inside the webview, so i can built FE apps normally. dukescript lets you go between. i've done it before but for a simple uh like in-house app that was to track something silly but pertinent
- NeXeNAOT can get your footprint smaller, but javafx unfortunately uses a lot of reflection, though it will work with gluon and stuff, it's a pita to manually do