Chat Logs

  1. * Munnu joined #java
  2. * LtHummus joined #java
  3. * OmniRadix69891 joined #java
  4. * fgarcia joined #java
  5. * MinusSeven joined #java
  6. * yika joined #java
  7. * yika joined #java
  8. * acidsys joined #java
  9. * yika joined #java
  10. * Ragnor joined #java
  11. * sa02irc joined #java
  12. * handicraftsman joined #java
  13. * Zapek joined #java
  14. * stfstfm_ joined #java
  15. * stfstfm joined #java
  16. * yika joined #java
  17. * PocketKiller joined #java
  18. * Maxdamantus joined #java
  19. * ZhanGSKen_ joined #java
  20. * pebble joined #java
  21. * BSaboia joined #java
  22. * gjvc joined #java
  23. * bliminse joined #java
  24. * bliminse joined #java
  25. * fed-kaczynski joined #java
  26. * Inline joined #java
  27. * iwtga57 joined #java
  28. * jreicher joined #java
  29. * ferdna joined #java
  30. * ztevoz joined #java
  31. * odinsbane joined #java
  32. * m joined #java
  33. * johnjay joined #java
  34. * johnjay joined #java
  35. * deavmi joined #java
  36. * johnjay joined #java
  37. * ztevoz joined #java
  38. * ztevoz joined #java
  39. * johnjay joined #java
  40. * pebble joined #java
  41. * MikeBux joined #java
  42. * johnjay joined #java
  43. deebois there some magic constant of a RuntimeException instance somewhere in the jdk? need something to refer to for CompletableFuture.failedFuture()
  44. deebocan of course instantiate one, but there has to be something existing :)
  45. * fgarcia joined #java
  46. jreicherDo you mean this? https://github.com/openjdk/jdk/blob/fb268a6f43fb7e7a0b962d10504a686acfd883ff/src/java.base/share/classes/java/lang/RuntimeException.java#L45
  47. javabotjreicher's title: "jdk/src/java.base/share/classes/java/lang/RuntimeException.java at fb268a6f43fb7e7a0b962d10504a686acfd883ff · openjdk/jdk · GitHub"
  48. jreicherArgh, sorry. Should have used a branch.
  49. * johnjay joined #java
  50. deebois that a link to the serilizationid? i mean more like public static RuntimeException INSTANCE = new RuntimeException();, i can of course do that myself, but i'd assume there's a publicly available one somewhere in the jdk
  51. deeboor i could just subclass it and use the parent ctor to not create stack traces etc
  52. * fgarcia joined #java
  53. * fgarcia joined #java
  54. * ztevoz joined #java
  55. odinsbaneClaude says it doesn't exist.
  56. odinsbaneIt's really strange when it tries to shoehorn the question in to the project I'm working on.
  57. odinsbaneIt says there are some private instances for OutOfMemory etc, because you might not be able to build a stack trace.
  58. odinsbane... you could override fillInStackTrace
  59. odinsbanehttps://stackoverflow.com/a/9866038/2067492
  60. * fgarcia_ joined #java
  61. deebouse /btw :)
  62. NeXeNi like /stfu too
  63. deebobut guess i'll create a local one myself, weirdly graphql-java uses failed completedfutures for flow control kindof, but they require a throwable
  64. * fgarcia__ joined #java
  65. NeXeNdeebo: no doesn't look like it, i searched the source
  66. NeXeNyou could create your own subclass and override fillInStackTrace() to make it light so you don't have lots of stacktrace
  67. * rosetta joined #java
  68. rosettahi
  69. NeXeNmake it stateless, pass it to .. hrmm CompleteableFutre.failedFuture(YourExtendedClassRuntimeException.YOUR_PUBLIC_STATIC_FINAL_CONSTANT and make it like a singleton
  70. * NeXeN shrugs
  71. NeXeNyour fillInStacTrace() make it return this on your extended class
  72. NeXeNerr sorry hard to explain what i mean. so you have a singleton. it's public static final. i would call it INSTANCE, ...like public static final YourExtendedClass INSTANCE = new YourExendedClass(); in the constructor Private YourExtendedClass() { super (null, null, false, false); (so you can suppress stack trace make it light) then @override like maybe public Throwable fillInStackTrace() { return this; ); so now pass the constant into
  73. NeXeN CompleteableFuture.failedFuture() when you need it for flow control
  74. NeXeNand when i meant you could, i mean yes i agree that'll work
  75. NeXeNi just tried it and yeah it's pretty light
  76. NeXeNbut i was reading the docs, can't you use DataFetcherResult from graphql?
  77. * metalmaniac joined #java
  78. NeXeNhttps://www.apollographql.com/tutorials/intro-dgs/11-resolver-chains
  79. nevetResolver chains
  80. * odinsbane joined #java
  81. * sojuus3r joined #java
  82. NeXeNhttps://docs.spring.io/spring-graphql/reference/controllers.html#controllers.schema-mapping.return.values
  83. nevetAnnotated Controllers :: Spring GraphQL
  84. javabotNeXeN's title: "Annotated Controllers :: Spring GraphQL"
  85. * linguist85 joined #java
  86. * handicraftsman joined #java
  87. * GreenResponse joined #java
  88. deeboNeXeN: this is about org.dataloader dataloaders and their caching behaviour specifically
  89. deebothe docs say the ValueCache#get() needs to return a failed CompletableFuture if the cache doesn't contain the value
  90. deeboi just created a CheapoException that calls the super ctor that allows disabling stack traces
  91. * fgarcia joined #java
  92. * ChaiTRex joined #java
  93. dreamrealis filling out the stack trace expensive for you? Are you getting them a LOT?
  94. dreamrealNo doubt that they're "expensive" but spending 3000ns every 7s is... measurable but irrelevant
  95. dreamreal(and yes, that 3000ns is pulled out of thin air: a deeper exception trace is going to cost more.)
  96. NeXeNit could also have other issues
  97. NeXeNso yeah, same thing i think you were trying before
  98. NeXeNso you can return CompleteableFuture(YourExtendedClassException.INSTANCE) seems maybe name it CacheMissException to make it sensible
  99. * ztevoz joined #java
  100. NeXeNi also think you could look at it differently. maybe use a container type like Optional to separate the missing state from failures. you can return a CompleteableFuture<Optional<V>> ...it wil distinguish between "we looked and wasn't there" and "something actually broke" (a true exception)
  101. NeXeNi wouldn't do the static base exception class unless the interface you're dealing wit enforceses throwable
  102. NeXeNyou could also handle it at the cache map level i think......getIfPresent/GetIfCompleted or a map lookup pattern type thing ...but do it before invoking operations that require a completable future by passing the miss handling path for standard checks
  103. * ssh07322 joined #java
  104. NeXeNi just don't like futures being used for routine cache misses. instead of treating it as exceptional which forces you into the failedFuture() and trying to optimize stack trace with this kludge, you could focus on clean state checking and validation. you could use like java-dataloader to provide inspection like methods for GIP/GIC (get if present, complete, respectively) and instead of blindly calling the lookup that forces error handling branch on a
  105. NeXeNmiss, the code just checks if the value is already present/complete in the local cache map layer first
  106. NeXeNusing like redis or memcached or something?
  107. dmlloydI just heard a colleague utter the phase "JDK 33"
  108. cheeserClair Obscur: Expedition 33 was incredible. you should go play it.
  109. dmlloyddo I have to do the other 32 expeditions first?
  110. * Nixkernal joined #java
  111. cheeseryou don't.
  112. * ztevoz joined #java
  113. * Inline joined #java
  114. * aduke2704 joined #java
  115. * ztevoz joined #java
  116. * ztevoz joined #java
  117. * ztevoz joined #java
  118. * ztevoz joined #java
  119. * jamezp joined #java
  120. * magla joined #java
  121. * computelabs_in joined #java
  122. * Inline joined #java
  123. * computelabs_in joined #java
  124. * avu joined #java
  125. * BullShark joined #java
  126. * jiffy__ joined #java
  127. * ChaiTRex joined #java
  128. * Chai-T-Rex joined #java
  129. * ChaiTRex joined #java
  130. * hwpplayer1 joined #java
  131. * stfstfm_ joined #java
  132. * ztevoz joined #java
  133. * Pixi` joined #java
  134. * odinsbane joined #java
  135. odinsbanedreamreal you shouldn't "Fixed by using a for each ..."  because you're relying on side effects. https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/stream/DoubleStream.html#summaryStatistics() use the terminal operation that does what you want.
  136. nevetDoubleStream (Java SE 11 & JDK 11 )
  137. dreamreal... what
  138. odinsbaneHa, I wrote that.
  139. odinsbanewhat?
  140. odinsbaneThis is a crazy coincidence, I remember writing that a long time ago. Then today I want to javachannel.org and it was on the top of the blog.
  141. odinsbaneI didn't realize it was mine, anyway. This whole chunk: double[] extrema = new double[]{-Double.MAX_VALUE, Double.MAX_VALUE};
  142. odinsbane        rectangles.stream().forEach((rect)->{
  143. odinsbane            double w = rect.getWidth();
  144. odinsbane            extrema[0] = w>extrema[0]?w:extrema[0];
  145. odinsbane            extrema[1] = w<extrema[1]?w:extrema[1];
  146. odinsbane        });
  147. * cheeser eyes odinsbane
  148. dreamrealbut... why are you telling ME this
  149. odinsbaneThat should be replaced with rectangles.stream().mapToDouble().summaryStatistics()
  150. dreamrealright, so replace it?
  151. odinsbaneLike I said it is a crazy coincidence. I thought you wrote the blog post and didn't realize it was what I had sent you ... years ago?
  152. dreamrealIt's dated 2026/09/26, I do not run javachannel.org and have not for years
  153. cheeserfun fact: it's fully self-aware now and taking note of its haters.
  154. dreamrealoof, the rendering on the site is... not great
  155. * magla joined #java
  156. dreamrealI dunno what we did to lose yawkat but...
  157. cheeserhe's off at oracle doing the dark lord's work.
  158. dreamrealoh, good for him!
  159. odinsbaneAre the logs not working?
  160. dreamrealwhat logs
  161. dreamrealdang it,I am missing all the context for this discussion
  162. odinsbaneAnyways, I just assumed you had written it because you had written the next four or five posts.
  163. odinsbane- logs == channel logs
  164. dreamrealodinsbane: fair, I guess. bytecode.news has channel logs for #java, through nevet; dunno about javabot.
  165. dreamrealcheeser: I assume that's still okay, I can turn that off if you want
  166. cheeseri don't mind.
  167. cheeserthe bot is still logging. i'm mostly done with a migration off dropwizard. i just have to test that the web view still works and then i'll merge and deploy it.
  168. dreamrealodinsbane: nevet's logs do not go back as far as javabot's, of course
  169. odinsbaneOh, I was going to check the conversation from today.
  170. odinsbaneIt's not important.
  171. dreamrealhttps://pudl.bytecode.news/logs?open=logs-a3f224937f-20260930&top=logs-a3f224937f-20260930&p.logs-a3f224937f-20260930=maximized:0.06,0.05,0.55,0.75
  172. javabotdreamreal's title: "Logs | ByteCode.News"
  173. jbosmanswhat's the added value of publicly sharing all logs?
  174. dreamrealcontext, etc
  175. jbosmanslike for AI ?
  176. dreamrealLike, we have a lot of accumulated wisdom and the logs have a lot of it, if you know how to look
  177. dreamrealno
  178. cheeserfun fact: the early javabot had a primitive form of ... i guess it would be closer to ML than anything else. HAL it was called, iirc.
  179. cheeserbut it tried to serialize a map of 65+M worth of data on every channel event. performance was not great.
  180. dreamrealprevayler FTW!
  181. jbosmansi understand the value of data, but the 100% "public" of it somehow doesn't sit 100% well with me, although it's been in the topic forever so sure no complaints :)
  182. cheeserit's probably been the policy longer than you've used irc :)
  183. dreamrealWell, for IRC the recommendation is this: if you don't want it known that you said it, don't say it
  184. odinsbanejbosmans when you have a crappy web interface and you want to check if a topic was somehow resolved or not.
  185. jbosmansinteresting, how long has it been the policy? :)
  186. cheeserwell over 2 decades now
  187. dreamrealjbosmans: stretches back through efnet and freenode #java for literal decades
  188. dreamrealefnet #java had the same policy, freenode #java as well although the two channels aren't related
  189. jbosmans:) in that case (alas) not longer
  190. odinsbaneWe thought it would die with the y2k bug.
  191. * hotcoffee_ joined #java
  192. jbosmansanswers all make sense, just a difference of opinion, and also for me: times changed since then i think
  193. jbosmanssame way eg http mostly went out of fashion vs https
  194. dreamrealI don't think an AI scraper would have a great time pulling out coherent content from IRC logs like these
  195. jbosmansnicks who post more than ChanServ here https://pastebin.com/PPc5sHWn
  196. jbosmansso not sure if that's true, but having said that all good, was just curious
  197. dreamrealthe hell I need to learn to shut up some :D
  198. jbosmans:-P
  199. odinsbaneBy post or text volume?
  200. jbosmansit's got some processing before counting so ymmv
  201. dreamrealGiven the way I write probably about the same :D
  202. odinsbaneIf it is text volume, either Surial has changed his nick or this covers the last 24 hours.
  203. dreamrealIt depends on teh scope of the search. surial's not on that list, though.
  204. dreamrealBut Maldivia hasn't posted here for quite a while either.
  205. jbosmansit's based on logs since i joined here
  206. jbosmansattempt at "top 10 meaningful words" https://pastebin.com/UZfa8tgj
  207. jbosmans(those posts expire in a day)
  208. dreamrealremove stop words
  209. jbosmansyeah i tried :)
  210. jbosmansapparently 49. dreamreal : 715 :)
  211. jbosmansi tried to remove stopwords as in "i pulled in some list of stop words once and excluded them"
  212. * LtHummus joined #java
  213. * hotcoffee joined #java
  214. odinsbaneOne way an array is not as good as a List is the double/Double issue. Does that problem still hold for a value class?
  215. * hotcoffee joined #java
  216. cheeserno. that's the point.
  217. cheeseriirc, Double, et al, will be retrofitted as value classes.
  218. jbosmansi'm not sure if : double a = 1L; Double b = 1L; => a == b
  219. jbosmansbetter: i'm not sure if assertTrue(a == b) would pass
  220. cheesertoday, no. with value classes, yes.
  221. hotcoffeejbosmans: did you mean double a = 1l; Long b = 1l; a == b?
  222. jbosmansperformance-wise yes but also identity-wise?
  223. jbosmanswell, i guess i just answered it myself :)
  224. jbosmansgiven value classes will have no identity
  225. cheeseryup :)
  226. jbosmanshotcoffee, no i think, but i was wrong
  227. jbosmanswell, i hope ! i'll test it in march 2027 or so i guess
  228. ernimrilif you compare a double to a Double you will call .doubleValue and compare double, so 1 should be equal to 1
  229. ernimrilyou can check the bytecode if you want
  230. jbosmans:o today? didn't know
  231. jbosmansi knew of auto-(un)boxing etc, but not that it also did that
  232. hotcoffeejbosmans: yep. It works and gives you true to a == b. Test it in jshell, if you can.
  233. * ferdna joined #java
  234. odinsbaneWould Double a = 1; Double b = new Double(1); Then a==b should be false? What happens if they're retrofitted?
  235. ernimrilwell, check it out: https://javap.yawk.at/#lfAUd0
  236. nevetjavap pastebin
  237. jbosmansdamn, i feel stupid, just wrote a unit test :)
  238. ernimrilline 77 is the doubleValue and then you have a dcmpl
  239. jbosmansthanks ernimril && hotcoffee ^
  240. jbosmansi should've read the JLS and/or paid more attention when upgrading to java 5
  241. jbosmansthose days were still about swing for me
  242. ernimrilyou can join me in writing a compiler, then you will have the need to know how the bytecode actually works...
  243. jbosmansI'm not cut out for that I fear, although it was a lot of fun (co)implementing and then maintaining some ERP formula language in java
  244. jbosmansernimril, which language version are you targeting?
  245. ernimril8 to 25 for now, but I will probably go up to 27 in a while
  246. * stfstfm joined #java
  247. jbosmanswow, as a personal project or ? sorry, i'm assuming everyone knows but me
  248. ernimrilyes, a multi year pet project, but compiling itself and some smaller projects correctly now :-)
  249. ernimrilweb site needs an update though, I have not really updated it in quite a while
  250. jbosmanslots of kudos
  251. ernimrilif you want to check it out then clone the git repo you find on: https://www.khelekore.org/parjac2/
  252. nevetParjac2
  253. jbosmansaka you're a bytecode expert as you've shown just before :)
  254. ernimrileh, bytecode is easy to read, I am not writing it myself though
  255. ernimril(using the classfile api)
  256. odinsbaneThis probably ~would be~ is a pretty good source for ai scraping. There's been a lot of trash talking, but a lot of questions have been answered to.
  257. ernimrilodinsbane, ?
  258. odinsbanes/to\./too\./
  259. dreamrealernimril: he's talking about logs, I think.
  260. odinsbanedreamreal said "I don't think an AI scraper would have a great time pulling out coherent content from IRC logs like these"
  261. jbosmansah classfile api, that's brian goetz' latest hands on code iirc
  262. ernimrilthe classfile api has been around for quite a few years now
  263. jbosmanssounds great ^
  264. dreamrealodinsbane: Well, I still disagree: the channel is borderline incoherent when it's busy, and most of the knowledge shared is shared more coherently elsewhere. After all, that's part of the reason javachannel.org existed in the first place: to take the incoherent stuff from the channel conversation and boil it into coherence.
  265. jbosmanshmm i may be confusing it with something else :s i'm definitely a user of java rather than expert
  266. jbosmans(classfile api was removed from preview with JDK 24 it seems so i'm not full out of date)
  267. ernimrilyes, but it was in preview for several releases
  268. ernimriland dmlloyd backported it to earlier versions
  269. jbosmansright, i knew that
  270. jbosmansi'm very much a user of java, maintaining things etc, so never preview features (for one)
  271. * Ragnor joined #java
  272. * m joined #java
  273. * hwpplayer1 joined #java
  274. * stfstfm joined #java
  275. * Betal joined #java
  276. * nevet joined #java
  277. * 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.
  278. * johnjay joined #java
  279. * ramontjunior joined #java
  280. * 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.
  281. * nevet joined #java
  282. * johnjay joined #java
  283. * jreicher joined #java
  284. jreicherjavabot logs are still missing from the website. Just sayin'.
  285. javabotjreicher, what does that even *mean*?
  286. jreicherOh I'm so sorry. That got mentioned just four hours ago. (Still catching up on scrollback)
  287. * johnjay joined #java
  288. jreicherdreamreal: I didn't realise you had the logs on bytecode. Ta.
  289. jreicherAlso, where do you think Java knowledge is shared more coherently than here? (Other than "properly authored" articles/blogposts, etc.)
  290. * johnjay joined #java
  291. * jiffy__ joined #java
  292. * iwtga577 joined #java
  293. * d1b joined #java
  294. * jaskarth joined #java