Info

Login

Channels

APIs

Credits

  • cheeser
  • ernimril
  • joed
  • kinabalu
  • lunk
  • ojacobson
  • r0bby
  • ThaDon
  • ricky_clarkson
  • topriddy

« 2021-10-17

2021-10-18

2021-10-19 »

Nick Message Date
_ht [_ht!~quassel@82-169-194-8.biz.kpn.net] has joined #java [12:13]
eco [eco!~ubuntu@ec2-54-201-230-197.us-west-2.compute.amazonaws.com] has joined #java [12:30]
Svitkona [Svitkona!~Svitkona@157.245.38.135] has joined #java [12:31]
cwaydt [cwaydt!~cwaydt@user/cwaydt] has joined #java [12:31]
shiroyasha [shiroyasha!~shiroyash@ec2-3-124-70-31.eu-central-1.compute.amazonaws.com] has joined #java [12:31]
explodes [explodes!~explodes@user/explodes] has joined #java [12:31]
a1paca [a1paca!~a1paca@user/a1paca] has joined #java [12:32]
placeb0 [placeb0!uid283215@id-283215.lymington.irccloud.com] has joined #java [12:48]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [12:54]
ron77 [ron77!~ron77@176.231.226.72] has joined #java [01:52]
sa02irc [sa02irc!~mbax@155-079-043-212.ip-addr.inexio.net] has joined #java [01:54]
upsala [upsala!~zcb@185.213.155.160] has joined #java [02:04]
spronkey [spronkey!~spronkey@2406:e000:6897:7a01:28d4:537a:917a:629c] has joined #java [02:06]
sdu [sdu!~doo@185.44.146.114] has joined #java [02:11]
Haxxa [Haxxa!~Haxxa@122.199.45.48] has joined #java [02:17]
kicked Haxxa (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 18h) [02:17]
lithium [lithium!~lithium@user/lithium] has joined #java [02:26]
asbachb [asbachb!~asbachb@p5b3f64f1.dip0.t-ipconnect.de] has joined #java [02:28]
asbachb Hi. Are there any best practices for JavaEE resources. Like you should not use jndi for lookups if possible? [02:29]
asbachb *JakartaEE [02:29]
Maldivia cheeser/redb: https://javap.yawk.at/#RV2uKH -- produces the exact same byte code [02:38]
Gustavo6046 [Gustavo6046!~Gustavo60@user/gustavo6046] has joined #java [02:39]
Haxxa [Haxxa!~Haxxa@89nnjg0xckz9ggn6r5xm.ip6.superloop.com] has joined #java [02:41]
kicked Haxxa (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 18h) [02:41]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [02:45]
Square [Square!~a@178.62.91.8] has joined #java [02:55]
Matthijs [Matthijs!~quassel@77-61-103-58.biz.kpn.net] has joined #java [03:02]
pikapika [pikapika!~pikapika_@pika.powered.by.lunarbnc.net] has joined #java [03:19]
cation21 [cation21!cation@user/cation] has joined #java [03:22]
Ilyu [Ilyu!~quassel@78.202.228.230] has joined #java [03:26]
karm [karm!~karm@89-24-49-244.nat.epc.tmcz.cz] has joined #java [03:31]
darkstarx [darkstarx!~darkstard@2601:1c2:300:c8a0::6c32] has joined #java [04:03]
KnownSyntax [KnownSyntax!sid233169@user/knownsyntax] has joined #java [04:03]
jbg [jbg!sid494673@user/jbg] has joined #java [04:03]
PocketKiller [PocketKiller!PacKetIV@user/packetiv] has joined #java [04:04]
r0bby [r0bby!r0bby@user/r0bby] has joined #java [04:04]
hendursa1 [hendursa1!~weechat@user/hendursaga] has joined #java [04:05]
Geolykt [Geolykt!~Geolykt@94.46.93.245] has joined #java [04:15]
sa02irc [sa02irc!~mbax@155-079-043-212.ip-addr.inexio.net] has joined #java [04:37]
Diablo-D3 http://manifold.systems/ [04:39]
Diablo-D3 Diablo-D3's title: "Manifold - plugs into Java, provides powerful features like Type-safe Metaprogramming, Extension Methods, Operator Overloading, Units, Templates, and a Preprocessor" [04:39]
Diablo-D3 that kinda looks neat [04:39]
[twisti] all this stuff always looks neat, but one of javas greatest strengths is the ecosystem and tooling, and most of stuff like that breaks most of the tooling [04:48]
odinsbane [odinsbane!~mbs@pat-pool-138.crick.ac.uk] has joined #java [05:22]
odinsbane Did anybody happen to answer about my java / swing/ wayland question. [05:25]
odinsbane I installed some libs, and now java swing apps dont work. Idea run's them fine though. [05:26]
[twisti] what error message are you getting [05:27]
odinsbane No error messages. The app just doesn't do anything. [05:34]
[twisti] not even in the console ? [05:37]
odinsbane nope [05:38]
odinsbane It just waits. [05:39]
odinsbane Maybe I haven't waited long enough. [05:40]
Diablo-D3 odinsbane: weird, maybe your x-in-wayland thing isnt running? [05:42]
odinsbane Yeah, that seems to be the issue. I think it is running and working, but when I run java it isn't using it. [05:44]
odinsbane I can ssh to the localhost with a -X and start the apps. [05:44]
Diablo-D3 huh, maybe you're .Xauthority is wrong? [05:46]
Diablo-D3 er, your [05:47]
karm [karm!karm@nat-pool-brq-t.redhat.com] has joined #java [05:48]
odinsbane It could be, using my public key was going fine without a passwork. Now I always have to enter the password. [06:05]
dob1 from an OffsetDateTime that have a ZoneOffset related to UTC, how can I get a new OffsetDateTime with the ZoneOffset of my timezone ? I think I should use withOffsetSameInstant(ZoneOffset offset), I don't understand how to create ZoneOffset [06:05]
dob1 or I have to use myOffsetDateTime.atZoneSameInstanc(zoneId).toOffsetDateTime() ? [06:07]
yawkat yes, do that. the same zone id may have different offsets depending on DST [06:08]
dob1 yawkat, ok thanks [06:10]
sdu [sdu!~doo@185.44.146.114] has joined #java [06:12]
daoudr [daoudr!~daoudr@2a02:1205:c681:1650:2213:cc7f:a040:3a92] has joined #java [06:18]
qqqhhh [qqqhhh!~qqqhhh@45.83.220.191] has joined #java [06:22]
jeukku [jeukku!~jeukku@user/jeukku] has joined #java [06:29]
hornhack [hornhack!~hackingho@user/hackinghorn] has joined #java [06:35]
darksun [darksun!~darksun@user/darksun] has joined #java [06:43]
dreamreal [dreamreal!~dreamreal@about/java/dreamreal] has joined #java [06:51]
llorllale [llorllale!~llorllale@2607:9880:3a18:69:e886:9a:1db9:e84a] has joined #java [07:09]
jsmooth [jsmooth!~quassel@user/jsmooth] has joined #java [07:22]
kupi [kupi!uid212005@id-212005.hampstead.irccloud.com] has joined #java [07:48]
pflo [pflo!~pflo@user/pflo] has joined #java [07:56]
hendursa1 [hendursa1!~weechat@user/hendursaga] has joined #java [08:12]
dalek-caan [dalek-caan!~Thunderbi@109-252-124-86.nat.spd-mgts.ru] has joined #java [08:21]
placeb0 [placeb0!uid283215@id-283215.lymington.irccloud.com] has joined #java [08:24]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@user/peste-bubonica/x-0568126] has joined #java [08:31]
Peste_Bubonica [Peste_Bubonica!~Peste_Bub@user/peste-bubonica/x-0568126] has joined #java [08:39]
koevet [koevet!~koevet@ip5b4113de.dynamic.kabel-deutschland.de] has joined #java [08:40]
wedr [wedr!~wedr@pool-108-20-128-8.bstnma.fios.verizon.net] has joined #java [08:49]
zeden [zeden!~zeden@user/zeden] has joined #java [08:53]
zeden [zeden!~zeden@user/zeden] has joined #java [08:56]
hackinghorn [hackinghorn!~hackingho@user/hackinghorn] has joined #java [09:24]
bluehoney [bluehoney!~pylong@cpe-75-81-204-188.mi.res.rr.com] has joined #java [09:24]
bluehoney parted the channel: [09:24]
Aison [Aison!~Ivo@2a02:168:200f:100::1:1] has joined #java [09:32]
Aison can I use array access as lambda? something like IntFunction<String> elementSupplier = myStringArray::[]; [09:33]
dreamreal No. [09:33]
Aison or do I have to define it as elementSupplier = i -> myStringArray[i]; [09:33]
dreamreal The supplier works, but why use arrays anyway - ArrayLists are better in nearly every common case [09:34]
nullBlank [nullBlank!~abdu@user/nullblank] has joined #java [09:35]
nullBlank ello [09:35]
Trieste_ [Trieste_!T@user/pilgrim] has joined #java [09:36]
nullBlank ded [09:36]
nullBlank parted the channel: WeeChat 2.8 [09:36]
dreamreal You can certainly find cases where ArrayList doesn't fit a specific situation - primitives, for example, when you need performance - but in general, prefer List to arrays [09:36]
patrice [patrice!~patrice@user/patrice] has joined #java [09:40]
[itchyjunk] [[itchyjunk]!~itchyjunk@user/itchyjunk/x-7353470] has joined #java [09:42]
Aison dreamreal, thx [09:47]
Tabmow Is it frowned upon to use a numeric auto_increment ID vs. a GUID/UUID? [09:58]
sbalmos I frown on it. but I'm typically a scowler anyway. [10:00]
sbalmos on the flip side, GUID/UUIDs are typically bad at clustering in indexes. But none of this is a Java issue. [10:07]
[twisti] Tabmow: not all setups/db systems/whatever support a numeric AI [10:07]
sonOfRa Tabmow: it depends. Are you exposing the internal database IDs? Is it a problem that they are guessable? Does an attacker gain an advantage of knowing how many records of a type are in your database? What are the performance characteristics of UUIds on your engine (some engines store them as text by default, rather than binary etc.) [10:12]
sbalmos my personal favorite from experience - PK conflicts on DB failover-failback in a multi-master setup [10:13]
sonOfRa For example, mysql is still popular, but it will often be stored as a varchar(36), rather than a binary(16), and iirc mysql 8.something is the first release to contain a native uuid_to_bin and reverse functions so you can store them as binary [10:14]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [10:16]
Tabmow I was thinking more from a security standpoint... we are using mysql 5.7 so it sounds like performance will suffer a little if we were to go the uuid route. We do pass the ID's around via rest endpoints and such [10:18]
sonOfRa security-wise it depends on what your goals are, see my first message. [10:19]
Tabmow Yeah I'm just thinking through it... even with access to an account knowing the next/previous ID or really any valid ID doesn't really post too much of a threat... I don't think anyway :| [10:21]
sonOfRa if it's user IDs, it definitely enables brute force attacks with password dictionaries [10:25]
sonOfRa And if it's users, you typically have a much more suitable primary key available anyways: the user's email address [10:25]
Tabmow sonOfRa: how does it enable brute force without the username? [10:25]
sonOfRa Another choice is making the primary key auto-increment, but not actually exposing it, and also having an index on the email address [10:25]
sonOfRa Tabmow: that depends on how the system is built, and if log in via the identifier is possible, of course [10:26]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [10:26]
Tabmow Ahh right, yeah we don't have an attack vector from that perspective. The ID's are mainly used in our ORM and SQL. We do have username/email which is a PK as well which we could have used too I guess. Not sure why it was chosen this way... [10:27]
dreamreal if your performance is noticably impacted by use of a UUID over a numeric ID, you either have a TON of load with severe performance requirements or you're using the wrong database. [10:31]
dreamreal from a security perspective, numeric ids aren't that much of a risk, depending on allocation strategies. (If you're using JPA, use a block allocation strategy and the numbers won't be contiguous all that often anyway.) [10:31]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined #java [10:33]
koevet [koevet!~koevet@ip5b4113de.dynamic.kabel-deutschland.de] has joined #java [10:39]
Ilyu [Ilyu!~quassel@78.202.228.230] has joined #java [10:55]
Harlin [Harlin!~DonQixote@c-24-128-8-53.hsd1.co.comcast.net] has joined #java [11:19]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [11:21]
whaley you should do what one of my former coworkers did, use a UUID, but store it as a varchar in the DB [11:21]
whaley (don't do this...) [11:22]
kupi [kupi!uid212005@id-212005.hampstead.irccloud.com] has joined #java [11:22]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [11:22]
whaley sbalmos: remind me why "GUID/UUIDs are typically bad at clustering in indexes" is true again? Was this due to the part of the UUID being tied to the (address of the) machine that generated it, or....? [11:29]
whaley forgive me, it's been about 5 years since I worked on a project that legimatitely had a reason for using them [11:29]
sbalmos whaley: I think it was v1/v2, rather than v4, UUIDs that were so random in their components, they were terrible at indexing [11:30]
sbalmos I think the v4 UUIDs are the ones tied to machine / NIC(s), and are slightly better? [11:30]
whaley nods [11:30]
whaley yes, and I was using v4's I think for this reason [11:30]
sbalmos I went the Twitter / Insta / whoever-it-was route, and use a 48-bit long composed of a cluster ID, 1-second granularity timestamp, and 3-bit sequence. [11:32]
sbalmos It still looks like a numeric value for URLs and such, rather than a nasty UUID [11:32]
whaley snowflake! [11:32]
sbalmos yeah... [11:32]
sniperwolf [sniperwolf!~sniperwol@91.230.98.1] has joined #java [11:32]
sbalmos originally started out as full 64-bit... until our UK group, writing the prototype frontend for my app, ran into the Javascript everything's-a-float buzzsaw, and I realized I really only had 53 bits availalbe. [11:33]
sbalmos so I just said f* it and restricted to 48 bits [11:33]
whaley facepalm [11:33]
sbalmos it's still insane overkill. but at least this way I solved (in theory) my failback-PK-conflict issues [11:37]
jeukku [jeukku!~jeukku@user/jeukku] has joined #java [11:43]
The_Blode [The_Blode!~Blode@user/the-blode/x-7164444] has joined #java [11:58]
cmbengue [cmbengue!~Thunderbi@207.191.249.160] has joined #java [12:00]
The_Jag [The_Jag!~The_Jag@host-80-183-32-131.pool80183.interbusiness.it] has joined #java [12:11]
dreamreal [dreamreal!~dreamreal@about/java/dreamreal] has joined #java [12:20]
lithium [lithium!~lithium@user/lithium] has joined #java [12:20]
placeb0 [placeb0!uid283215@id-283215.lymington.irccloud.com] has joined #java [12:20]
DoofusCanadensis [DoofusCanadensis!~DoofusCan@207.229.38.10] has joined #java [12:23]
AlanMD [AlanMD!~AlanMD@193.105.140.131] has joined #java [12:35]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [12:39]
lucerne [lucerne!~lucerne@ip202.ip-51-178-215.eu] has joined #java [12:44]
jeukku_ [jeukku_!~jeukku@user/jeukku] has joined #java [12:55]
Haxxa [Haxxa!~Haxxa@122.199.45.48] has joined #java [01:04]
Haxxa [Haxxa!~Haxxa@122.199.45.48] has joined #java [01:08]
carlino3 [carlino3!~carlino3@user/carlino3] has joined #java [01:15]
carlino3 hi! [01:15]
carlino3 i have a serialized java object in binary format. this object is of a class derived from another class. i only have the base class, not the derived class [01:15]
carlino3 can i deserialize it? i only need to access base class info [01:15]
dreamreal You should try it and see. [01:19]
dreamreal If you can, that's a security hole, BTW. [01:19]
dreamreal (You may want to look up why java serialization is considered a security risk, which ALSO would answer your question.) [01:20]
carlino3 yes, i'm aware of java (and any other language) serialization security risks, in fact i'm not using java, but i need to parse serialized data coming from a java system [01:23]
dreamreal Then it depends very much on the format of the data you're deserializing. Is it java serialization? protobuf? json? bson? parquet? feather? [01:24]
dreamreal As far as "can it be done," well, since Java can do it, it's just a programming problem at that point. [01:24]
carlino3 it is binary data, i think serialized with ObjectOutputStream [01:27]
carlino3 ( it has the java ABI format, as far as i understand) [01:27]
dreamreal well, it's going to be consistent, absolutely no fun to parse, but consistent [01:30]
Ilyu [Ilyu!~quassel@166.215.82.79.rev.sfr.net] has joined #java [01:30]
dreamreal https://docs.oracle.com/javase/7/docs/platform/serialization/spec/serialTOC.html [01:31]
dreamreal dreamreal's title: "Java Object Serialization Specification: Contents" [01:31]
carlino3 thanks for the link, i'll read it [01:32]
deepy [deepy!deepy@user/deepy] has joined #java [01:33]
Haxxa [Haxxa!~Haxxa@122.199.45.48] has joined #java [01:34]
GreenResponse [GreenResponse!~tomek@r-45-155-148-237.gpon.bialnet.pl] has joined #java [01:44]
magla [magla!~gelignite@55d45a4d.access.ecotel.net] has joined #java [01:50]
RougeR [RougeR!~rougex250@user/rouger] has joined #java [01:53]
koevet [koevet!~koevet@ip5b4113de.dynamic.kabel-deutschland.de] has joined #java [02:11]
jamezp [jamezp!~jamezp@redhat/jboss/jamezp] has joined #java [02:17]
Nitrousoxide [Nitrousoxide!~msdos@user/nitrousoxide] has joined #java [02:25]
cronos [cronos!~cronos@user/cronos] has joined #java [02:27]
hay207 [hay207!~hay207@156.200.164.82] has joined #java [02:50]
AlanMD [AlanMD!~AlanMD@193.105.140.131] has joined #java [02:51]
hay207 Hi guys [02:51]
hay207 What's wrong in this? [02:52]
hay207 (x<y)?min=x:(y<z)?min=y:min=z; [02:52]
koevet [koevet!~koevet@ip5b4113de.dynamic.kabel-deutschland.de] has joined #java [02:53]
DoofusCanadensis what do you expect it to do? [02:54]
ernimril hay207, uhmm.. what does the compiler tell you? That code is hard to read and you have not told us what you want the code to do [02:54]
ernimril hay207, Math.min(x, Math.min (y, z)) is probably easier to read and understand [02:54]
hay207 to find minimum of x,y,z [02:54]
hay207 And assign minimum to min [02:54]
DoofusCanadensis what happens if z is less than x and x is less than y? [02:55]
hay207 Oh, true [02:55]
ron ? [02:56]
dreamreal plus it's bloody impossible to read at first glance, if you're trying to show off AND you can't figure out what it does, you've failed [02:56]
hay207 I'm not showing off, self learning java [02:57]
DoofusCanadensis docs math.min() [02:58]
DoofusCanadensis DoofusCanadensis, what does that even *mean*? [02:58]
DoofusCanadensis I dunno javabot. it's been a while since I asked you about docs [02:58]
dreamreal hay207: well, Math.min() is your friend [02:59]
ernimril javadoc Math.min(*) [02:59]
ernimril ernimril: https://javabot.evanchooly.com/javadoc/JDK/11/java.base/java/lang/Math.html#min(int,int) [JDK: java.lang.Math#min(int, int)]; https://javabot.evanchooly.com/javadoc/JDK/11/java.base/java/lang/Math.html#min(long,long) [JDK: java.lang.Math#min(long, long)]; https://javabot.evanchooly.com/javadoc/JDK/11/java.base/java/lang/Math.html#min(float,float) [JDK: java.lang.Math#min(float, float)] [02:59]
ernimril ; https://javabot.evanchooly.com/javadoc/JDK/11/java.base/java/lang/Math.html#min(double,double) [JDK: java.lang.Math#min(double, double)] [02:59]
ron mock DoofusCanadensis [03:00]
ron DoofusCanadensis you're going to live a long life. https://www.washingtonpost.com/science/2019/10/16/excessive-brain-activity-linked-shorter-life/ [03:00]
DoofusCanadensis thanks ernimril [03:00]
hay207 Thanks [03:04]
hendursaga [hendursaga!~weechat@user/hendursaga] has joined #java [03:16]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [03:17]
malt [malt!~malt@user/malt] has joined #java [03:21]
Dizidentu [Dizidentu!~aresg@modemcable105.134-19-135.mc.videotron.ca] has joined #java [03:31]
Haxxa [Haxxa!~Haxxa@122.199.45.48] has joined #java [03:32]
kicked Haxxa (Banned: please fix your connection. you're bouncing in and out. this ban will expire after 3d) [03:32]
magla [magla!~gelignite@55d45a4d.access.ecotel.net] has joined #java [03:36]
Baobab docs somethingthatdoesn'texist() [03:42]
Baobab Baobab, what does that even *mean*? [03:42]
Baobab This javabot is cool. [03:42]
DoofusCanadensis as we learned, it's ~javadoc <methodsignature> [03:43]
qqqhhh [qqqhhh!~qqqhhh@193.138.218.222] has joined #java [04:06]
Baobab mock me [04:14]
javabot points at me and laughs [04:14]
Baobab D [04:14]
Betal [Betal!~Betal@user/betal] has joined #java [04:29]
kupi [kupi!uid212005@id-212005.hampstead.irccloud.com] has joined #java [04:31]
Matthijs [Matthijs!~quassel@77-61-103-58.biz.kpn.net] has joined #java [04:37]
bomb [bomb!~bomb@user/bomb] has joined #java [05:04]
hornhack [hornhack!~hackingho@user/hackinghorn] has joined #java [05:23]
Matthijs [Matthijs!~quassel@77-61-103-58.biz.kpn.net] has joined #java [05:25]
upsala [upsala!~zcb@185.213.155.160] has joined #java [05:29]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [05:32]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [05:50]
wedr [wedr!~wedr@pool-108-20-128-8.bstnma.fios.verizon.net] has joined #java [05:50]
spronkey [spronkey!~spronkey@2406:e000:68a4:fa01:84a2:e108:d6a4:1605] has joined #java [06:02]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [06:36]
Matthijs [Matthijs!~quassel@77-61-103-58.biz.kpn.net] has joined #java [06:49]
fbiagent_ [fbiagent_!~fbiagent@user/fbiagent] has joined #java [07:27]
gggp [gggp!~gggp@li870-78.members.linode.com] has joined #java [08:06]
Gustavo6046 [Gustavo6046!~Gustavo60@user/gustavo6046] has joined #java [08:12]
dreamreal [dreamreal!~dreamreal@about/java/dreamreal] has joined #java [08:16]
ferdna [ferdna!~ferdna@user/ferdna] has joined #java [08:23]
Matthijs [Matthijs!~quassel@77-61-103-58.biz.kpn.net] has joined #java [08:29]
t2blk [t2blk!~t2blk@85.153.230.32] has joined #java [08:37]
[itchyjunk] [[itchyjunk]!~itchyjunk@user/itchyjunk/x-7353470] has joined #java [08:40]
Gustavo6046 [Gustavo6046!~Gustavo60@user/gustavo6046] has joined #java [08:41]
dreamreal [dreamreal!~dreamreal@about/java/dreamreal] has joined #java [08:47]
carlino3 [carlino3!~carlino3@user/carlino3] has joined #java [08:58]
carlino3 hi [08:58]
carlino3 what is the best way to deal with binary arrays in java? i need to change a byte value at an specific offset, and remove n bytes from x to y offset [08:59]
carlino3 is ByteArrayInputStream a good idea? [08:59]
freeone3000 ByteBuffer. [09:07]
Gustavo6046 [Gustavo6046!~Gustavo60@user/gustavo6046] has joined #java [09:09]
johnjay [johnjay!~pi@192.142.100.50] has joined #java [09:28]
Gustavo6046 [Gustavo6046!~Gustavo60@user/gustavo6046] has joined #java [09:30]