ByteCode.News
Submit RSS Atom Sign in

Back to the channels

#java

  1. * michele joined #java
  2. * kcomhnall joined #java
  3. * Flow joined #java
  4. * johnjay joined #java
  5. * roesyyu joined #java
  6. * LtHummus joined #java
  7. * roesyyu joined #java
  8. * rvalue- joined #java
  9. * mixfix41 joined #java
  10. * roesyyu joined #java
  11. * hwpplayer1 joined #java
  12. deebo looks like the guy left but for anyone else, use a platform jdbc wrapper, e.g. AWS has their own that works for rds/aurora and can do faster failover and r/w splitting etc funky stuff
  13. NeXeN did they, well such a shame
  14. * ChanServ joined #java
  15. * litharge joined #java
  16. * roesyyu joined #java
  17. * domicron joined #java
  18. * ChaiTRex joined #java
  19. * roesyyu joined #java
  20. * Inline joined #java
  21. * xeno joined #java
  22. * ptomli1 joined #java
  23. * roesyyu joined #java
  24. * ptomli joined #java
  25. * roesyyu joined #java
  26. * pebble joined #java
  27. * yeahitsme joined #java
  28. * xeno joined #java
  29. * tabmow joined #java
  30. * xeno joined #java
  31. * szkl joined #java
  32. * graves joined #java
  33. * pebble left #java (No boundaries on the net!)
  34. * Maldivia joined #java
  35. * dostoyevsky2 joined #java
  36. * roesyyu joined #java
  37. * yeahitsme joined #java
  38. * tabmow joined #java
  39. * roesyyu joined #java
  40. * tabmow joined #java
  41. * Maldivia joined #java
  42. * roesyyu joined #java
  43. * MikeBux joined #java
  44. * yeahitsme joined #java
  45. * Aedil3 joined #java
  46. * Afroboy joined #java
  47. * mwnaylor left #java (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.2))
  48. * nani joined #java
  49. * roesyyu joined #java
  50. * Inline joined #java
  51. * BarnabasDK joined #java
  52. * MikeBux joined #java
  53. * deavmi joined #java
  54. * jreicher joined #java
  55. * fgarcia joined #java
  56. * Maldivia joined #java
  57. * Afroboy joined #java
  58. * szkl joined #java
  59. * roesyyu joined #java
  60. * dostoyevsky2 joined #java
  61. * xeno joined #java
  62. * five618480339176 joined #java
  63. * DrinkyBird joined #java
  64. * Rainier joined #java
  65. * Tenchi joined #java
  66. * deavmi joined #java
  67. * hwpplayer1 joined #java
  68. * roesyyu joined #java
  69. * enoq joined #java
  70. enoq looking at the npm madness, how do you usually handle API tokens required to publish github releases or access APIs? right now I've got those as env variables which is probably not a good idea
  71. enoq specifically looking at gradle tasks right now
  72. * dreamreal joined #java
  73. Shell they should not be in your environment or accessible to you until you are publishing those releases or accessing those APIs. stick them in a password vault.
  74. enoq and then just read them from stdin?
  75. enoq I've got a bunch of those that I need for a release task
  76. enoq the alternative ofc would be to read them from an encrypted json file, but I'm not sure if there's something that's commonly used here
  77. * roesyyu joined #java
  78. * yano joined #java
  79. deebo we just read stuff from aws secretsmanager as needed
  80. * Inline joined #java
  81. dreamreal I just put it straight in the CI/CD scripts, saves a lot of time
  82. dreamreal "wanna know where the secret is? Just look in the workflow, it's right there, easy peasy"
  83. dreamreal "and no, we're not sure why our releases are riddled with holes and exploits, why do you ask?"
  84. dreamreal "Come to think of it, every time we release, there's a whole bunch of followup releases. Weird, right?"
  85. Inline cakenet
  86. dreamreal I actually HAVE been wondering why we started embedding openclaw
  87. Inline the friendly spies patching further......
  88. Inline lol
  89. * kinabalu joined #java
  90. * APic joined #java
  91. * roesyyu joined #java
  92. enoq you are joking, but this is sort of what's happening
  93. dreamreal That's what makes it funny
  94. dreamreal very ha ha only serious
  95. * Ragnor joined #java
  96. * jamezp joined #java
  97. * mwnaylor joined #java
  98. * Inline joined #java
  99. cheeser this is what github secrets are for.
  100. * kcomhnall joined #java
  101. dreamreal but do we trust THOSE these days
  102. cheeser mostly, yeah. yolo and all that.
  103. dreamreal I protect all of my users' secrets by not having users
  104. dreamreal problem SOLVED.
  105. cheeser that's the most secure way, really. you can't leak any PII if you don't have any P to I.
  106. enoq let's say you want to read a text file by passing an input stream, you use a try with resources outside of the method; but what if you pass that stream to an InputStreamReader inside of the file and want to keep the input stream open?
  107. * roesyyu joined #java
  108. enoq do you force the method signature to pass an InputStreamReader instead and require the caller to pass that instead of the InputStream?
  109. dreamreal you want the inputstreamreader open even after you consume it?
  110. dreamreal This sounds vaguely broken
  111. enoq I want to return a Stream<TextLine>
  112. dreamreal right. So why is it still open when you're out of the block?
  113. enoq so if you close the input stream in the method, the Stream will have a closed input stream when it is being evaluated
  114. enoq hm, gonna whip up some code to demonstrate the problem, one sec
  115. dreamreal So it sounds like you're actually doing a mapping: you have an inputstream, you want a stream of lines, and the block form is wrong
  116. enoq right, basically trying to figure out how to design the API so I can pass an InputStream and not leak file descriptors
  117. enoq gutt feeling is that the input stream needs a try with resources outside the parse method
  118. dreamreal you're about to enter callback hell, probably. So how large are these inputstreams?
  119. enoq I definitely could load them into RAM, more interested in how the streaming solution would be done though
  120. dreamreal you'd leak the handle, speaking literally, by returning something that pulled the data reactively
  121. dreamreal it's a gross model
  122. enoq is there a better way to do that?
  123. dreamreal depends on the input! Me, I'd return a List<String> personally, unless the input's large or the stream is, well, streamed
  124. dreamreal a Flux<String> is an alternative, and it's very efficient, but you'll hate yourself and whoever decided to make you use that, which might mean you hate yourself twice as much, and you'll deserve it
  125. enoq right, what if the input is too large to hold in memory?
  126. dreamreal then a visitor pattern is your friend, or that flux thing and self-hatred
  127. enoq that's RxJava, right?
  128. dreamreal FWIW: I do get to deal with this
  129. dreamreal among others
  130. dreamreal do you have to deal with context? Like, do the lines relate to each other?
  131. enoq no, I just have to split them based on a marker
  132. dreamreal then it's easy, visitor is the low-impact version
  133. dreamreal what *I* have to do is have a resettinhg stream and parse in blocks, it's great fun
  134. enoq https://en.wikipedia.org/wiki/Visitor_pattern this one?
  135. nevet Visitor pattern - Wikipedia
  136. dreamreal (I have expressions that can cross line-endings, possibly MANY line endings, it's great fun)
  137. dreamreal that's one, yeah
  138. enoq thank you!
  139. dreamreal imagine: void handleInputStream(InputStream is, Visitor visitor) { /* for every line read, call visitor.accept(line); */ }
  140. dreamreal no leakage, generally quite efficient, trivial to test and validate, if visitor has state it can persist outside of the method call, but state still needs to be bounded
  141. dreamreal it's not a *perfect solution with no possible flaws* but it shares that condition with the set of all code
  142. enoq I see, thank you
  143. * roesyyu joined #java
  144. dreamreal enoq: I don't want to pretend that I am A) the fount of all wisdom (I ain't) and 2) knowledgable about YOUR SPECIFIC INPUTS (I definitely ain't) and D) solving every performance/execution problem from IRC (... I am not)
  145. enoq I know that :)
  146. dreamreal Well, the point is that *I* know that too :D
  147. enoq I'm merely curious what the solutions could be
  148. dreamreal If you come back in three hours and say "OMG dreamreal you were SO WRONG" I'll shrug and say "sure thing, I wonder why I mentioned caveat emptor..."
  149. * roesyyu joined #java
  150. dreamreal advice on IRC tends to be worth every penny you paid for it :D
  151. enoq I'll write an angry letter to Brian Goetz
  152. dreamreal You should! Make it very stern. Namecheck me and he'll probably laugh at you for it. :D
  153. * jontxu joined #java
  154. * MonsterAbyss joined #java
  155. * roesyyu joined #java
  156. * roesyyu joined #java
  157. * acidsys joined #java
  158. * jetchisel joined #java
  159. [twisti] * [twisti] twitches at A)... 2)... D)
  160. dreamreal * dreamreal giggles
  161. * rvalue- joined #java
  162. * kcomhnall joined #java
  163. * gareppa joined #java
  164. * jetchisel joined #java
  165. * Learath2 joined #java
  166. * roesyyu joined #java
  167. * roesyyu joined #java
  168. * dob1 joined #java
  169. * roesyyu joined #java
  170. * roesyyu joined #java
  171. * rvalue joined #java
  172. * lordnoid joined #java
  173. * Inline joined #java
  174. * Wbooze joined #java
  175. * Tenchi joined #java
  176. * roesyyu joined #java
  177. * rorx joined #java
  178. * magla joined #java
  179. * MonsterAbyss joined #java
  180. * vincere joined #java
  181. * roesyyu joined #java
  182. * kcomhnall joined #java
  183. * LtHummus joined #java
  184. * LtHummus joined #java
  185. * roesyyu joined #java
  186. * m joined #java
  187. * roesyyu joined #java
  188. * GreenResponse joined #java
  189. * kcomhnall joined #java
  190. * Arsen joined #java
  191. * roesyyu joined #java
  192. * sa02irc joined #java
  193. * roesyyu joined #java
  194. * roesyyu joined #java
  195. * roesyyu joined #java
  196. * james5 joined #java
  197. jbosmans darnit, opus 4.7 recommends me to use StructuredTaskScope in java 25, despite multiple nudges to double (or triple or ..) check first before responding
  198. * mwnaylor left #java (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.2))
  199. jbosmans sorta disappointing
  200. jbosmans i could've been a 10x engineer ^
  201. * tabmow joined #java
  202. * graves joined #java
  203. * wedr joined #java
  204. * Arsen joined #java
  205. enoq hm, I thought you shouldn't review AI responses to achieve that 10x speedup
  206. jbosmans :D
  207. * Candle joined #java
  208. * yamada joined #java
  209. * X-Scale joined #java
  210. * jreicher joined #java
  211. * SJrX joined #java
  212. jreicher Looks like javabot is dead
  213. NeXeN looks like my wifi is dead
  214. NeXeN jeeze, every 45 seconds