--- Log opened Sat Jun 08 00:00:36 2013 |
01:02 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ] |
01:06 | <@McMartin> | Hmm |
01:06 | <@McMartin> | OK, UI question for folks that tend to use UNIXy systems. |
01:06 | <@froztbyte> | yeeees |
01:06 | <@McMartin> | If I'm writing a user-level application tool for managing stuff in a directory, how unreasonable is it to assume that everything in that directory actually lives on one volume? |
01:07 | <@Tamber> | I'd say fairly reasonable. |
01:07 | <@McMartin> | I'd like to have a low-disk-space warning here but that only makes sense if they aren't doing submounts. |
01:07 | <@McMartin> | This is extremely reasonable on Macs (which tend to only have one disk) and Windows (which has mountpoints but strongly discourages their use) |
01:07 | <@Tamber> | Well, as long as it's home directory and so forth. ...that said, the more I think about it, the more edge cases I can think of |
01:08 | <@McMartin> | Yeah, that's why I'm asking |
01:08 | <@McMartin> | This will be some subdirectory of ~ |
01:08 | <@McMartin> | If it were /home itself, or /usr, or /, I wouldn't even be asking because I'd know for sure that all bets were off~ |
01:08 | <@Tamber> | I would assume -- dangerous word, that -- then, that anyone with a setup otherwise should know and be able to act accordingly. |
01:09 | <@McMartin> | Mmm. I'd better have an option to let them act accordingly. |
01:09 | <@McMartin> | But I won't feel bad about making it hard to find~ |
01:16 | < [R]> | McMartin: don't assume read /{proc,etc}/mtab |
01:16 | <&ToxicFrog> | What sort of program is this? |
01:16 | <@McMartin> | an update manager, more or less. |
01:16 | <@McMartin> | I want to block downloads if the disk is filling up. |
01:16 | <&ToxicFrog> | Also, on modern systems it is practically guaranteed that there will be other stuff mounted under ~ because that's where sshfs and smb mounts tend to go |
01:16 | < [R]> | Also, yes there are user-land applications that mount in ~ |
01:16 | <@McMartin> | Yeah, it won't be ~ proper |
01:16 | <@McMartin> | It will be some subset of it |
01:17 | <@McMartin> | Er |
01:17 | <&ToxicFrog> | Whether this is a problem for you depends on what, exactly, you're doing |
01:17 | < [R]> | Most notably is Ubunut's scrap-encrypted-ramfs thing. |
01:17 | <@McMartin> | It will be one specific directory in it |
01:17 | <&ToxicFrog> | Just check how much disk is available in that dir, then |
01:17 | <@McMartin> | Anything that has a special sequestered area ought to be fine |
01:17 | <@McMartin> | Yeah |
01:17 | <@McMartin> | The question here is "should I be recursively scanning subdirs, or am I justified in saying Don't Do That Then (and if you must, then disable the size check) |
01:17 | <@McMartin> | " |
01:18 | < [R]> | You can scan once, cache, then use inotify to let you know of changes? |
01:18 | <@McMartin> | Possibly |
01:18 | <@McMartin> | I'd like to keep it as much of an afterthought as possible, though; the primary non-Windows usecases are all laptops. |
01:19 | <@McMartin> | And anyone who points this program at a network drive officially deserves what they get |
01:19 | <@Tamber> | I'm lazy, so I'd just go for the "Don't Do That, Then" option |
01:19 | < [R]> | Also, as TF mentioned, the free-disk-space function on UNIXen will take an arbitrary directory. |
01:19 | <@McMartin> | Yeah |
01:19 | <@McMartin> | This is also true on Windows, more or less |
01:20 | <@McMartin> | Becuase NTFS has mount points by another name, and the API reflects this even though their use is discouraged |
01:20 | <@McMartin> | So I think that will be good enough for now |
01:20 | <@McMartin> | Thanks |
01:20 | < [R]> | IIRC they're called mount points. |
01:20 | <@McMartin> | I'm thinking of "junction points" |
01:20 | < [R]> | Aren't those symlnks? |
01:20 | <@McMartin> | Hrm. They might be. |
01:20 | <&ToxicFrog> | They aren't. |
01:21 | <&ToxicFrog> | Junction points are more like mount --bind. |
01:21 | <&ToxicFrog> | NTFS also has symlinks and hardlinks, which are different. |
01:21 | <@froztbyte> | yar |
01:21 | <@froztbyte> | and apparently they're quite shit |
01:21 | <@froztbyte> | character limits, limits per folder, etc |
01:21 | <@McMartin> | Which is why their use is discouraged~ |
01:21 | < [R]> | What's the main difference between a symlink directory and mount --bind? |
01:21 | <&ToxicFrog> | [R]: a symlink is a special file on disk redirecting to a different file/directory by name. |
01:21 | < [R]> | (In a chroot()-less system)_ |
01:22 | <@froztbyte> | a symlink is a file pointer |
01:22 | < [R]> | Well yeah |
01:22 | < [R]> | I meant functionally |
01:22 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.] |
01:22 | <@McMartin> | I guess symlinks could be to a directory that is on the same volume? |
01:22 | <&ToxicFrog> | A bind mount is an actual mountpoint |
01:22 | <&ToxicFrog> | Among other things this means you can't have a broken bind mount/junction point the way you can have a broken symlink |
01:23 | < [R]> | Ah |
01:23 | <&ToxicFrog> | Nor can you examine the "mount point" independent of the stuff it points to without unmounting it |
01:24 | <&ToxicFrog> | Also, symlinks can point to individual files, bind mounts can't; I'm not sure about junction points. |
01:24 | <@McMartin> | Pretty sure they cannot |
01:24 | | Typherix is now known as Typh[Offline] |
01:24 | <@McMartin> | The only place I've ever seen people use junction points is to point their save-game directories to a region managed by Dropbox~ |
01:24 | < [R]> | Heh |
01:25 | <&ToxicFrog> | Win7 uses a shitload of them internally, IIRC |
01:25 | <@McMartin> | (Which apparently works great) |
01:25 | <@froztbyte> | ugh, sorry, got distracted |
01:25 | <@McMartin> | Oh, yeah, there's some kind of crazy half-union-fs thing going on there too |
01:25 | <@froztbyte> | so, functionally |
01:25 | <&ToxicFrog> | Along with unionfs-style wackiness to support things that write to PRogram Files |
01:25 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code |
01:25 | <@McMartin> | Oh yeah also that |
01:25 | <@froztbyte> | a bindmount would be used with something like a chroot, for instance |
01:25 | <@McMartin> | I meant the way Documents ends up being layered across like five directories |
01:25 | <&ToxicFrog> | Oh yeah, that too |
01:26 | < [R]> | <[R]> (In a chroot()-less system)_ |
01:26 | | Typh[Offline] is now known as Typherix |
01:26 | <@froztbyte> | oh |
01:26 | <@froztbyte> | well |
01:26 | <@froztbyte> | still some things |
01:26 | <&ToxicFrog> | That's more how it's used, not what it does |
01:26 | <@McMartin> | Yeah |
01:26 | <@froztbyte> | permission scope stuff |
01:26 | <@froztbyte> | like "don't access outside this parent folder" |
01:26 | <@froztbyte> | which is basically like a chroot, just isn't |
01:26 | <@McMartin> | Unrelated: Hey Azash. Once I get Monocle's functionality implemented and can thus start sensibly thinking about making a unified API, want to have a look at it? |
01:26 | <&ToxicFrog> | But yeah, a symlink is a A Thing that points to some other things. A bind mount is an actual mounted filesystem (that just happens to also be mounted elsewhere) and behaves like one, meaning it looks a lot more like it's "actually there" than a symlink does. |
01:27 | <@froztbyte> | the times I've used it were to deal with shitty FTP daemons |
01:27 | <@froztbyte> | also, another fun trick |
01:27 | <@froztbyte> | you can actually mount over another mount |
01:27 | <@McMartin> | "shitty FTP daemons" sounds a lot like the Dropbox case~ |
01:28 | <@froztbyte> | so you could, arguably, mount -o bind ~/code/<version> ~/site/prod |
01:28 | <@froztbyte> | so ~/site/prod is a normal folder on the root mount |
01:28 | <@froztbyte> | or some mount to elsewhere |
01:28 | <@froztbyte> | and then if you go into maintenance, you just unmount the bind |
01:28 | <@McMartin> | That's pretty slick |
01:28 | <@froztbyte> | with that folder then having the "we're in maintenance" pages |
01:29 | <@froztbyte> | no moving stuff around or shuffling webserver configs |
01:29 | <@froztbyte> | McMartin: it's a trick I learned in dealing with crappy ruby :D |
01:29 | <@froztbyte> | in like, '08 |
02:17 | | Typherix is now known as Typh[Offline] |
02:18 | | Typh[Offline] is now known as Typherix |
02:58 | | Vorntastic [Vorn@A2BA3E.078E56.05B9A7.13B992] has joined #code |
04:01 | | VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
04:05 | | Kindamoody[zZz] is now known as Kindamoody |
04:14 | | Wisdom [NSwebIRC@8E7DA3.52262E.A07D0C.2874C6] has joined #code |
04:15 | < Wisdom> | Hia |
04:26 | | Vorntastic [Vorn@A2BA3E.078E56.05B9A7.13B992] has quit [Ping timeout: 121 seconds] |
04:39 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
04:39 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
04:56 | | mac [NSwebIRC@Nightstar-fe8a1f12.il.comcast.net] has joined #code |
04:58 | | Wisdom [NSwebIRC@8E7DA3.52262E.A07D0C.2874C6] has quit [[NS] Quit: Page closed] |
05:18 | < Xon> | <[R]> IIRC they're called mount points. |
05:18 | < Xon> | <McMartin> I'm thinking of "junction points" |
05:18 | < Xon> | they are actually called reparse points. Which are used to implement; mount points, junctions, symlinks, samba DFS roots, dedupe on Server 2012. They are really just arbitary data tagging a path to require a driver to actually resolve the contents |
05:19 | < Xon> | 3rd party stuff uses them to implement offline archiving |
05:20 | <@McMartin> | Oh right |
05:20 | | Turaiel is now known as Turaiel[Offline] |
05:20 | <@McMartin> | I've run into those in Procmon traces |
05:20 | <@McMartin> | The return code pops up as REPARSE |
05:20 | | Turaiel[Offline] is now known as Turaiel |
05:23 | | Typherix is now known as Typh[Offline] |
05:27 | | Turaiel is now known as Turaiel[Offline] |
05:27 | | Turaiel[Offline] is now known as Turaiel |
07:06 | | mac [NSwebIRC@Nightstar-fe8a1f12.il.comcast.net] has left #code [""] |
07:07 | <@Azash> | McMartin: Yeah sure |
07:29 | | Kindamoody is now known as Kindamoody|out |
08:00 | | Turaiel is now known as Turaiel[Offline] |
08:11 | | ^Xires is now known as Xires |
08:18 | | Syka [the@Nightstar-5ed21491.iinet.net.au] has quit [[NS] Quit: leaving] |
08:18 | | Syka [the@A6D346.25B8B8.D90930.7DB72B] has joined #code |
09:06 | | You're now known as TheWatcher |
09:48 | <@McMartin> | Woot, speaking of, now I have stuff that does what it needs to |
09:48 | <@McMartin> | So now I can actually start thinking about this |
10:38 | <@McMartin> | ... that was pretty easy |
10:39 | <@McMartin> | A lesson is learned: Screw objects except as under-the-hood implementation simplifiers |
10:42 | <@McMartin> | Alright, folks, naming question |
10:43 | <@McMartin> | I have a thing I'm currently calling a resource, or, since it's C now, MNCL_RESOURCE |
10:43 | <@McMartin> | (Minimalist Native Console-Like. Honest.~) |
10:44 | <@McMartin> | These represent, essentially, a chunk of bytes from the filesystem or a filesystem-like thing. You get a buffer, and its size. |
10:45 | <@McMartin> | I'd prefer to not call this a "resource"; I'd rather "resource" be used for the more flexible thing two layers of abstraction up, which is configured via JSON files. |
10:45 | <@McMartin> | What's a good short name for a bag-of-bytes data type? |
10:45 | <@McMartin> | "Blob" sounds so... uncouth~ |
10:45 | <@McMartin> | It should be more dapper |
10:48 | < Syka> | McMartin: globule |
10:50 | <@Azash> | McMartin: Dollop |
10:52 | <@McMartin> | The more I stare at this the more I suspect "file" is actually the answer. =( |
10:55 | < [R]> | Raw, data, binary |
10:55 | <@McMartin> | Ooh. |
10:55 | <@McMartin> | Raw is good. |
10:57 | <@McMartin> | Ok |
10:57 | <@McMartin> | I think I can reorganize what I have now into something actually coherent now. |
11:04 | <@McMartin> | ... |
11:04 | <@McMartin> | http://www.romancortes.com/blog/pure-css-coke-can/ |
11:10 | <~Vornicus> | McM: what the drugs, that's awesome |
11:14 | | * McMartin works out how to rip sprites from Scratch projects by examining one in Notepad++ |
11:14 | | * McMartin is feeling pretty l33t, even if it *was* just a renamed ZIP file in the end. |
11:16 | <@Azash> | Nice can |
11:35 | | * TheWatcher eyes this student asking about serialising c structures as binary, goes to introduce him to the wonders of cross-platform madness |
11:48 | <@McMartin> | <3 |
11:48 | <@McMartin> | That said |
11:48 | <@McMartin> | IFF |
11:48 | <@McMartin> | For when you actually have to do it, IFF has been the way to do it since the days of the Amiga |
11:54 | | Kindamoody|out is now known as Kindamoody |
12:07 | <@McMartin> | OK |
12:07 | <@McMartin> | https://hkn.eecs.berkeley.edu/~mcmartin/games/DD/mncl_api.txt |
12:09 | <@McMartin> | Oops, updated |
12:09 | | * McMartin forgot to specify that spritesheets have to be pngs. |
12:10 | < Syka> | return E_FORTHELOVEOFGODWHY if they load in a jpg |
12:10 | <@McMartin> | That will actually secretly work because I'm just wrapping SDL_image, but they're out of spec if they do~ |
12:17 | <@McMartin> | Anyway, I'm interested in feedback on the spec and the API; if there's obvious things missing that aren't listed in higher layers, or if pieces look cumbersome or error-prone in ways not endemic to all C APIs~ |
12:33 | < [R]> | IFF? |
12:35 | <@McMartin> | A self-describing binary file format that is the superset of AIFF and TIFF... |
12:35 | <@McMartin> | ... and a slight variant for endianness (RIFF) was used heavily by Windows formats like .WAV... |
12:35 | <@McMartin> | ... and then the general ideas were a clear inspiration for formats like PNG as well. |
12:35 | <@McMartin> | IIRC Lightwave objects are also IFF-based. |
12:36 | <@McMartin> | http://en.wikipedia.org/wiki/Interchange_File_Format |
12:36 | <@McMartin> | Oops, TIFF isn't an IFF |
12:39 | | himi [fow035@0C0840.B22E58.E3471A.E028A1] has quit [Ping timeout: 121 seconds] |
12:49 | | Kindamoody is now known as Kindamoody|out |
12:50 | < [R]> | Ah, neat |
12:52 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
12:52 | | mode/#code [+o himi] by ChanServ |
13:12 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection] |
14:14 | | VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code |
15:06 | | VirusJTG_ [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
15:09 | | VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [Ping timeout: 121 seconds] |
15:20 | | * TheWatcher readsup |
15:20 | <@TheWatcher> | Yep, both lightwave object and scene files are IFF |
17:39 | | * TheWatcher wtfs at this |
17:40 | <@TheWatcher> | This makefile is going nuts, why is it even reading the LICENSE file... HOW is it even reading, bwuh |
17:47 | | * TheWatcher facepalms, is a dumbass |
17:50 | <@Tamber> | ? |
17:50 | <@TheWatcher> | I'd stuck a newline in, makng this bit into the command to execute rather than a dependency |
17:52 | <@Tamber> | Oops. |
17:52 | < Syka> | wups |
17:53 | <@Alek> | ups |
17:57 | | * Syka drops a battery on Alek |
18:15 | | * iospace charges Syka with assault and battery |
18:15 | <@iospace> | :V |
18:16 | | * Syka charges iospace with a thunderbolt cable |
18:36 | | * froztbyte strings iospace and Syka up with some cat4 |
18:42 | | * Alek threatens Syka with a cat5 o'nine tails |
18:42 | < Syka> | D: |
18:42 | < Syka> | i saw one of those |
18:43 | < Syka> | they made the geek kinkster in me interested, and the rest of me horrified |
18:47 | | Derakon [Derakon@31356A.8FA1FE.CF2CE9.D6CF77] has quit [Ping timeout: 121 seconds] |
18:47 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
18:47 | | mode/#code [+ao Derakon Derakon] by ChanServ |
19:54 | <@Azash> | I can imagine them having a worse pain/damage ratio than leather |
19:55 | < Syka> | depends |
19:56 | < Syka> | it's less about the material and more about the size |
19:56 | < Syka> | multiple thin things create sting, less large ones cause thump (and bruising!) |
20:00 | <@Alek> | not to mention the sharp cutting edges of the plugs. |
20:02 | | Turaiel[Offline] is now known as Turaiel |
20:03 | < Syka> | i don't think this one had the rj-45 on the end |
20:03 | < Syka> | nope they did |
20:31 | | Kindamoody|out is now known as Kindamoody |
20:33 | | Turaiel is now known as Turaiel[Offline] |
21:08 | | Kindamoody is now known as Kindamoody[zZz] |
21:40 | <@Azash> | Yeah the plugs are what I was somewhat confused about, seems like they could cut a bit |
22:00 | | Typh[Offline] is now known as Typherix |
23:25 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:25 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:37 | | Typherix is now known as Typh[Offline] |
23:56 | | Turaiel[Offline] is now known as Turaiel |
--- Log closed Sun Jun 09 00:00:50 2013 |