Chat Logs

  1. enoqregarding value classes: they are copied when returned from a method, correct?
  2. enoqor is there some kind of optimization that uses pointers once it goes beyond a certain size?
  3. dreamrealvalue classes in what context?
  4. dreamrealThis got brought up on reddit recently, is why I ask, where a professor apparently is arguing the wrong thing
  5. enoqah, not referencing reddit
  6. dreamrealthat's fine, the question remains
  7. dreamrealI was explaining why I was asking
  8. enoqcorrect me if I'm wrong, but my impression is that value classes are allocated entirely on the stack
  9. enoqso if I create a big one holding a lot of ints and what not, it's going to perform a lot of copies
  10. dreamrealagain, what do you mean by "value class"
  11. dreamreala record, an immutable?
  12. enoqproject valhalla
  13. dreamrealokay, that's what I was looking for
  14. dreamrealI do not know your answer
  15. enoqmaybe memcopy is so fast when your memory is nicely laid out that it doesn't matter unless you hit a really big chunk
  16. dreamrealmy guess is that a bag of ints is a bad candidate for a value class, but like I said, I do not know
  17. dreamreal~pbv
  18. 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.
  19. 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")
  20. enoqpointers are copied I guess since they're cheap and primitives are also copied
  21. dreamrealenoq: the pbv thing was for me, I was curious what the bot had on it
  22. dreamrealwasn't trying to inform you :) I figured you knew already
  23. enoqah, thanks :)
  24. dreamrealin the reddit thing, a professor is confusing copies of references with "pass by reference," which is unfortunate for a professor
  25. enoqto be fair there are a lot of different ways to pass stuff
  26. dreamrealOf course
  27. 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
  28. 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... :)
  29. ParaI've long ago settled on it works logically and without suprise.
  30. dreamrealI'd say it was pass references by value, you dumbie!
  31. Para...yes
  32. ParaAlso could I be a dumble instead, it's delicious (it's a chocolate+taffy candy)
  33. ParaOr Dumle? Damn, maybe I _am_ a dumbie.
  34. dreamrealno, but dumble amps are *fantastic*
  35. dreamreal~karma eclipse
  36. javaboteclipse has a karma level of -694, dreamreal
  37. dreamreal~karma idea
  38. javabotidea has a karma level of 179, dreamreal
  39. dreamrealChronos: ^^
  40. Chronosdreamreal: hahahaha good point :)
  41. Chronos(Even if I don't necessarily agree with those results)
  42. dreamrealI think it's a little unfair to eclipse, which is why nevet's karma works like it does :D
  43. dreamrealin nevet, for eclipse to KEEP that karma it would have to be CONSTANTLY maintained at that level
  44. gas51627hi all. Could you please advise a java playground that can run java code and also allows sharing the link to the runnable code?
  45. gas51627the standard java playground does not allow sharing the links unfortunately: https://dev.java/playground/
  46. javabotgas51627's title: "The Java Playground - Dev.java"
  47. dreamreal~ideone
  48. javabotdreamreal, ideone is http://ideone.com/
  49. gas51627thank you
  50. dreamreal~glot.io
  51. javabotdreamreal, what does that even *mean*?
  52. dreamrealhmm, hold on
  53. dreamreal~glot.io is <reply>https://glot.io/new/java is an online Java pastebin that can run code similar to ~ideone.
  54. javabotOK, dreamreal.
  55. dreamreal~ideone is <reply>https://ideone.com is a simple online java platform that can run code. See also ~glot.io
  56. javabotI already have a factoid named 'ideone', dreamreal
  57. dreamreal~no, ideone is <reply>https://ideone.com is a simple online java platform that can run code. See also ~glot.io
  58. javabotOK, dreamreal.
  59. dreamrealman, now I'm all disappointed we don't already have a URL to look at.
  60. gas51627https://glot.io/snippets/hfuzhn4xs2
  61. nevetgas51627 mentioned url: https://glot.io/snippets/hfuzhn4xs2 ("Untitled")
  62. gas51627please
  63. gas51627Ok, maybe this is more clear: https://glot.io/snippets/hfuzmmmdtb
  64. nevetgas51627 mentioned url: https://glot.io/snippets/hfuzmmmdtb ("Untitled")
  65. dreamrealokay, you prrrrrrrobaby want to actually present a problem statement
  66. gas51627i am bragging
  67. dreamrealbecause otherwise we're looking at going "oh look it's code"
  68. dreamrealokay, oh look it's code :D
  69. gas51627it statically checks that Duck sort of implements my interface.
  70. gas51627With this code I can define an interface and than check that Duck sort of implements it.
  71. gas51627If Duck does not implement it, then the compilation fails.
  72. gas51627(sort of implements it)
  73. 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
  74. gas51627it's for hibernate stuff and it wants methods with the same name on the interface as on the class.
  75. dreamrealnot to harsh on anyone's mellow
  76. gas51627"you're binding a lot of bits of the compilation unit together" what do you mean?
  77. 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"
  78. gas51627what is the "open extension" in this case?
  79. gas51627the class right?
  80. gas51627the Duck
  81. dreamrealyeah
  82. dreamrealit has to be extensible, which fits, honestly, given the scope you're talking about
  83. gas51627yes indeed the Duck must be open
  84. gas51627that is, it must be extendable, otherwise I couldn't create that "check extension".
  85. dreamrealyes
  86. dreamrealand given HIBERNATE, that makes sense
  87. gas51627indeed, the extended class the Duck must be extendable. Extension can be open or closed.
  88. 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.
  89. 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.
  90. dreamrealOf course, and good work!
  91. gas51627thank you
  92. NeXeNwhat's up
  93. ParaCPU prices, GPU prices, RAM prices, and how HDD prices.
  94. Para*now
  95. ParaI also somehow broke my page up.
  96. yamadajava dies
  97. yamadaram prices :D
  98. ParaAverage Electron app takes more RAM than an average Java webapp these days.
  99. yamadaelectron rescues java
  100. ParaSome sort of JavaFX Electron shim thingamajig would actually probably be pretty nice.
  101. dreamrealhmm, i haven't needed to buy ram recently at all
  102. dreamrealwhy would you need java/electron though?
  103. ParaWell, it's now ridiculously expensive so better hope such need doesn't arise.
  104. ParaAI ate all the hardware.
  105. * dreamreal is on mac so there
  106. dreamrealall the ram that went away is on others' hardware
  107. ParaThat's the grand plan.
  108. ParaDon't sell hardware to people anymore, make them rent everything.
  109. NeXeNPara: javafx has a chromium based webview, and there's also jcef
  110. NeXeNwait, is it chromium or webkit based ? i forget now
  111. 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
  112. 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