code logs -> 2014 -> Tue, 11 Nov 2014< code.20141110.log - code.20141112.log >
--- Log opened Tue Nov 11 00:00:25 2014
00:07 gnolam [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
00:07 gnolam_ [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has joined #code
00:15 gnolam_ is now known as gnolam
00:15 mode/#code [+o gnolam] by ChanServ
00:49 Derakon [chriswei@Nightstar-5fqf0m.ca.comcast.net] has joined #code
00:49 mode/#code [+ao Derakon Derakon] by ChanServ
01:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
01:00 mode/#code [+qo Vornicus Vornicus] by ChanServ
02:33
<&McMartin>
OK.
02:33
<&McMartin>
I'm running GNOME 3, and I'm trying to get it to notice that I have plugged an SD card into the machine's SD card reader.
02:33
<&McMartin>
GNOME no longer automounts it, presumably because Convenience.
02:33
<&McMartin>
/dev is pretty large. Where should I be looking?
02:39
<&McMartin>
Google implies I might need to install new kernel modules. OK.
02:46
<&McMartin>
Nope
03:06 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
03:06 * McMartin blinks
03:06
<&McMartin>
really
03:06
<&McMartin>
-_-
03:06
<&McMartin>
Apparently this SD card is *too modern* for my card reader, since it is >2GB. -_-
03:07 * Derakon hands McM some clippers so he can cut the offending extra memory off.
03:07
<&Derakon>
Finding a <=2GB SD card might actually be somewhat tricky.
03:12
<&McMartin>
I have one plugged into the Wii, but I kind of don't want to sacrifice it.
03:12
<&Derakon>
Can't transfer the data on it onto the new card?
03:12
<&McMartin>
Can't mount the new card, which is what's sparking this whole thing, remember~
03:13
<&Derakon>
Oh wait, I thought it was too modern for the 2600 conversion cart, not for your computer reader. My bad.
03:13
<&Derakon>
I guess if you knew someone with a reader that could read the new card, though, you could do the transfer with their help.
03:13
<&McMartin>
Yeah, no, this is the one that came *with* the cart, plugged into, preloaded with the BIOS, etc.
03:13
<&Derakon>
Save you from junking the card or buying a new reader.
03:13
<&Derakon>
...oh.
03:14
<~Vornicus>
...
03:14
<&Derakon>
Maybe you should get a new reader~
03:14
<&McMartin>
I would like to put *additional* programs on it.
03:14
<~Vornicus>
the reader is a little, uh
03:14
<&McMartin>
I am now considering this thing, yes
03:14
<~Vornicus>
bespoke
03:14
<&McMartin>
Vornicus: No, this is an Alcor 8-in-1 media card reader that has been attached to Iodine for like ten years.
03:14
<~Vornicus>
oh
03:15
<&McMartin>
And apparently is incapable of dealing with high-capacity cartridges
03:15
<&McMartin>
Or at least, is incapable of doing so when plugged into a Linux machine.
03:16
<~Vornicus>
yeah, okay, those card readers run like tenbux
03:16
<~Vornicus>
...fivebux, to get the model Vash & I have http://www.frys.com/product/7037271?site=sr:SEARCH:MAIN_RSLT_PG
03:17
<&McMartin>
Oh, I bet this is SDHC =P
03:17
<&McMartin>
OK then
03:17
<&McMartin>
I guess I'm going to Fry's tomorrow
03:17
<~Vornicus>
It's on the shelf in Palo Alto~
03:17
<&McMartin>
That's where I'd go~
03:18
<&McMartin>
... plugging in the Wii SD card to the old reader results in getting picturs of Chao plushies
03:18
<&McMartin>
OK
03:18
<&Derakon>
This is acceptable.
03:21 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:35 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:12 Derakon [chriswei@Nightstar-5fqf0m.ca.comcast.net] has quit [[NS] Quit: Leaving]
05:17 Kindamoody[zZz] is now known as Kindamoody
06:29 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has joined #code
07:27 Kindamoody is now known as Kindamoody|afk
07:42 Orthia [orthianz@Nightstar-hfd.d04.98.101.IP] has quit [Ping timeout: 121 seconds]
07:45 Harlow [harlow@Nightstar-pq0497.il.comcast.net] has quit [[NS] Quit: BED]
07:46 Orthia [orthianz@Nightstar-6dj.h4k.224.119.IP] has joined #code
07:46 mode/#code [+o Orthia] by ChanServ
08:15 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!]
08:52 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [Ping timeout: 121 seconds]
09:16 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
09:37 macdjord is now known as macdjord|slep
10:14 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
10:14 mode/#code [+o Checkmate] by ChanServ
11:00 VirusJTG [VirusJTG@Nightstar-6i5vf7.sta.comporium.net] has joined #code
14:01
<@Tarinaky>
Argh, I need a base10->base16 calculator
14:01
<@Tarinaky>
That supports signed ints
14:02 * Tarinaky swears profusely
14:05
<@TheWatcher>
Write a 6-liner in C?
14:05
<@froztbyte>
TheWatcher: ...............................................
14:05
<@TheWatcher>
What? :)
14:06
<@Tarinaky>
What I actually need, is to convert this HRESULT error code into something intelligible.
14:06
<@TheWatcher>
Oh
14:06
<@TheWatcher>
What you actually need is the Necronmicon, then.
14:06
<@Tarinaky>
*NecronomiCOM
14:06
<@Tarinaky>
*NecronomiCOM.NET
14:06
<@TheWatcher>
that, there
14:12
<@Tarinaky>
Literally WTF: http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351%28v=vs.85%29.as px
14:13
<@Tarinaky>
Who the fuck designed this abomination of an API. WHY?
14:13
<@Tarinaky>
WHY does everything have at least 7 fucking arguments.
14:13
<@Tarinaky>
Who even,.
14:13
<@Tarinaky>
ffs
14:15
<@abudhabi>
Tarinaky: mIRC has one built-in.
14:16
<@abudhabi>
Also, I believe the Windows calculator also has this functionality.
14:16
<@TheWatcher>
Tarinaky: well, y'know, strerror() is just too complicated.
14:16
<@iospace>
The days of Apple's "We don't get viruses!" claims are over
14:17 * iospace may or may not have a grin on her face because of that~
14:17
<@abudhabi>
Tarinaky: http://www.binaryhexconverter.com/decimal-to-hex-converter ?
14:20
<@Tarinaky>
It doesn't matter, I was solving the wrong problem
14:20 * TheWatcher arghs, hairpulls at this part of CODICIL WINTER HILL
14:22
<@Tarinaky>
What does this even mean
14:22
<@Tarinaky>
Am I reading English
14:22
<@Tarinaky>
"The message identifier for the requested message."
14:23
<@abudhabi>
Probably the messageId field for the row.
14:25
<@Tarinaky>
So I thought I sucked harder at C/C++ than I remembered. Turns out this API is just horrifying.
14:26
<@TheWatcher>
Yep
14:26
<@TheWatcher>
the Windows API is notoriously ghastly
14:27
<@Tarinaky>
And... nothing happened
14:27
<@Tarinaky>
Oh, wait. Forgot to recompile
14:31
<@Tarinaky>
And, of course, the method to obtain the error message segfaults.
14:33
<@Tarinaky>
"The location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter."
14:37
<&McMartin>
Also they use separate memory allocation functions
14:38
<&McMartin>
There are spells to cast to make this go away; you write them once in the distant past and then never look back =P
14:38
<&McMartin>
Also if this is an HRESULT this might not be the function you want?
14:38
<&McMartin>
(Also strerror and errno are terrible too you've just had those nerves deadened)
14:38
<&McMartin>
(YAY GLOBALS EVERYTHING SECRETLY WRITES)
14:39
<&McMartin>
(Problems with this are the fault of MULTITHREADING EXISTING, not with us)
14:39
< RchrdB>
strerror could be fine, under the assumption that its result is just a pointer into a big lazily-mmap'd block of strings.
14:40
<&McMartin>
Right, and you can also have errno be a macro that does OS-specific thread-local storage
14:40
< RchrdB>
oh hang on a second
14:40
< RchrdB>
I absolutely refuse to defend the heinous piece of shit that is errno.
14:40
<@TheWatcher>
Likewise
14:40
< RchrdB>
Thread-local storage mitigates the globalness but fuck me it's unclean.
14:41
<@TheWatcher>
but errno on its own - give it an error code, get back a pointer to a human readable string you can just use, without having to do Bizarre Shit? *shrug*
14:41
<@Tarinaky>
What the heck do I want for converting HRESULTs?
14:41
<@TheWatcher>
*but strerror
14:41
< RchrdB>
errno is a good example of libc just making shit worse for no reason; actual *syscalls* return error values directly in a register.
14:42
<&McMartin>
http://stackoverflow.com/questions/7008047/is-there-a-way-to-get-the-string-repr esentation-of-hresult-value-using-win-api
14:43
< RchrdB>
one of the lovely things libapr does is wrapping around all the idiot calling conventions (e.g. fork() is defined to return a pid_t that is SOMETIMES -1) that (POSIX requires that) libc wraps around perfectly nice syscalls that could have just been returning errno_t values directly, and unfucks them so that they return apr_status_t values and everything else through "out" parameters.
14:43
<&McMartin>
(google string: "hresult error message")
14:43
<@Tarinaky>
I'm not sure I have _com_error
14:44
<&McMartin>
It's in comdef.h? It listed as having been around since at least '05
14:44
<&McMartin>
COM is, in fact, though, totally full of spiders
14:45
<@Tarinaky>
No kidding.
14:45
<&McMartin>
"RPCs? Let's transparently inject DLLs into your process to service them."
14:45
<&McMartin>
"Maybe."
14:45
<&McMartin>
"It'll make marshalling stuff way easier!"
14:45
<@Tarinaky>
At least at the end of the sprint I can always palm this nonsense onto someone else.
14:45
<&McMartin>
"But probably only if the RPC format is basically a formal spec of the C++ ABI"
14:45
<&McMartin>
"So let's do that!"
14:46
<&McMartin>
COM is an awesome thing for *somebody else* to have written because you get spooky libraries that can be summoned up out of nowhere in like two lines of C# or windows scripts
14:46
<&McMartin>
But it's a terrible thing for *you* to *write*. =P
14:49
<@Tarinaky>
And this doesn't play nice with the requirement to use gotos because of code style.
14:49
<@Tarinaky>
Of course.
14:51
<@Tarinaky>
Braces everywhere.
14:52
<@Tarinaky>
McMartin: This still isn't working... '008E1088' is not human readable
14:53
<@abudhabi>
Oobelobb!
14:53
<@TheWatcher>
Eater of Pointers!
14:55
<@iospace>
OM NOM NOM
14:55
<@iospace>
but you still have to free() Oobelobb
14:56
<&ToxicFrog>
This reminds me to catch up on the Windows Internals threads in SA.
14:56
<&ToxicFrog>
It is beautiful in its horror.
14:56
<@iospace>
Windows internals?
14:57
<&ToxicFrog>
iospace: hackbunny -- who was for ten years a ReactOS developer and has done a shitload of windows API programming and reverse engineering -- answering people's questions about "why is [windows API, service, and/or design element X] haunted by the unquiet dead"
14:58
<@TheWatcher>
iospace: free() Oobelobb, and release it from its 10 million cycle slumber beneath the static data?
14:58
<@TheWatcher>
Why would you do suck a thing?!
14:58
<@iospace>
TheWatcher: Because
14:58
<@iospace>
reasons :)
14:59 * iospace gives TheWatcher an infinite loop inside an infinite loop inside an infinite loop
15:00 * TheWatcher is even more loopy than normal now
15:01
<&ToxicFrog>
Also includes the immortal exchange "ok seriously is there anything interesting to say about the registry" "it's made of bees"
15:01
<@iospace>
hahahah
15:01
<@iospace>
BEEEEEEEEEEEEEEES
15:02
<@TheWatcher>
TF: Link?
15:03
<@Tarinaky>
I'm pretty sure this thing is writing the memory address of the string instead of writing the string.
15:03
<@Tarinaky>
Which I am finding incredibly WTFy
15:04
<&ToxicFrog>
TheWatcher: http://forums.somethingawful.com/showthread.php?threadid=3679326&userid=120693
15:04
<&ToxicFrog>
That only shows the OP's posts, but it's in YOSPOS, so it honestly reads a lot better that way
15:05
<@Tarinaky>
Argh.
15:05
<@Tarinaky>
How do I get the text out of this smegging TCHAR*?
15:08
<@iospace>
ToxicFrog: YOSPOS?
15:09
<&ToxicFrog>
iospace: the mostly-unmoderated counterpart to SHSC and COC, "Your OS is a POS"
15:10
<@iospace>
you have to realize a lot of people here don't know SA acronyms >_>
15:11
<&ToxicFrog>
SHSC and COC are Serious Hardware/Software Crap and Cavern of COBOL, the non-coding and coding tech forums respectively. YOSPOS is the unmoderated appendage to them where the people who can't figure out how to use the shift key are safely quarantined.
15:11
<@iospace>
heh
15:12
<&McMartin>
Tarinaky: TCHAR* is UTF-16 assuming you have set your compilation mode correcty. Read it directly as UTF-16 or use WideCharToMultiByte to make it something else
15:13
<&McMartin>
And by something else I mean UTF-8 because fuck all other multibyte encodings
15:13
<&McMartin>
If you're feeding it to like MessageBox or something that *wants* UTF-16 so just feed it that.
15:14
<&ToxicFrog>
hackbunny is actually a regular in the COC "Coding Horrors" thread, and a few people said they'd read a thread that was just him telling win32api campfire tales, so he created it, but he created it in YOSPOS for some reason.
15:16
<&McMartin>
"what is uniquely awful is ANSI/Unicode macros"
15:16
<&McMartin>
I've used wxWindows. I can't agree with this statement.
15:18 * iospace gives ToxicFrog dirent.h
15:18
<@Tarinaky>
I'm trying to feed it to stderr
15:18
<@Tarinaky>
You know, so I can read the error message.
15:18
<@Tarinaky>
:/
15:19
<@Tarinaky>
I found _tprintf, which seems to be working now.
15:19
<@Tarinaky>
Although I think I'm using it wrong.
15:19
<@Tarinaky>
Unknown error 0x88890001
15:20
<&McMartin>
So, HRESULTs don't have to have string versions either, because they're just result codes.
15:20
<@Tarinaky>
Not particularly helpful.
15:21 * iospace sobs quietly at this code
15:21
<&McMartin>
That the top bit is set means it's an error but AFAIK that's the only requirement
15:21
<&McMartin>
If this is someone else's service you're using they didn't have to register anything at all for that.
15:21
<@Tarinaky>
McMartin: You make it sound like this a reasonable thing to do.
15:21
<@Tarinaky>
No. This is Windows.
15:21
<&McMartin>
Uh
15:21
<&McMartin>
"Windows" is a lot of things
15:21
<&McMartin>
It's already not "Windows" as I know it because we're in the equivalent of GObject/DBus.
15:22
<&McMartin>
88890001 is probably the actual HRESULT number
15:22
<@Tarinaky>
I mean I'm not trying to access third party COM crap
15:23
<&McMartin>
Googling that number gives me AUDCLNT_E_NOT_INITIALIZED
15:23
<@Tarinaky>
Why couldn't Windows have said that >.>
15:24 * Tarinaky is not happy with this.
15:24
<&McMartin>
Yeah, it's not great.
15:25
<&McMartin>
It's the C school of stuff, but there's 15 trillion subsystems and each has their own equivalent of errno.h
15:25
<@TheWatcher>
Tarinaky: And thus Ballmer's shrivelled, black heart is further nourished.
15:27
<@iospace>
DEVELOPERS DEVELOPERS DEVEL- *gapped*
15:28
<&McMartin>
AFAIK the only reliable way to dodge that fate is "keep the same lead designer for at least 15 years"
15:42
<@iospace>
...
15:42
<@iospace>
so, one thing I learned back in the day
15:42
<@iospace>
wrap "free(var)" with "if (var != NULL)"
15:43
<@Tarinaky>
Oh my god.
15:43
<@iospace>
this code? Doesn't do that
15:43
<@Tarinaky>
My code still doesn't work, but now it's crashing at a completely different part of the test.
15:43
<@Tarinaky>
Yay
15:43
< RchrdB>
iospace: but POSIX and IIRC the C spec says free(NULL) is defined as a no-op.
15:43
<@iospace>
RchrdB: this was also BIOS code
15:43
<@iospace>
:P
15:44
< RchrdB>
whoever wrote your malloc() and free() should be shot.
15:44 * iospace directs RchrdB towards Intel
15:45
< RchrdB>
Being Intel doesn't give them the right to not be shot out of a cannon.
15:46
< RchrdB>
Yep, it's in the C spec. :P
15:47 * iospace shrugs
15:47
<@iospace>
well, that's what i was told to do back at the old place
15:48
< RchrdB>
I feel actually severely offended by this.
15:49
< RchrdB>
Bad Intel, no cookie.
15:50
<@iospace>
...
15:50 * iospace shrugs
15:50
< RchrdB>
Irrationally so.
15:51
< RchrdB>
DAMMIT INTEL, NO COOKIE.
15:51
<@iospace>
yes, that's a rather irrational reason to be upset
15:52
<@iospace>
surrounding "free(var)" with "if (var != NULL)" isn't going to change the end execution
15:53
< RchrdB>
Writing that by hand everywhere is awful.
15:53
< RchrdB>
Doing it with a macro would be fine.
15:53
< RchrdB>
Doing it at all on a platform that's supposed to conform to the C spec is evil.
15:54 celticminstrel [celticminst@Nightstar-l2rg83.dsl.bell.ca] has joined #code
15:55 mode/#code [+o celticminstrel] by ChanServ
15:55
<@iospace>
RchrdB: UEFI does not use standard spec C
15:57
<@Tarinaky>
RchrdB: Why is that evil?
15:57
< RchrdB>
iospace: fair enough.
16:01 * Tarinaky suddenly remembers an 'evil' macro that involves replcing true with something wrapped around rand() which returns true 90% of the time.
16:04
<@iospace>
what
16:04
<@iospace>
no really, wat
16:04 Vornulation [NSwebIRC@Nightstar-k70f1n.ct.comcast.net] has joined #code
16:05
<@iospace>
one of my favorite macros back in the day, but it was a dangerous macro because it could easily segfault if used wrong, was a macro to grab an entire structure based on one member of it
16:06
<@Tarinaky>
iospace: The what is that it introduces a subtle bug which will annoy the victim.
16:06
<@iospace>
Tarinaky: Ok, let me rephrase
16:06
<@iospace>
WHY WOULD YOU DO THAT
16:06
<@Tarinaky>
Because you're evil.
16:06
<@Tarinaky>
Hence the name: 'evil' macro.
16:06
<@iospace>
true
16:08
<@Tarinaky>
If you're really evil, you can try implementing overloaded arithmetic operators on a class in C++
16:09
<@Tarinaky>
but leave one of them out.
16:10
<@iospace>
oh?
16:10 Vornulation [NSwebIRC@Nightstar-k70f1n.ct.comcast.net] has quit [Ping timeout: 121 seconds]
16:11
<@Tarinaky>
The problem with overloading arithmetic operators for things like... say... custom vector objects... Is that overloading one operator 'implies' the existence of 3 or 4 others,
16:11
<@Tarinaky>
And people will expect them to be there when you come to use the code.
16:11
<@Tarinaky>
i.e. operator+ implies the existence of operator-
16:11
<@Tarinaky>
And operator+= and operator-=
16:12
<@Tarinaky>
And, of course, these will be defined 3 times for different type signatures...
16:13
<@Tarinaky>
i.e. addition of two vectors, addition of a vector and an integer, addition of a vector and a float...
16:13
<@Tarinaky>
Addition of two vectors implies scalar multiplication.
16:14
<@Tarinaky>
So operator+ can also imply operator*
16:14
<@Tarinaky>
And scalar multiplication implies scalar division
16:14
<@Tarinaky>
It very quickly gets out of hand
16:14
<@Tarinaky>
When all you wanted, really, was Add(...)
16:22
< RchrdB>
Tarinaky: will any of the ones that you miss out the definition for get incorrect definitions generated automatically?
16:37
<@abudhabi>
Why the hell is Excel treating my formulas in the cells as text?
16:40
<@abudhabi>
Nevermind. It's because the cells had somehow become Text, and are stubbornly refusing to not be it.
16:55
<@Tarinaky>
RchrdB: I think Operator= and the Copy COnstructor are the only two that get incorrect definitions automatically.
17:03 abudhabi is now known as Julius
18:38 * iospace feeds Julius to Ben Stein
18:49 Kindamoody|afk is now known as Kindamoody
19:06 Lambo [thelambo@Nightstar-ic6koa.fl.comcast.net] has quit [[NS] Quit: ]
19:07 Lamabo [thelambo@Nightstar-ic6koa.fl.comcast.net] has joined #code
19:25
<@iospace>
RchrdB: you know what you reminded me of earlier? People who hate gotos for the simple fact that they're a goto
19:38 Kindamoody is now known as Kindamoody[zZz]
19:46 * iospace sighs at this code though
19:47
<@iospace>
certain people may disagree, but if you're using dynamically allocated variables, I think it should be one in one out
19:47
<@iospace>
just to make sure all those variables get wiped
20:02
< Lamabo>
uisng(var someVar = new SomeDisposableClass()) { /*do work */ }
20:02
< Lamabo>
:D
20:18
< RchrdB>
iospace: yeah, fair response. :p
20:40 Netsplit *.net <-> *.split quits: @gnolam, @celticminstrel, @McMartin, @PinkFreud, @Reiver
20:41 mode/#code [+o gnolam] by ChanServ
20:41 Netsplit over, joins: gnolam
20:41 Netsplit over, joins: Reiver, PinkFreud, McMartin
20:41 693AAAG37 [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has joined #code
20:41 Netsplit over, joins: @celticminstrel
20:41 ServerMode/#code [+aooaooo McMartin McMartin PinkFreud Reiver Reiver 693AAAG37 celticminstrel] by *.Nightstar.Net
20:41 693AAAG37 [lenin@Nightstar-utbkuh.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
21:34 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds]
22:11 macdjord|slep is now known as macdjord
22:11
<@Tarinaky>
Things I kinda wish Python had: import macros.
22:27
<@froztbyte>
https://technet.microsoft.com/library/security/ms14-066
23:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:29 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
23:29 mode/#code [+o himi] by ChanServ
23:30 lolmrlol [lolmrlol@Nightstar-hr36kd.bb.online.no] has joined #code
23:31 lolmrlol [lolmrlol@Nightstar-hr36kd.bb.online.no] has left #code []
23:58 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [[NS] Quit: leaving]
--- Log closed Wed Nov 12 00:00:41 2014
code logs -> 2014 -> Tue, 11 Nov 2014< code.20141110.log - code.20141112.log >

[ Latest log file ]