code logs -> 2023 -> Thu, 13 Apr 2023< code.20230412.log - code.20230414.log >
--- Log opened Thu Apr 13 00:00:37 2023
00:11 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
02:46 Degi [Degi@Nightstar-ajam9l.pool.telefonica.de] has quit [Ping timeout: 121 seconds]
02:50 Degi [Degi@Nightstar-th4f2n.pool.telefonica.de] has joined #code
05:23 Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has joined #code
05:23 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
08:00 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
08:02 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
10:41 Kizor [a@Nightstar-nfsqa7.yok.fi] has quit [Ping timeout: 121 seconds]
10:41 Kizor [a@Nightstar-nfsqa7.yok.fi] has joined #code
13:07 Vorntastic [uid293981@Nightstar-phvupn.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
13:16 * abudhabi_ sighs. More RestSharp migration crud.
13:16
< abudhabi_>
They've changed how their deserializer works.
13:17
< abudhabi_>
Previously, if you tried to feed a null from JSON into a non-nullable type, it would default to the, well, default value of the non-nullable type.
13:17
< abudhabi_>
Now the response fails at the client end.
13:18
< abudhabi_>
Which is wonderful to debug when the api logs show only 200s.
13:52 abudhabi__ [abudhabi@Nightstar-6rvqm1.adsl.tpnet.pl] has joined #code
13:55 abudhabi_ [abudhabi@Nightstar-6gj283.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
15:01 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:01 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:27 * ToxicFrog kicks Java in the shins
15:28
<&ToxicFrog>
So, java has the Path class, which represents a filesystem path that doesn't necessarily correspond to anything that actually exists. It supports a bunch of common path manipulation functions like converting between relative and absolute paths, relative path resolution, .. elision, and so forth.
15:28
<&ToxicFrog>
It also has the File class, which represents [checks notes] a filesystem path that doesn't necessarily correspond to anything that actually exists (and, if it does, isn't neccessarily a file). This also supports a bunch of common path manipulations, partially overlapping with what Path supports, and it supports some operations that read or write the filesystem, like isDirectory()
15:28
<&ToxicFrog>
or delete(). So for a lot of operations you will need to be flipping your object back and forth between being a path that is a Path and being a path that is a File.
15:28
<&ToxicFrog>
Conveniently, File has a convenience function for that -- toPath(), which returns the equivalent Path object.
15:28
<&ToxicFrog>
And, just for fun, it also has getPath(), which returns the string representation of the equivalent Path object.
15:29
<&ToxicFrog>
(there's also the Files library, which supports a similar set of operations to File but is all static functions operating on Paths, and the Paths library, which is where the constructors for Path objects live.)
15:32 Kimo|autojoin is now known as Kindamoody
16:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
17:57
<&McMartin>
Huh, I don't remember Path at all. *looks it up*
17:57
<&McMartin>
...oh, that's why I don't.
17:58
<&McMartin>
Path and Files are part of the java.nio library introduced in Java 7.
18:01
<&McMartin>
Which is a completely separate I/O system that I've never actually had to use, but appears on first glance to offer a buffer-focused API that makes operations like mmap and async I/O more expressible.
18:01
<&McMartin>
java.io's system, including File and friends, revolves entirely around InputStream/OutputStream
20:10 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:10 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:23 Alek [Alek@Nightstar-06ca3p.il.comcast.net] has quit [[NS] Quit: ]
23:56 Kindamoody [Kindamoody@Nightstar-pqh9gl.tbcn.telia.com] has quit [Ping timeout: 121 seconds]
--- Log closed Fri Apr 14 00:00:38 2023
code logs -> 2023 -> Thu, 13 Apr 2023< code.20230412.log - code.20230414.log >

[ Latest log file ]