code logs -> 2015 -> Thu, 08 Jan 2015< code.20150107.log - code.20150109.log >
--- Log opened Thu Jan 08 00:00:13 2015
01:04 Derakon[AFK] is now known as Derakon
01:05 mode/#code [+ao Derakon Derakon] by ChanServ
01:45
<&ToxicFrog>
...doesn't the VS output window automatically collect stderr and stdout?
01:46
<&ToxicFrog>
I kind of assumed you specifically wanted it in a file because it doing in the VS output window should happen automatically.
01:47
<&ToxicFrog>
And the reason you want an actual logging library is that it gives you the ability to selectively toggle message types on and off and control where they go to automatically.
02:00 Turaiel[Offline] is now known as Turaiel
02:06 Turaiel is now known as Turaiel[Offline]
02:07 Turaiel[Offline] is now known as Turaiel
02:08 Turaiel is now known as Turaiel[Offline]
02:17 Turaiel[Offline] is now known as Turaiel
03:26 thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has joined #code
03:26 mode/#code [+o thalass] by ChanServ
03:27 orth [orthianz@Nightstar-k2p.2o1.148.118.IP] has joined #code
03:35 orth_ [orthianz@Nightstar-o4v0qm.callplus.net.nz] has joined #code
03:35 orth [orthianz@Nightstar-k2p.2o1.148.118.IP] has quit [Connection closed]
03:35 orth_ [orthianz@Nightstar-o4v0qm.callplus.net.nz] has quit [[NS] Quit: Bye]
03:38 Reivles is now known as Orthia
03:57 Turaiel is now known as Turaiel[Offline]
03:57 Turaiel[Offline] is now known as Turaiel
04:14
<@celticminstrel>
TF: It does not.
04:15
<@celticminstrel>
There seem to be ways to get output into the debug output window, but they seem to require you use the console subsystem.
04:15
<@celticminstrel>
With C++ streams I can replace the streambuf, but there's no analogous function (that I know of) for C streams.
05:31 thalass is now known as Thalass|afk
05:32 Derakon is now known as Derakon[AFK]
05:51 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
05:51 Thalass|afk is now known as Thalass|jog
06:27 Thalass|jog is now known as Thalass
06:29 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds]
06:51 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:04 Kindamoody[zZz] is now known as Kindamoody
07:04 Thalass is now known as thalass|TF2
07:19 Xires is now known as ^Xires
07:32 ^Xires is now known as Xires
07:33 Turaiel is now known as Turaiel[Offline]
07:44 thalass|TF2 is now known as Thalass
09:27 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has joined #code
09:28 Orthia [orthianz@Nightstar-o4v0qm.callplus.net.nz] has quit [Ping timeout: 121 seconds]
09:33 Orthia [orthianz@Nightstar-r1b.8ub.160.203.IP] has joined #code
09:33 mode/#code [+o Orthia] by ChanServ
09:47 AverageJoe [evil1@Nightstar-2ofrtr.ph.cox.net] has quit [[NS] Quit: Leaving]
09:52 Thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has quit [Ping timeout: 121 seconds]
09:53 Thalass [thalass@Nightstar-1dh83p.bigpond.net.au] has joined #code
09:53 mode/#code [+o Thalass] by ChanServ
10:41
<@Tarinaky>
Does anyone have suggestions for where %HOMEPATH% might be getting set?
10:41
<@Tarinaky>
It's not one of the variables in the edit account variables dialogue
10:42 * abudhabi read that as HOMEOPATH.
10:43
< simon_>
a homeopathm must be the path along which a homeomorphism travels.
10:43
< simon_>
actually, I think a homeomorphism is a kind of continuous path. huh.
10:44
< simon_>
Tarinaky, can't Windows environment variables be either account-specific or system-specific? either way I'd think they're defined in the same window.
10:44
< simon_>
wait... %HOMEPATH% is perhaps a magic variable and not an environment variable?
10:44
<@TheWatcher>
Yeah, correct. it's set as part of user account loading
11:05 * abudhabi thuddles his thwimbs.
11:06
< abudhabi>
It appears that my occupation is now to receive code feedback and fix bugs. With a lot of spare time in between.
11:07
<@TheWatcher>
Welp, time to install KSP!~
11:08
< abudhabi>
Not with my boss and my coworker being in the same room, I'm not.
11:09
< abudhabi>
There are much more productive things I can do, like learning Russian and checking my investments.
11:12
<@TheWatcher>
Bah, productive.
11:17
<@Tarinaky>
Reading BBC news and reddit counts as productive right?
11:17
<@Tarinaky>
On a related note: WTF is going on in Paris o.o
11:17
< abudhabi>
What subreddits?
11:19
<@TheWatcher>
Tarinaky: the 12 people killed in a shooting at the offices of a satire magazine?
11:19
<@Tarinaky>
abudhabi: /r/programming and /r/gamedev
11:19
<@Tarinaky>
The latter has a good cross-section of all the programming reddits I've found.
11:19
<@Tarinaky>
TheWatcher: /And/ the 2 police officers this morning.
11:20
<@Tarinaky>
As yet unlinked.
11:20
<@TheWatcher>
Oh, another 2?
11:20
<@TheWatcher>
I know that 2 of the 12 were police, didn't know there had been more
11:20
<@Tarinaky>
There was a different attack this morning in paris that's as yet unlinked.
11:21
< abudhabi>
Tarinaky: Potentially productive, the reddit things. I wouldn't say that about following the daily news.
11:21
<@Tarinaky>
I'm not sure /r/gamedev has anything that's productive in light of my actual job.
11:22
<@TheWatcher>
Tarinaky: Ah, right, so I see
11:26
<@Tarinaky>
Wouldn't surprise me if it was a copycat like after the 7/7 bombings in London.
11:27 * TheWatcher shrug
11:30 Kindamoody is now known as Kindamoody|afk
11:31
<@Tarinaky>
Idly, when working with C++ Classes... What's the 'best practice' for ensuring opaque classes are available to resolve circular dependencies.
11:31
<@Tarinaky>
Where do you put your prototypes so you're not repeating them?
13:03
< RobinStamer>
class Thing; // above other class
13:05 * Azash chokes Facebook
13:05
<@Azash>
Why can't you use a wizard to create page tabs with custom apps?
13:05
<@Azash>
You can only do that with events and notes
13:05
<@Azash>
Any other app has to be added through a custom GET request
13:09 RobinStamer is now known as [R]
13:11
<@TheWatcher>
You don't expect Facebook to do something /useful/ do you?
13:13
<@Azash>
It mainly seems like they would benefit
13:13
<@Azash>
From not needing people to get developers to add a tab to their page
13:42 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
13:43 mode/#code [+o Checkmate] by ChanServ
13:55
< abudhabi>
Hmm. Someone's selling a Commodore C-386 SX Klenodium on Finn.no.
14:36 celticminstrel [celticminst@Nightstar-de4ll6.dsl.bell.ca] has joined #code
14:36 mode/#code [+o celticminstrel] by ChanServ
15:53 Derakon[AFK] is now known as Derakon
18:00
<@celticminstrel>
...okay, so I have a std::map<int,std::list>. If i is not in the map, then map[i].push_back(x) creates a new list and adds x to it. If i is already in the map, then map[i].push_back(x) appears to clear the list instead.
18:06
<&Derakon>
Um, shouldn't map[i] blow up if i is not in the map?
18:07
<@celticminstrel>
No, it inserts a default-constructed element.
18:07
<@celticminstrel>
(Which is admittedly a little odd and probably the reason why c++11 added at().)
18:07
<&Derakon>
Weird.
18:07
<@celticminstrel>
Yes, but it can be useful.
18:45 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
18:57
<@celticminstrel>
For some reason, one of the files I put in my tarball isn't being extracted.
18:59
< [R]>
Force that one specifically and turn up verbosity?
19:03
<@celticminstrel>
The entry is clearly there if I open it in a hex editor...
19:11
<@celticminstrel>
If I rebuild the tar using the tar utility with the missing file included, I see some differences in the tar header - fields that I didn't bother to fill. Seems unlikely they're the reason though, because those differences apply to the other files as well.
19:13
<@celticminstrel>
The total length of the entry is identical too.
19:13 Kindamoody|afk [Kindamoody@Nightstar-966hb4.mobileonline.telia.com] has quit [Ping timeout: 121 seconds]
19:13 Kindamoody|autojoin [Kindamoody@Nightstar-966hb4.mobileonline.telia.com] has joined #code
19:13 mode/#code [+o Kindamoody|autojoin] by ChanServ
19:16
<@celticminstrel>
Oh, hang on, that's not the only missing file. The issue would probably lie with the first missing file...
19:16
< [R]>
I don't know why you don't just extract the single file with verbosity turned on
19:17
<@celticminstrel>
I tried that, it didn't include the missing files in the list.
19:17
< [R]>
You're doing something like: tar xvvvf tar.tar missing.file #right?
19:18
< [R]>
(Your phrasing implies your doing a full extraction again)
19:18
<@celticminstrel>
Oh.
19:23
<@celticminstrel>
Ah, one of the files in the archive is taking up 512 bytes more than the header claims. That's probably why.
19:24
<@celticminstrel>
...I think that's right.
19:25
<@celticminstrel>
Yup, I remove 512 bytes and suddenly the missing files exist.
19:25
<@celticminstrel>
Now to figure out why there's an extra 512 bytes.
19:28
<@celticminstrel>
Okay, fixed.
19:29
<@celticminstrel>
I calculated the amount of padding required with 512 - size % 512.
19:35 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has joined #code
19:35 mode/#code [+o Checkmate] by ChanServ
19:36 Kindamoody|autojoin is now known as Kindamoody
19:41
<&Derakon>
CM: and the operators have different precedence than you thought?
19:41
<@celticminstrel>
No, I don't think it's that.
19:42
<@celticminstrel>
The issue is that, if size is a multiple of 512, that calculation yields 512.
19:42
<@celticminstrel>
But the padding is specifically so that the total length is a multiple of 512, so if the size already is, then no padding is needed.
19:42
<&Derakon>
Oh.
19:43
<@celticminstrel>
I had the same error when reading in the tarball, so it worked fine as long as you didn't try to open it with normal utilities.
19:48
<&Derakon>
Why are you implementing your own tarballs, anyway?
19:49
<@celticminstrel>
I don't quite remember, but I think I was unable to find a nice library for them?
19:49
<@celticminstrel>
It's a very simple file format, anyway.
20:03
< [R]>
Isn't it like "header for file1; contents for file1; header for file2; contents for file2; ..."?
20:04
<&ToxicFrog>
Yes.
20:04
<&ToxicFrog>
(this is why listing the contents of a tarball is O(n))
20:04
<@celticminstrel>
That's exactly right. Plus padded with nulls to multiples of 512.
20:04
<&McMartin>
point of order: it's not a tarball until you run it through a compression program
20:05
<&ToxicFrog>
McMartin: bwuh?
20:05
<&McMartin>
Of which there are about four options and two real ones
20:05
<@celticminstrel>
Eh, close enough. >_>
20:05
<&McMartin>
ToxicFrog: My understanding is that a tarfile becomes a tarball once it's tgz or tbz or w/e
20:05
<&McMartin>
raw .tar - the uncompressed concatenated tape archive is merely a tar file
20:06
<&ToxicFrog>
My understanding is that "tarball" applies equally to compressed and uncompressed tar files, while "tar file" refers specifically to the latter as it exists on disk.
20:06
<&McMartin>
OK
20:06
<&McMartin>
I'd seen it as "and here's where you ball it up"
20:10
<@celticminstrel>
...so now, the texture is upside down regardless of whether I flip the image vertically before transferring it to the texture. :|
20:11
<@celticminstrel>
...oh wait.
20:11
< [R]>
Also unlike zip you can stream it and it can decompress on the fly.
20:11
<@celticminstrel>
I was editing the wrong section of the code.
20:14
<@TheWatcher>
>.<
20:20
<@celticminstrel>
Now I just have to figure out why the picture draws correctly in one place but not in the other place.
20:23
<@celticminstrel>
Wrong destination rect, apparently.
20:47
<&McMartin>
[R]: Interestingly, any given file *within* a zipfile can be streamed; just not the zipfile as a whole.
20:48
< [R]>
O.o
20:50
<&McMartin>
(I wrote a little zipfile handler for Monocle a couple years back. The sole issue turns out to be that the ToC is at the *end* of the file)
20:50
<&Derakon>
That makes sense.
20:50
<&McMartin>
(Said ToC has its *own* serious issues but that's not relevant here)
20:50
<&Derakon>
You write it after you're done writing everything else, once you know where they go.
20:50
<&McMartin>
Oh wait, and now that I say this, I know why
20:50
<&McMartin>
Yeah that
20:50
<&Derakon>
We have similar issues with our data format at work.
20:50
<&McMartin>
Zipfiles were clearly written to be streamably *written* in sizes larger than RAM.
20:53
< [R]>
SEZIPs are both PEs and .zip files.
20:54
< [R]>
Not sure if that was an intent though
20:54
<&Derakon>
EAP?
20:54
< [R]>
?
20:55
<&Derakon>
Explain Acronym Please.
20:55
< [R]>
Self-Extr... PE == .exe
20:56
<@celticminstrel>
ToC... table of contents?
20:56
<&Derakon>
Yes.
20:56
<&Derakon>
Provides the offsets for the files within the zip.
20:57
<&Derakon>
TIFFs operate on a similar principle if you have multiple images in one TIFF.
21:00
<&McMartin>
R: PE postdates ZIP and is based on some DEC thing IIRC so I suspect it is merely a happy accident
21:08 * Derakon mutters at Java.
21:08
<&Derakon>
Once you have created and displayed a window, it is impossible to make that window properly fullscreen (i.e. with hidden title bar and so on).
21:08
<&Derakon>
You have to decide, when the window is created, if it is to be fullscreen or normal, and cannot switch between the two on the fly.
21:09
<@celticminstrel>
Is that really a major issue?
21:09
<&Derakon>
If you have a window that you want to be able to switch between normal and fullscreen mode? Yes.
21:10
<&Derakon>
Switching then requires basically recreating every GUI object every time you switch.
21:10
<@celticminstrel>
Ah, so this is a window with controls and stuff.
21:10
<&Derakon>
As opposed to...?
21:10
<@celticminstrel>
Couldn't you put everything in a subpanel? Then you would only have to recreate the window itself.
21:11
<@celticminstrel>
As opposed to a window to which you're rendering directly.
21:11
<&Derakon>
Oh. Yeah, no, this is an application for work. It makes extensive use of native widgetst.
21:11
<&Derakon>
Er, widgets.
21:11
<&Derakon>
Putting everything in a subpanel would work, and is probably what I'll have to do, but it's an extensive refactor and an almighty pain in the ass.
21:12
<&Derakon>
You should just be able to call a method and boom, your window is fullscreened.
21:12 Checkmate [Z@Nightstar-ev6.6um.94.83.IP] has quit [Ping timeout: 121 seconds]
21:13
<@celticminstrel>
SFML requires you to recreate the window... though, this is distinct from reconstructing it; you just call the create method.
21:14
<@celticminstrel>
It would make sense to be able to fullscreen easily, though.
21:17 Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has joined #code
21:18
< Vorntastic>
Celmin: (512 - s % 512) % 512
21:19
<@celticminstrel>
Instead of that, I just added an if(padlength < 512).
21:19
< Vorntastic>
Technically if you know your pad length is 2^k, then you can use &, but I bet the compiler knows that!
21:20
<@celticminstrel>
How does using & work?
21:20
< Vorntastic>
Or raqther & 511
21:21
<@celticminstrel>
So, size & 511? Or (512 - size % 5125) & 511?
21:21 Checkmate [Z@Nightstar-484uip.cust.comxnet.dk] has joined #code
21:21 mode/#code [+o Checkmate] by ChanServ
21:21
<@celticminstrel>
Whoops, extra 5 there.
21:22
< Vorntastic>
The madness place: (-s)&511
21:23
<@celticminstrel>
...negative sign?
21:23
< Vorntastic>
But i'd still use the mod version because people understand it more quickly.
21:24
< Vorntastic>
Yes.
21:24
<@celticminstrel>
...yeah, okay.
21:24
<@celticminstrel>
I think I'll stick with my calculation and check <512.
21:26
<&Derakon>
Yeah, keep it to what you can easily understand.
21:26
<&Derakon>
The vast majority of code does not benefit from getting clever.
21:28
< Vorntastic>
I suspect the compiler knwos these tricks. It's a compiler, this is its job.
21:37
< Vorntastic>
Actually, my "readable" would be: 512*(int)(ceil((float)s/512.0)) - s
21:37
< Vorntastic>
(Some of those casts may be unnecessary)
22:20
<&McMartin>
https://i.chzbgr.com/maxW500/8420207360/hE25C7F67/
22:20
<&McMartin>
Hail our glorious internet future
22:46 Vornlicious [Vorn@Nightstar-613dja.sub-70-215-15.myvzw.com] has joined #code
22:49 Vorntastic [Vorn@Nightstar-k70f1n.ct.comcast.net] has quit [Ping timeout: 121 seconds]
22:50
<@celticminstrel>
One advantage of using C++ streams instead of C streams is that I don't need to call .string() in order to output a boost path.
23:09 Vorntastic [Vorn@Nightstar-uhn82m.ct.comcast.net] has joined #code
23:11 Vornlicious [Vorn@Nightstar-613dja.sub-70-215-15.myvzw.com] has quit [Ping timeout: 121 seconds]
23:12
< Reiv>
boost path?
23:12
<@celticminstrel>
File path.
23:12
<@celticminstrel>
boost::filesystem::path
23:12
< Reiv>
ah
23:13 Vorntastic [Vorn@Nightstar-uhn82m.ct.comcast.net] has quit [[NS] Quit: Bye]
23:14
<@celticminstrel>
(I shorten it to fs::path with a namespace alias.)
23:14 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:14 mode/#code [+qo Vornicus Vornicus] by ChanServ
23:51 Orthia is now known as Reivles
--- Log closed Fri Jan 09 00:00:34 2015
code logs -> 2015 -> Thu, 08 Jan 2015< code.20150107.log - code.20150109.log >

[ Latest log file ]