code logs -> 2013 -> Wed, 19 Jun 2013< code.20130618.log - code.20130620.log >
--- Log opened Wed Jun 19 00:00:29 2013
00:03 Netsplit *.net <-> *.split quits: @Reiv, @jerith, @PinkFreud
00:04 Netsplit over, joins: @PinkFreud, &jerith, @Reiv
00:19 Derakon is now known as Derakon[AFK]
00:24 Harlow [Harlow@8E7DA3.5F0415.4D5E13.93A5E9] has joined #code
00:55 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
00:55 mode/#code [+o himi] by ChanServ
01:07 Derakon[AFK] is now known as Derakon
01:20 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code
01:20 mode/#code [+o Orthia] by ChanServ
01:32 Harlow [Harlow@8E7DA3.5F0415.4D5E13.93A5E9] has quit [[NS] Quit: Leaving]
01:40 ktemkin[avol] is now known as ktemkin[work]
01:52 * McMartin wtfs at his laptop, which is signaling his program at various points where malloc() is called inside Xlib or libpulse.
01:52
<&McMartin>
Which then hard-locks it because SDL eats its own tail
01:53
<@Azash>
What kind of signal?
01:53
<&McMartin>
I can't tell from the backtrace
01:53
<&McMartin>
It just says "<signal caught>"
01:54
<@Azash>
Hm
01:54
<~Vornicus>
cute.
01:54
<&McMartin>
It's Mix_CloseAudio -> SDL_QuitSubsystem -> SDL_AudioQuit -> pa_xrealloc -> malloc -> <signal> -> SDL_Quit -> SDL_QuitSubsystem -> SDL_AudioQuit -> hang
01:55
<&McMartin>
Alternately, I get that from a malloc that happens inside Xlib on calls to SDL_Flip()
01:55
<&McMartin>
And this hangs it so hard that it needs to be kill -9'd, *and* gdb can only attach to it if I sudo gdb.
01:56 * McMartin powers down that laptop for a bit
02:02
<&McMartin>
Hm, yeah. After a nap it seems happy again
02:02
<&McMartin>
wtf
02:02
<@Azash>
RAM corruption?
02:02
<&McMartin>
Could be
02:03
<&McMartin>
Or it's running too hot
02:06 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:08
<@Azash>
Could overheating really cause that, though?
02:09
<&ToxicFrog>
Yes.
02:09 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
02:09
<&McMartin>
The ventilation wasn't great, and as summer wears on that becomes a bigger deal
02:09
<&McMartin>
I should get one of those bed-desks
02:11
<@Azash>
Huh, I didn't know that
02:12
<@Azash>
Well, I've clocked in 0x29 hours now, so.. Good night!
02:46 Typherix is now known as Typh|offline
02:51 Kindamoody[zZz] is now known as Kindamoody
03:14 Typh|offline is now known as Typherix
03:26
<~Vornicus>
Herp. Okay, have a method that can't be allowed to be const -- it's operator[], and I need to be able to use its results as an lvalue; however, it also gets used on const objects (as an rvalue). This is problematic.
03:26
<&McMartin>
You can define it twice, once const, one not.
03:26
<&McMartin>
const-ness is part of the signature and you can do overloads.
03:27
< RichyB>
Really? Handy.
03:27
<&McMartin>
Pretty sure std::vector and friends all do this, in exactly this use case
03:28
<~Vornicus>
So it'd be const int& operator[](...) and int& operator[](...)?
03:29
<&McMartin>
int& operator[](...) and const int& operator[](...) const
03:29
<&McMartin>
That last const is the marker that "this is const in this function"
03:29
<~Vornicus>
You can put that "const" word in a lot of places.
03:29
<&McMartin>
C++ had a mortal fear of introducing new keywords, so it recycles C's.
03:29
<~Vornicus>
What's the one at the start do?
03:30
< ktemkin[work]>
Modifies the return value.
03:30
<&McMartin>
Modifies the return type
03:30
< ktemkin[work]>
I guess I should have said "return value's type".
03:30
<&McMartin>
There isn't really a reason to return const int& instead of just int, though.
03:31
<~Vornicus>
Okay so it'd be "int operator[](...) const" and "int& operator[](...)"
03:31
<&McMartin>
Yeah, that should work
03:31
<&McMartin>
And in the former, "this" will be a constant pointer to your class.
03:31
<&McMartin>
So constness should be neatly enforced.
03:41
< ktemkin[work]>
How did I go this long without knowing how Bash's tilde expansions really worked?
03:41
< ktemkin[work]>
I had just always assumed ~ was shorthand for the user's home directory; I didn't know you could do ~ENVVAR.
03:42
<&McMartin>
~ENVVAR? I thought it was ~otheruser.
03:42
<&McMartin>
What does ~ENVVAR do?
03:42
< ktemkin[work]>
If you have an environment variable ENVVAR that contains a path, ~ENVVAR is equivalent to that path.
03:43
< ktemkin[work]>
So you could do CD ~ENVVAR; and it'd be quivalent to CD $ENVVAR.
03:43
< RichyB>
uh
03:43
< RichyB>
That's not standard Bourne shell semantics
03:44
< ktemkin[work]>
Ah; it looks like that's a zsh thing; not a Bash thing.
03:44
< ktemkin[work]>
</wrong>
03:48
< ktemkin[work]>
Thinking about it more, I can't see why that'd be /useful/, other than giving a succinct way of expressing it in prompt.
04:08 ktemkin[work] is now known as ktemkin
04:12
<~Vornicus>
okay having learned how I'm supposed to be using const now I have to go hunting to see what else I'm up to.
04:18 * Vornicus tries to use initializer list on a fixed-size array in a class, fails miserably on both attempts.
04:21
<~Vornicus>
I tried x[0](a), x[1](b), x[2](c), and x({a, b, c}) and neither worked, so looks like I'm again in a position of either not being able to guess the right syntax, or just not being able to do it at all.
04:24 Kindamoody is now known as Kindamoody[zZz]
04:25
< Syka>
https://pbs.twimg.com/media/BNELF1GCUAExynU.png:large -- "What the hell have you built."
04:27
<&Derakon>
Vorn: I wouldn't be surprised if that's something you just can't do.
04:36
<~Vornicus>
No fun.
04:38
<~Vornicus>
yay, no more compile errors because I cannot into C
04:38
<~Vornicus>
nap.
05:21 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Ping timeout: 121 seconds]
05:45
<~Vornicus>
denap.
05:57 Typherix is now known as Typh|offline
06:14 Derakon is now known as Derakon[AFK]
06:16 ErikMesoy|sleep is now known as ErikMesoy
06:28 Kindamoody[zZz] is now known as Kindamoody
06:36 Turaiel is now known as Turaiel[Offline]
07:03 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code
07:03 mode/#code [+o Orthia] by ChanServ
07:05
<&McMartin>
Dang
07:05
<&McMartin>
Remote Desktop at shitty DSL speeds really has no right to be this good
07:06
<~Vornicus>
Every time I've played with remote desktop I've been very impressed at its performance
07:10
<~Vornicus>
Ah, /finally/ the static typing gets around to coming home to roost, making my code bigger by its existence.
07:11
<&McMartin>
C++ iterator type names are The Worst
07:11
<~Vornicus>
(as opposed to just making me describe the data types first)
07:12
<~Vornicus>
eh. typedef defeats all
07:12
<&McMartin>
If you're replicating code with just the typenames changed, you may want to consider templates.
07:12
<&McMartin>
Or not, since templates are a pain in the ass and you're still kind of new at this~
07:12
<~Vornicus>
Well, I do have, uh, two template functions, but what it's actually doing here is forcing me to construct pieces before the full object.
07:13
<~Vornicus>
or rather, I do have two functions where templates will help.
07:14
<~Vornicus>
but that's a little bit later.
07:17
<&McMartin>
One of C++'s actively weirder bits is the way it lets you have unboxed objects
07:17
<&McMartin>
Which does tend to put in super-constrained ordering restraints. If you want to break those, consider using pointer members under the hood.
07:18
<&McMartin>
But if you can avoid it, and stick to internal value types, it's often harder to fuck up the unboxed ones.
07:18
<~Vornicus>
'unboxed objects'?
07:19
<~Vornicus>
(you're talking to a guy who's worked in dynamic languages basically exclusively for 7 years -- the only reference point I have for 'boxed' is what java does to basic types to put them on the heap)
07:34
<&McMartin>
Right; that's the opposite of that. These are treating the objects as if they were basic types that you can just jam onto the stack or into the middle of some other structure
07:35
<&McMartin>
So there are strong requirements on when exactly construction and destruction must be done as a result of that
07:49
< RichyB>
Vornicus: I'm letting a hobby horse get ahead of me here, but please do not judge all static type systems by C++. There do exist some much nicer ones which involve far fewer explicit type names laboriously tapped out everywhere.
07:50
<~Vornicus>
That's not really the issue.
07:52 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:52
<~Vornicus>
it's more like, this is now complicated enough that it's no longer possible to do on one line the kind of bullshit I pulled in Python taking advantage of all the crazy type literals.
08:17 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:46
<&McMartin>
Blargh
08:46
<&McMartin>
Heap corruption bugs!
08:46
<&McMartin>
How I haven't missed you
08:46
<&McMartin>
Those malloc failures from this morning, revealed as secondary damage.
08:47 * Syka adds some bugs to the heap
08:47
< Syka>
like needles in a haystack
08:48
< Syka>
don't know theyre there until you dive in and suddenly you've got a rusty needle in your spleen
08:49 * McMartin did a revision tree search, found the faulty commit
08:49
<&McMartin>
It's been Busted (tm)
08:49
<&McMartin>
I also found a non-fatal memory leak~
08:49
< Syka>
heapbusted
08:52
<&McMartin>
Yeah
08:52
<&McMartin>
Sorted it out, I think
08:52
<&McMartin>
As part of loading PNGs I was instructing SDL to start freeing random integers that could be valid pointers but weren't~
08:53
<~Vornicus>
08:54
<@TheWatcher>
Wups
09:00
<&McMartin>
https://github.com/michaelcmartin/monocle/commit/0737dd30775a440497e1c54b2a24aa5 8c7bcc404
09:02
<&McMartin>
OK, just ran the earthball demo 20 times in a row with no issues
09:05 * TheWatcher eyes this code
09:06
<@TheWatcher>
On the other hand, I'm apparently reliably killing dromed trying to pull stim intensities out of messages. And I have no idea why.
09:07
<&McMartin>
Dromed is the Thief level editor?
09:07
<@TheWatcher>
Indeed so.
09:15 ktemkin is now known as ktemkin[awol]
09:20 Kindamoody is now known as Kindamoody|out
09:24 Typh|offline is now known as Typherix
09:33 Typherix is now known as Typh|offline
09:50
<~Vornicus>
whee, terrible math
09:52
<&McMartin>
What is it you're unleashing with this C++ project?
09:53
<~Vornicus>
You may remember some time back I was working on some brute force optimization problem.
09:55
<~Vornicus>
My work in Python turned out to be not nearly fast enough.
09:55
<&McMartin>
Ah
09:56
<&McMartin>
I had in fact forgotten that
09:56
<~Vornicus>
So now I'm working on it in C++, and in the process discovering that about 95% of the work is remembering how C++ works~
09:56
<~Vornicus>
...more like 98%
10:23
<&McMartin>
https://twitter.com/codinghorror/status/347070841059692545/photo/1
10:28 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:28 mode/#code [+o himi] by ChanServ
10:36 * TheWatcher ...s at this
10:43
<~Vornicus>
Anyway now I'm finally getting into the proper meat of the problem itself
10:44
<@TheWatcher>
Well, that's interesting
10:48
<@TheWatcher>
This is crashing trying to call GetName() on messages, even though GetName should be perfectly safe to call
10:50
<@TheWatcher>
(Also, I should actually be working on, y'know, work... but this is bugging the hell out of me)
11:12 Typh|offline is now known as Typherix
11:21 Typherix is now known as Typh|offline
13:00 Typh|offline is now known as Typherix
13:09 Typherix is now known as Typh|offline
13:15 Typh|offline is now known as Typherix
13:53 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
14:20 * McMartin rocks out, does some work while his brain still functions.
14:27 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:27 mode/#code [+o celticminstrel] by ChanServ
14:31
<@Azash>
McMartin: At least you figured that bug out
14:32
<&McMartin>
It's a relief to know it's my fault and not some kind of implausibly selective hardware failure...
14:32
<&McMartin>
... and also to know that it isn't a library I'm relying on being even more unreliable than I had feared
14:34
<&McMartin>
It was the audio routines that were doing the mallocs that were SIGSEGVing
14:35
<&McMartin>
And SDL_Mixer is, as noted, horribly finicky and distressingly prone to fucking everything up at inopportune moments unless handled with a biohazard suit and six-foot tongs
14:41
<@Azash>
I guess there are no better alternatives?
14:41
<&McMartin>
Not for what I want, not without a shitload of work I really don't want to do
14:42
<&McMartin>
I'm mimicking a third-party API here, and SDL_Mixer mimics it almost exactly as is.
14:42
<@Azash>
Right~
14:46 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has left #code []
14:46 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:46 mode/#code [+o celticminstrel] by ChanServ
14:46 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
14:46 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:46 mode/#code [+o celticminstrel] by ChanServ
14:47
<&McMartin>
I really need to stop messing around at this point and start writing the event system
14:48
<@Azash>
What was it you are working on again?
14:51
<&McMartin>
2D game engine
14:51
<&McMartin>
Want it to be trivially drivable by pretty much any other language
14:53
<@Azash>
Hm hm
14:54
<&McMartin>
I'm trying to replicate the main functionality behind the Game Maker engine, but without the reliance on some of the things it wants (like modern graphics cards)
14:54
<&McMartin>
I'm giving things up (like rotozoom) to get that, but that's fine, the games I want to write don't need that.
15:21
<@TheWatcher>
Could such things be added via a plugin system, should they ever be needed/desirable/itchscratchworthy?
15:27
<&McMartin>
There'd be some fairly major yakshaving to do so "properly"
15:27
<&McMartin>
One of the things I'm backdooring into the API is neutrality between a framebuffer (which I'm using now) and an OpenGL backend
15:27
<&McMartin>
To really do rotozoom properly you need the opengl backend
15:46 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
15:48 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [Ping timeout: 121 seconds]
16:20 Turaiel[Offline] is now known as Turaiel
16:29
<@Azash>
https://twitter.com/vmw_workstation/status/347017072812908544
16:29 * Azash gets confus
17:16
<&McMartin>
New versions of Fusion (and thus Workstation) tend to come out around when new versions of OSX do, I guess?
17:17
<@Azash>
I was more amused with making it Father's Day themed
17:17
<@Azash>
"Grats dad, I got you a copy of VMWare Workstation"
17:21
<&McMartin>
I dunno
17:21
<&McMartin>
If I were a dad I'd rather have that than a tie
17:21
<@Tamber>
Socks.
17:34
<@Azash>
McMartin: Sure but you would know what to do with it at least :P
18:22 Turaiel is now known as Turaiel[Offline]
19:40 Typherix is now known as Typh|offline
21:19 Derakon[AFK] is now known as Derakon
21:24 ktemkin[awol] is now known as ktemkin[work]
21:24 ktemkin[work] is now known as ktemkin
21:41 Kindamoody|out is now known as Kindamoody
22:07 ErikMesoy is now known as ErikMesoy|sleep
22:14 Kindamoody is now known as Kindamoody[zZz]
22:31 gnolam_ [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has joined #code
22:31 gnolam is now known as NSGuest52050
22:31 gnolam_ is now known as gnolam
22:31 mode/#code [+o gnolam] by ChanServ
22:33 NSGuest52050 [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [Ping timeout: 121 seconds]
--- Log closed Thu Jun 20 00:00:44 2013
code logs -> 2013 -> Wed, 19 Jun 2013< code.20130618.log - code.20130620.log >

[ Latest log file ]