deebolooks 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
NeXeNdid they, well such a shame
* ChanServ joined #java
* litharge joined #java
* roesyyu joined #java
* domicron joined #java
* ChaiTRex joined #java
* roesyyu joined #java
* Inline joined #java
* xeno joined #java
* ptomli1 joined #java
* roesyyu joined #java
* ptomli joined #java
* roesyyu joined #java
* pebble joined #java
* yeahitsme joined #java
* xeno joined #java
* tabmow joined #java
* xeno joined #java
* szkl joined #java
* graves joined #java
* pebble left #java (No boundaries on the net!)
* Maldivia joined #java
* dostoyevsky2 joined #java
* roesyyu joined #java
* yeahitsme joined #java
* tabmow joined #java
* roesyyu joined #java
* tabmow joined #java
* Maldivia joined #java
* roesyyu joined #java
* MikeBux joined #java
* yeahitsme joined #java
* Aedil3 joined #java
* Afroboy joined #java
* mwnaylor left #java (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.2))
* nani joined #java
* roesyyu joined #java
* Inline joined #java
* BarnabasDK joined #java
* MikeBux joined #java
* deavmi joined #java
* jreicher joined #java
* fgarcia joined #java
* Maldivia joined #java
* Afroboy joined #java
* szkl joined #java
* roesyyu joined #java
* dostoyevsky2 joined #java
* xeno joined #java
* five618480339176 joined #java
* DrinkyBird joined #java
* Rainier joined #java
* Tenchi joined #java
* deavmi joined #java
* hwpplayer1 joined #java
* roesyyu joined #java
* enoq joined #java
enoqlooking 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
enoqspecifically looking at gradle tasks right now
* dreamreal joined #java
Shellthey 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.
enoqand then just read them from stdin?
enoqI've got a bunch of those that I need for a release task
enoqthe 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
* roesyyu joined #java
* yano joined #java
deebowe just read stuff from aws secretsmanager as needed
* Inline joined #java
dreamrealI just put it straight in the CI/CD scripts, saves a lot of time
dreamreal"wanna know where the secret is? Just look in the workflow, it's right there, easy peasy"
dreamreal"and no, we're not sure why our releases are riddled with holes and exploits, why do you ask?"
dreamreal"Come to think of it, every time we release, there's a whole bunch of followup releases. Weird, right?"
Inlinecakenet
dreamrealI actually HAVE been wondering why we started embedding openclaw
Inlinethe friendly spies patching further......
Inlinelol
* kinabalu joined #java
* APic joined #java
* roesyyu joined #java
enoqyou are joking, but this is sort of what's happening
dreamrealThat's what makes it funny
dreamrealvery ha ha only serious
* Ragnor joined #java
* jamezp joined #java
* mwnaylor joined #java
* Inline joined #java
cheeserthis is what github secrets are for.
* kcomhnall joined #java
dreamrealbut do we trust THOSE these days
cheesermostly, yeah. yolo and all that.
dreamrealI protect all of my users' secrets by not having users
dreamrealproblem SOLVED.
cheeserthat's the most secure way, really. you can't leak any PII if you don't have any P to I.
enoqlet'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?
* roesyyu joined #java
enoqdo you force the method signature to pass an InputStreamReader instead and require the caller to pass that instead of the InputStream?
dreamrealyou want the inputstreamreader open even after you consume it?
dreamrealThis sounds vaguely broken
enoqI want to return a Stream<TextLine>
dreamrealright. So why is it still open when you're out of the block?
enoqso if you close the input stream in the method, the Stream will have a closed input stream when it is being evaluated
enoqhm, gonna whip up some code to demonstrate the problem, one sec
dreamrealSo 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
enoqright, basically trying to figure out how to design the API so I can pass an InputStream and not leak file descriptors
enoqgutt feeling is that the input stream needs a try with resources outside the parse method
dreamrealyou're about to enter callback hell, probably. So how large are these inputstreams?
enoqI definitely could load them into RAM, more interested in how the streaming solution would be done though
dreamrealyou'd leak the handle, speaking literally, by returning something that pulled the data reactively
dreamrealit's a gross model
enoqis there a better way to do that?
dreamrealdepends on the input! Me, I'd return a List<String> personally, unless the input's large or the stream is, well, streamed
dreamreala 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
enoqright, what if the input is too large to hold in memory?
dreamrealthen a visitor pattern is your friend, or that flux thing and self-hatred
enoqthat's RxJava, right?
dreamrealFWIW: I do get to deal with this
dreamrealamong others
dreamrealdo you have to deal with context? Like, do the lines relate to each other?
enoqno, I just have to split them based on a marker
dreamrealthen it's easy, visitor is the low-impact version
dreamrealwhat *I* have to do is have a resettinhg stream and parse in blocks, it's great fun
dreamreal(I have expressions that can cross line-endings, possibly MANY line endings, it's great fun)
dreamrealthat's one, yeah
enoqthank you!
dreamrealimagine: void handleInputStream(InputStream is, Visitor visitor) { /* for every line read, call visitor.accept(line); */ }
dreamrealno 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
dreamrealit's not a *perfect solution with no possible flaws* but it shares that condition with the set of all code
enoqI see, thank you
* roesyyu joined #java
dreamrealenoq: 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)
enoqI know that :)
dreamrealWell, the point is that *I* know that too :D
enoqI'm merely curious what the solutions could be
dreamrealIf 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..."
* roesyyu joined #java
dreamrealadvice on IRC tends to be worth every penny you paid for it :D
enoqI'll write an angry letter to Brian Goetz
dreamrealYou should! Make it very stern. Namecheck me and he'll probably laugh at you for it. :D
* jontxu joined #java
* MonsterAbyss joined #java
* roesyyu joined #java
* roesyyu joined #java
* acidsys joined #java
* jetchisel joined #java
[twisti]* [twisti] twitches at A)... 2)... D)
dreamreal* dreamreal giggles
* rvalue- joined #java
* kcomhnall joined #java
* gareppa joined #java
* jetchisel joined #java
* Learath2 joined #java
* roesyyu joined #java
* roesyyu joined #java
* dob1 joined #java
* roesyyu joined #java
* roesyyu joined #java
* rvalue joined #java
* lordnoid joined #java
* Inline joined #java
* Wbooze joined #java
* Tenchi joined #java
* roesyyu joined #java
* rorx joined #java
* magla joined #java
* MonsterAbyss joined #java
* vincere joined #java
* roesyyu joined #java
* kcomhnall joined #java
* LtHummus joined #java
* LtHummus joined #java
* roesyyu joined #java
* m joined #java
* roesyyu joined #java
* GreenResponse joined #java
* kcomhnall joined #java
* Arsen joined #java
* roesyyu joined #java
* sa02irc joined #java
* roesyyu joined #java
* roesyyu joined #java
* roesyyu joined #java
* james5 joined #java
jbosmansdarnit, opus 4.7 recommends me to use StructuredTaskScope in java 25, despite multiple nudges to double (or triple or ..) check first before responding
* mwnaylor left #java (ERC 5.6.0.30.1 (IRC client for GNU Emacs 30.2))
jbosmanssorta disappointing
jbosmansi could've been a 10x engineer ^
* tabmow joined #java
* graves joined #java
* wedr joined #java
* Arsen joined #java
enoqhm, I thought you shouldn't review AI responses to achieve that 10x speedup