--- Log opened Tue Nov 25 00:00:09 2014 |
00:00 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
00:00 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
00:28 | | Derakon[AFK] is now known as Derakon |
00:43 | <&ToxicFrog> | wtfwtfwtf |
00:43 | <&ToxicFrog> | linux: stat("/etc") and stat("/etc/") are eqv |
00:44 | <&ToxicFrog> | windows: stat("/etc") works, stat("/etc/") fails even if /etc is a directory |
00:46 | <&McMartin> | What is "stat" translating to? |
00:48 | <&McMartin> | GetFileAttributes just says "filename" |
00:48 | <&ToxicFrog> | Whatever lfs.attributes() calls, hang on |
00:50 | <&ToxicFrog> | _stati64, looks like |
00:51 | <&ToxicFrog> | The MSDN page mentions nothing about this, but there's probably some note buried in the ass end of MSDN about how paths with trailing slashes are invalid or something |
00:52 | <&McMartin> | I know that boost::filesystem plays silly buggers with it, but IIRC it also claims it doesn't have to on Windows vs POSIX, only stuff like VMS. |
00:52 | <&McMartin> | Where /etc/foo is [etc]foo and /etc/foo/ is [etc.foo] |
01:09 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
01:32 | <&ToxicFrog> | Also, the trailing slash is required for root directories |
01:32 | <&ToxicFrog> | And verboten for everything else |
01:41 | <~Vornicus> | wat |
01:45 | <&McMartin> | _stati64. |
01:51 | <~Vornicus> | just, wat |
01:52 | <&McMartin> | OK, messing with CreateFile and handing it a directory of any kind fails, but it fails in different ways |
01:52 | <&McMartin> | Either with ERROR_ACCESS_DENIED without the trailing backslash, or ERROR_PATH_NOT_FOUND with it. |
01:54 | <&McMartin> | However, GetFileAttributes works fine on both. |
01:55 | <&McMartin> | (And returns 0x10, which is FILE_ATTRIBUTE_DIRECTORY) |
01:55 | <&McMartin> | So I don't know what the heck is up with _stati64. |
01:56 | <&McMartin> | The windows "man 2" equivalents of stat behave consistently, and of open behave semi-consistently. |
02:09 | <@Reiv> | Java and/or Jython: Do these have CASE statements? |
02:09 | <@Reiv> | Or are you at the glories of nested ifs |
02:14 | <&Derakon> | Python does not have switch/case. |
02:14 | <&Derakon> | Java does. |
02:14 | <~Vornicus> | Python's version of switch/case is basically a dictionary with functions |
02:26 | <&Derakon> | Y'know, I've used that construct before, but I never made the connection with switch/case. |
03:27 | | Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code |
03:29 | < Harlow> | ToxicFrog do you work for jagex or is that someone else? |
03:29 | <~Vornicus> | That's mol. |
03:30 | < Harlow> | ah |
03:31 | <&ToxicFrog> | For added wtfery, if "M:\/path/to/something.avi" gets passed to VLC, it works fine |
03:31 | <&ToxicFrog> | If "M://path/to/something.avi" instead, it exit(0)s without doing anything at all. |
03:31 | <&ToxicFrog> | I'm not sure whether to blame VLC or windows for this one. |
03:32 | <&ToxicFrog> | McMartin: yeah, I would expect _stat* to be thin wrappers around GetFileAttributes() |
03:32 | <&ToxicFrog> | But no, you can't have trailing slashes even if the target is a directory. |
03:47 | <&McMartin> | Ugh |
03:47 | <&McMartin> | Yeah, OpenSSL has some hilarity like that |
03:48 | <&McMartin> | It turns out that if you call OpenSSL_Config(NULL) it defaults to trying to load a config file out of *the directory name where it was compiled on whatever that computer happens to be* |
03:48 | <&McMartin> | It ignores "file not found" but if it gets any other error it just calls exit(1) with no logging or errors |
03:48 | <&McMartin> | That's fun because if they happened to have built the copy of OpenSSL on a drive that you, say, have a DVD-ROM drive on... |
03:48 | <&McMartin> | "Drive not ready" is not "File not found" and thus is not ignored. |
03:50 | <&ToxicFrog> | :openssl: |
03:50 | <&ToxicFrog> | Anyways, the hack I've come up with for this is: |
03:50 | <&ToxicFrog> | - normalize all pathseps to / |
03:51 | <&ToxicFrog> | - if the argument to lfs.exists() ends with /, append a . |
03:51 | <&ToxicFrog> | - weep quietly |
03:51 | <&ToxicFrog> | Next I get to figure out why (a) it segfaults with my new and improved logging library and (b) every controller input now brings up the main menu |
03:52 | <&ToxicFrog> | But that will have to wait until tomorrow when symbol isn't watching things on Durandal, because I can't repro either on linux or wine, only on for-real windows. |
03:57 | | Xires is now known as ^Xires |
04:41 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
05:02 | | Derakon is now known as Derakon[AFK] |
05:08 | | thalass [thalass@Nightstar-bakqqn.bigpond.net.au] has quit [[NS] Quit: augh werk] |
05:24 | | Lamabo [thelambo@Nightstar-ic6koa.fl.comcast.net] has quit [Ping timeout: 121 seconds] |
05:30 | | Lamabo [thelambo@Nightstar-ic6koa.fl.comcast.net] has joined #code |
06:10 | | Kindamoody[zZz] is now known as Kindamoody |
07:21 | | celticminstrel [celticminst@Nightstar-l2rg83.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:49 | | Kindamoody is now known as Kindamoody|afk |
07:54 | | Orth [orthianz@Nightstar-r89.tbp.224.119.IP] has quit [Ping timeout: 121 seconds] |
07:59 | | Orthia [orthianz@Nightstar-3d6.duk.160.203.IP] has joined #code |
07:59 | | mode/#code [+o Orthia] by ChanServ |
08:24 | < Harlow> | can anyone think of an under appreciated mathematician? |
08:37 | | Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [[NS] Quit: BED] |
09:52 | <@Azash> | I think the issue with underappreciated mathematicians is that nobody knows them |
09:54 | <@Julius> | That's what I thought, too. |
10:21 | <@Tarinaky> | Who discovered the trancindental numbers? |
10:22 | <@Tarinaky> | They're probably under-appreciated |
11:35 | <@Tarinaky> | Initial commit: https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23ca2e25604af290 |
11:36 | <@Tarinaky> | Specifically the initial commit :P |
11:56 | | Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code |
11:56 | | mode/#code [+o Checkmate] by ChanServ |
12:37 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
12:49 | <@Julius> | Hrm. |
12:49 | | * Julius implements new thing. |
12:50 | <@Julius> | It works! But crashes after having worked. |
12:50 | <@TheWatcher> | Well, it's a start |
12:53 | <@Julius> | And dumps a 22.5k-word long error message of stack traces. |
12:55 | <@Tarinaky> | Well, that's fun. Apparently one of my girlfriend's managers just threw a violent tantrum infront of all the other managers and now my girlfriend is worried that job is over. |
12:56 | <@Tarinaky> | I'm not 100% sure what the story is because I only hear one version of events and that version involves the manager being a colossal dickfuck (starting with him evicting my girlfriend essentially for dating me) |
12:56 | <@Tarinaky> | And it all sounds very ridiculous... but then these people do exist :/ |
12:57 | <@Tarinaky> | But he who loses his shit and throws coffee cups at the wall first, loses the argument I think. |
13:00 | <@Julius> | What was the argument about? |
13:01 | <@Tarinaky> | This time? Not sure. |
13:01 | <@Tarinaky> | He's been setting her up for failure the past couple of weeks: putting her on tickets she isn't really qualified for, probably to try to build a case to get everyone to agree to dismiss her. |
13:02 | <@Tarinaky> | Because he doesn't like the fact she's dating another woman. |
13:03 | <@Tarinaky> | And he has /very/ sexist views of women and has very little respect for them/expects them to take his denigatory attitude submissively. |
13:04 | <@Tarinaky> | So I think he called a meeting for some kind of ritualistic dressing down infront of the other managers |
13:04 | <@Tarinaky> | And my girlfriend says she 'built a wall' which I have no idea what she means. |
13:04 | <@Tarinaky> | And he lost his temper and started destroying everything. |
13:07 | <@Tarinaky> | Either way, it sounds like her situation there is pretty much untenable as it is |
13:11 | <@Julius> | Denigrating and derogatory are different words, BTW. |
13:14 | <@Tarinaky> | Does denigrating not mean what I think it means? |
13:15 | <@Julius> | It does, and it would have worked here. Except 'denigatory' looks like a portmanteu. I've checked it on the Wiktionary, turning up nothing. |
13:16 | <@Tarinaky> | I meant denigratory. |
13:16 | <@Tarinaky> | I am bad at spelling words I don't use often. |
13:16 | <@Tarinaky> | Unsurprisingly |
13:23 | <@Tarinaky> | I should /probably/ come over tonight since she still lives with the dickweed and if he can spaz out like that, at work, in front of folk... |
13:24 | <@Tarinaky> | He's going to be capable of doing something /really/ silly when he gets home :/ |
13:25 | <@TheWatcher> | ... yeah |
13:25 | <@TheWatcher> | That's more "mover her out" territory |
13:25 | <@TheWatcher> | -r |
13:26 | <@Tarinaky> | Yeah. |
13:27 | <@Tarinaky> | Although I don't think I have space in my car for everything |
13:27 | <@Tarinaky> | And we still don't know where to unpack her computer at my place D: |
13:29 | <@Tarinaky> | She's not answering her phone... which could mean anything >.> |
13:39 | <@Azash> | Arrrrgh |
13:39 | <@Azash> | "Let's store user data, in k/v format, as an encoded string in the database" |
13:40 | <@Azash> | "Let's make the column VARCHAR(255)" |
13:40 | <@Azash> | "Let's give this user lots of permission data" |
13:40 | <@TheWatcher> | Wheee |
13:40 | <@Azash> | "That's strange, their permissions are broken" |
13:40 | <@TheWatcher> | I wonder what could possibly have happened there~ |
13:43 | <@Julius> | How do I delete rows using QueryRunner? Simply run a query? |
13:43 | <@Julius> | (Java, MySQL.) |
13:46 | <@Julius> | I'll try an update. |
13:48 | <@Tarinaky> | TheWatcher: I genuinely have no idea how people like this are allowed to manage their own dick, never mind employees. |
13:51 | <@TheWatcher> | Peter Principle. |
13:51 | <@froztbyte> | Tarinaky: in the interest of fairness, I'd argue genitalia barely fit into the context of the discussion |
13:51 | <@froztbyte> | shitty people are shitty. |
13:52 | <@froztbyte> | that kind of bullshit needs a bus, though |
13:52 | <@froztbyte> | like, meeting with one |
13:53 | <@froztbyte> | (nonetheless, I do understand where you're coming from) |
13:53 | <@froztbyte> | (just to make that clear) |
13:55 | <@Julius> | What was that thing with PHP function hashing based on length of the function name? |
13:56 | <@froztbyte> | Julius: "gigantic retarded idiocy"? |
13:56 | <@Tarinaky> | froztbyte: For some reason expressing the same sentiment of "allowed to manage their own breasts" makes me think of all the women out there who genuinely aren't allowed control over their own bodies. |
13:56 | <@froztbyte> | that might be on phpsadness |
13:56 | <@froztbyte> | Julius: http://programmingisterrible.com/post/70268351606/back-when-php-had-less-than-10 0-functions-the |
13:57 | <@froztbyte> | Tarinaky: yeah, I know. like, seriously, I'm *extremely* well aware of the issues. |
13:57 | <@Tarinaky> | TheWatcher: Peter Principle implies there's a task to which they are suited. |
13:57 | <@froztbyte> | Tarinaky: it is a disturbingly shitty situation and humanity fucking fails at life in that respect, imo |
13:58 | <@froztbyte> | Tarinaky: but afaict the behaviour you describe sounds about 80% "petulant child with someone standing up to him" |
13:58 | <@froztbyte> | (and I say that because I've dealt with the same shit before :/) |
13:58 | <@froztbyte> | an ex colleague of mine would revert people's code at 3am while drunk as fuck |
13:59 | <@froztbyte> | and spew profanities into the company chats |
14:01 | <@Tarinaky> | He kept trying to intimidate my GF which just doesn't work because she's dealt with shittier characters than him. |
14:02 | <@froztbyte> | yup, know that feel |
14:02 | <@froztbyte> | sounds like at least she stood her ground there |
14:02 | <@froztbyte> | (which just made it worse, because petulant children are used to people bowing to their will) |
14:03 | <@Tarinaky> | She's dealt with some shady as fuck characters. |
14:03 | <@Tarinaky> | And won. |
14:03 | <@TheWatcher> | froztbyte: People like that make me wish for the ability to set people on fire with the power of my mind. |
14:04 | <@Tarinaky> | So someone who's been parachuted into a company because of nepotism isn't going to intimidate her. |
14:05 | <@froztbyte> | Tarinaky: yup, that's a good thing :) |
14:05 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code |
14:05 | | mode/#code [+o himi] by ChanServ |
14:05 | <@froztbyte> | Tarinaky: well, good luck :/ it's gonna be a draining couple of days. |
14:06 | <@froztbyte> | TheWatcher: indeed |
14:08 | <@Tarinaky> | Well now I'm just worried cuz she's not answering her phone still. |
14:10 | <@froztbyte> | yeah on that point I can't say much, that'd depend on her as a person |
14:11 | <@froztbyte> | (whether she turtles, etc) |
14:11 | <@Tarinaky> | Turtles? |
14:12 | <@froztbyte> | "hides out" |
14:18 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has joined #code |
14:19 | < Vorntastic> | I find myself in need of batch image processing. |
14:19 | <@Julius> | imagemagick? |
14:19 | <@Julius> | What do you need to do with them? |
14:20 | < Vorntastic> | Imagemagick I know is the weapon of choice but man this this is huge and I'm in a little bit of a hurry. |
14:20 | < Vorntastic> | Okay, I have a bunch of images, filenames raw/blah.jpg |
14:20 | <@froztbyte> | Vorntastic: what do you need to do? |
14:21 | < Vorntastic> | I have two different things that must happen: I need a "medium" size, which is shrunk, preserving aspect ratio, to fit into a square 500px wide |
14:22 | < Vorntastic> | And I need a "thumbnail" size, which is shrunk and then cropped to fit into a square 150px wide. |
14:22 | <@Julius> | I think I had a graphical tool for that, once. Can't remember its name. |
14:22 | <@Julius> | I used it to resize LP images. |
14:23 | < Vorntastic> | So if I have a 4000x3000 image, the medium image will be 500x375, and the thumnail will shrink to 200x150 and then cropped to 150x150 |
14:23 | <@TheWatcher> | The medium size: `convert $infile -resize 500x500\> $outfile` |
14:24 | < Vorntastic> | Further: if the image is small, it should not be resized: a 400x125 image should come out medium as 400x125, and thumb as 150x125 |
14:24 | <@Julius> | Vorntastic: http://www.maximumpc.com/irfanview_batch_resize_images_2014 ? |
14:25 | <@gnolam> | Vorntastic: that's what the > does. |
14:25 | <@gnolam> | Vorntastic: "only shrink larger" |
14:25 | <@TheWatcher> | vAnd for the thumb, try |
14:25 | < Vorntastic> | gnolam: aha, thank you |
14:26 | <@TheWatcher> | convert $infile -resize 150x150^ -gravity Center -crop 150x150+0+0 +repage $outfile |
14:26 | < Vorntastic> | Oh, delicious. |
14:27 | <@TheWatcher> | (<3 imagemagic) |
14:27 | <@TheWatcher> | +k |
14:27 | < Vorntastic> | Yeah, that's serious tols there. It's a shame I haven't had need for it before. Thank you, I shall try it out. |
14:29 | <@Tarinaky> | froztbyte: Knowing her she's probably having a nap :/ |
14:43 | < Vorntastic> | ...before I do something silly: ...wait never mind that's what the backslash is there for... |
15:13 | < Vorntastic> | Hooooly shit that was cool. |
15:15 | <@TheWatcher> | Worked? :) |
15:16 | < Vorntastic> | Like a charm. one question, what's repage do? The docs are... vague. |
15:18 | <&ToxicFrog> | Vorntastic: images can have "canvas" information independent of the actual pixel positions |
15:19 | <@TheWatcher> | It discards canvas data that is outside the cropped image, makes sure that can't end up in the saved image |
15:19 | <&ToxicFrog> | E.g. if you have a 100x100 image and crop it down to just 20x20 in the center, you may end up with a 100x100 canvas with 20x20px of image data in the middle. |
15:19 | <&ToxicFrog> | +repage dumps that canvas information and reconstructs it to exactly match the pixel data. |
15:19 | < Vorntastic> | Aha, thank you. |
15:23 | <@Tarinaky> | Am I overreacting or underreacting that she hasn't contacted me in ~3 hours now? |
15:23 | < Vorntastic> | Jesus crap dude |
15:23 | < Vorntastic> | Calm your tits |
15:24 | <@Tarinaky> | I'm worried something happened to her :/ |
15:36 | | Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has quit [[NS] Quit: Bye] |
15:38 | <@Julius> | Vorn's suggestion is most apt. |
15:54 | | Reiver [quassel@Nightstar-ksqup0.co.uk] has quit [Connection closed] |
15:56 | | Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code |
15:56 | | mode/#code [+ao Reiver Reiver] by ChanServ |
16:43 | | celticminstrel [celticminst@Nightstar-l2rg83.dsl.bell.ca] has joined #code |
16:43 | | mode/#code [+o celticminstrel] by ChanServ |
17:05 | | * Alek offers Taki a hug. |
18:23 | <@Azash> | http://www.supermatt.net/wp-content/uploads/2013/03/adventure_time_hacking.gif |
18:38 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has quit [[NS] Quit: ] |
18:41 | | * Julius offers Taki a bug. |
18:41 | <@Julius> | http://bugguide.net/images/raw/QL8ZIL8ZRLEZ4HOHRL5ZQLGZMHAH4HHRGHTHNHLR4LZRPHWZG LNZ8L9ZIL9Z7L3HNH9Z9HVZUHAZ.jpg |
18:52 | | Alek [omegaboot@Nightstar-c8t.a00.36.73.IP] has joined #code |
18:52 | | mode/#code [+o Alek] by ChanServ |
20:03 | | Kindamoody|afk is now known as Kindamoody |
20:06 | | Kindamoody [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has quit [Connection reset by peer] |
20:07 | | Kindamoody|autojoin [Kindamoody@Nightstar-180u8i.tbcn.telia.com] has joined #code |
20:07 | | mode/#code [+o Kindamoody|autojoin] by ChanServ |
20:08 | | Kindamoody|autojoin is now known as Kindamoody |
20:27 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
20:29 | | VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code |
20:41 | | * iospace gets an eye twitch |
20:42 | <@iospace> | HOW THE FUCK DO YOU DO "foo = 256" ON ONE LINE AND THEN "bar= 0x200" ON THE NEXT |
20:42 | <@iospace> | D< |
20:45 | <@Azash> | baz = 02000 |
20:46 | <@Julius> | iospace: DEVIL MAGIC. |
20:46 | | Kindamoody is now known as Kindamoody[zZz] |
20:46 | <@froztbyte> | iospace: what, no endian switches? |
20:46 | <@froztbyte> | iospace: whoever wrote that was obviously lazy |
20:47 | <@iospace> | froztbyte: there's no comments as to what the bitflags are, so yes |
20:48 | <@iospace> | they are fucking lazy |
20:48 | <@froztbyte> | hahahaha |
22:04 | | himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Connection closed] |
22:34 | <@Tarinaky> | iospace: Or they're just reciting incantations cargocult style |
23:00 | <@iospace> | :P |
23:01 | | gnolam_ [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has joined #code |
23:04 | | gnolam [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds] |
23:42 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
23:42 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
23:51 | <@Tarinaky> | #define MAGIC_NUMBER_1 256 |
23:51 | <@Tarinaky> | #define MAGIC_NUMBER_2 0x200 |
23:52 | <@Tarinaky> | more_magic( MAGIC_NUMBER_1, MAGIC_NUMBER_2 ); |
23:52 | <@Tarinaky> | Where: int more_magic( int a, int b) { return a/b; } |
23:53 | | * Tarinaky hides before people start throwing things at her. |
23:58 | <&McMartin> | Man |
23:58 | | * McMartin flips through his notes on how Solaris did some of its tricks |
23:58 | <&McMartin> | I love how "you have to do this thing within a 10-cycle window" counts as "very loose timing" in my notes |
--- Log closed Wed Nov 26 00:00:25 2014 |