code logs -> 2013 -> Tue, 14 May 2013< code.20130513.log - code.20130515.log >
--- Log opened Tue May 14 00:00:45 2013
00:03 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
00:12
<@gnolam>
RichyB: lemme guess: some kind of XY problem?
00:14
< RichyB>
A pretty mild form.
00:15
< RichyB>
That and shyness. More forthcoming when PMing me. Possibly doesn't like to sound stupid in front of a whole channel?
00:22 * jerith has just added system font support (in a bring-your-own-firmware kind of way) to his Pebble simulator.
00:23
<@gnolam>
Pebble bed?
00:23
<&jerith>
This now means that every watch app I have tested it with is now completely functional.
00:23
<&jerith>
gnolam: http://getpebble.com/
00:24
<&McMartin>
"XY Problem"?
00:24
<&jerith>
McMartin: "My problem is X, but I'm actually asking about Y which is the way I intend to solve it."
00:25
<&jerith>
When X isn't mentioned at all, you can't really point out a better non-Y solution.
00:26
<@gnolam>
And since Y probably isn't the right way to solve X, Y tends to be horribly convoluted.
00:26
<&jerith>
Quite.
00:27
<@gnolam>
jerith: Ah. I recently started using a wristwatch again after about a decade without one, but I went fully analogue instead. >_>
00:29
<&jerith>
gnolam: Likewise, except I went for a Pebble. :-)
00:30
<&jerith>
I've been running a bunch of analogue faces on it, but that's only because I've been figuring out the rendering engine.
00:30
<&jerith>
My standard face at the moment is https://github.com/jerith/pebble-beapoch
00:31
<&McMartin>
trollface.jpg
01:25 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
01:25 mode/#code [+o himi] by ChanServ
01:25
< [R]>
<NightStar:#code:jerith> [R]: Turning strings into integers for the purpose of comparison? I don't know any other languages that do that.
01:25
< [R]>
> ['3' == 3, '10' > 5]
01:25
< [R]>
[ true, true ]
01:26
< [R]>
(JS)
01:26
<&McMartin>
"Let's talk about JavaScript."
01:26
<&McMartin>
( https://www.destroyallsoftware.com/talks/wat if you haven't seen it)
01:26
<&McMartin>
(It's great)
01:26
< [R]>
I have
01:40 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
02:56 ToxicFrog|W`rkn is now known as ToxicFrog
02:58 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
04:05 Kindamoody[zZz] is now known as Kindamoody
04:24 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds]
04:25 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!]
04:26 Chutzpah [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code
05:22 Kindamoody is now known as Kindamoody|out
05:56 Vorntastic [Vorn@31356A.68201E.EB0611.E0094F] has joined #code
06:07 Netsplit *.net <-> *.split quits: ErikMesoy|sleep, @froztbyte, @Reiv, [R], Turaiel, @PinkFreud
06:07 Netsplit over, joins: @PinkFreud, @froztbyte, @Reiv, Turaiel, [R]
06:07 ErikMesoy [Erik@A08927.B4421D.403BAA.818DC8] has joined #code
06:09 froztbyte [froztbyte@Nightstar-dc394964.za.net] has quit [Ping timeout: 121 seconds]
06:10 froztbyte [froztbyte@B19C04.9D2D7E.A788A9.8EAA6C] has joined #code
06:10 mode/#code [+o froztbyte] by ChanServ
06:23 Derakon is now known as Derakon[AFK]
06:31 syksleep is now known as Syk
06:56 Vornlicious [Vorn@Nightstar-35846fd1.sub-70-211-2.myvzw.com] has joined #code
06:56 Vorntastic [Vorn@31356A.68201E.EB0611.E0094F] has quit [Client closed the connection]
06:57 Vorntastic [Vorn@Nightstar-221158c7.sd.cox.net] has joined #code
07:00 Vornlicious [Vorn@Nightstar-35846fd1.sub-70-211-2.myvzw.com] has quit [Ping timeout: 121 seconds]
07:03 Vornlicious [Vorn@A2BA3E.078E56.8013E4.5B54C7] has joined #code
07:03 Vorntastic [Vorn@Nightstar-221158c7.sd.cox.net] has quit [Connection reset by peer]
07:03 Vorntastic [Vorn@Nightstar-221158c7.sd.cox.net] has joined #code
07:07 Vornlicious [Vorn@A2BA3E.078E56.8013E4.5B54C7] has quit [Ping timeout: 121 seconds]
07:18 Turaiel is now known as Turaiel[Offline]
07:48 Vorntastic [Vorn@Nightstar-221158c7.sd.cox.net] has quit [[NS] Quit: Bye]
08:22 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
09:28 toor [toor@F9D7EC.43C441.628307.F34703] has joined #code
09:29 toor [toor@F9D7EC.43C441.628307.F34703] has left #code ["Leaving"]
09:42 You're now known as TheWatcher
09:53 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Operation timed out]
10:04 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
10:04 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has joined #code
10:11 JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
10:12 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [Ping timeout: 121 seconds]
10:22 JustLurk [justbob@ServerAdministrator.Nightstar.Net] has joined #code
10:24 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has joined #code
11:02 Syk is now known as syk|out
11:09 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
11:09 mode/#code [+ao Derakon Derakon] by ChanServ
11:12 Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
12:06
<@froztbyte>
oh god: https://www.smore.com/clippy-js
12:09
<~Vornicus>
almost as monstrous is the site design
12:26 JustLurk is now known as JustBob
13:15 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
13:15 mode/#code [+o himi] by ChanServ
13:19 syk|out is now known as Syk
13:20 Vornicus [vorn@31356A.68201E.EB0611.E0094F] has quit [[NS] Quit: ]
14:25
< RichyB>
wtf
14:25
< RichyB>
I just found a file called "sleep.core" in my home directory.
14:25
< RichyB>
How on EARTH did I once cause sleep to segfault?
14:26
<@TheWatcher>
Open the core file in gdb and see?~
14:27
< Syk>
maybe it failed with E_SATURDAY_MORNING_SLEEPIN
14:28 Kindamoody|out is now known as Kindamoody
14:38
< RichyB>
Too late; I rm'd it because it scared me. ;-;
14:40
<@froztbyte>
https://pypi.python.org/pypi/Pint
14:40
<@froztbyte>
RichyB: quick, hunt for an open filehandle on it!
14:50 celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code
14:50 mode/#code [+o celticminstrel] by ChanServ
15:37 Kindamoody is now known as Kindamoody|afk
15:58 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
15:59 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
15:59 mode/#code [+o Syloq] by ChanServ
16:36 Kindamoody|afk is now known as Kindamoody
16:42 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [Client closed the connection]
16:42 Syloq [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection closed]
16:42 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has joined #code
16:42 mode/#code [+o gnolam] by ChanServ
16:44 Syloq [Syloq@B4EC54.59F324.016BDA.8CB0A3] has joined #code
16:45 mode/#code [+o Syloq] by ChanServ
16:52 Turaiel[Offline] is now known as Turaiel
17:21 Kindamoody is now known as Kindamoody|afk
17:50
<@Azash>
Question re. inodes and hard linking
17:50
<@Azash>
Do physical files refer to inodes or inodes to physical data?
18:00
<@froztbyte>
neither in full, parts of both
18:00
<@froztbyte>
data on desk exists in blocks
18:00
<@froztbyte>
say you have 16 character blocks, and wanted to store two strings
18:00
<@froztbyte>
and that those two strings were "asdf" and "0123456789abcde"
18:00
<@froztbyte>
with the latter, that'd fill a whole block
18:01
<@froztbyte>
but the former might waste 12 characters in a block
18:01
<@froztbyte>
so what you do instead, is write them like this: {[asdf][0123456789a]}{[bcde][ ]}
18:02
<@froztbyte>
now to keep track of what's where, you invent a thing called an inode
18:02
<@froztbyte>
to say what file is starting where in which block
18:02
<@froztbyte>
so string1 = blocks[0].pos[0:4]
18:03
<@froztbyte>
and string2 = blocks[0].pos[5:16] + blocks[1].pos[0:4]
18:03
<@froztbyte>
make sense?
18:05 Derakon_ [chriswei@31356A.8FA1FE.CF2CE9.D6CF77] has joined #code
18:05 * Derakon_ boggles quietly at some work code.
18:06
< Derakon_>
Somehow I managed to get the nVidia drivers to stop responding.
18:06
< Derakon_>
The displays on this computer flickered like crazy for a few seconds, then the drivers self-recovered.
18:07
< Derakon_>
I'm guessing some kind of threading contention in my drawing code? But it should all be executing in the main thread...
18:07
<@froztbyte>
Azash: oh, also, how files refer to thinks depend on the fs in question
18:07
<@froztbyte>
but the above should hopefully help you understand inodes
18:08
<@froztbyte>
it might be best to read the headers for whichever filesystem you're wondering about
18:10
< Syk>
Derakon_: if you can reproduce it, you might want to send a code sample to nvidia, since that shouldn't happen, no matter what screwery you're doing owO
18:11
< Syk>
however, I do have a reliable way to crash AMD graphics drivers
18:11
< Syk>
step 1: turn on a computer with AMD graphics
18:11
< Syk>
step 2: do nothing whatsoever.
18:11
<@froztbyte>
rofl
18:12 * froztbyte subtly doesn't mention his 6770 working fine in both windoesn't and linux
18:12
< Syk>
you can speed up the process by doing some demanding graphics work, such as moving the mouse or opening the start menu
18:12
< Syk>
froztbyte: doesn't AMD still mouse-flicker?
18:13
<@froztbyte>
I might not have a screen good enough to pick up on that
18:13
< Derakon_>
Syk: unfortunately, untangling the problem from the ~12kloc program it's embedded in would be tricky.
18:13
< Derakon_>
Especially since the code is Python.
18:13
< Syk>
ah
18:13
< Syk>
so it's OpenGL then?
18:13
< Derakon_>
Yeah.
18:14
< Derakon_>
Through a canvas provided by wxWidgets.
18:14
< Syk>
OpenGL on Windows is apparently 'here be dragons' as far as implementations go
18:14
< Syk>
so Nvidia will probably be like 'yeah it does that'
18:14
< Syk>
'don't do that'
18:14
< Derakon_>
That's basically my attitude.
18:14
< Derakon_>
I just have to figure out what "that" is.
18:15
<&ToxicFrog>
Syk: "mouse flicker"?
18:17
< Syk>
cursor curroption
18:17
< Syk>
eg http://i.imgur.com/18ImX.jpg
18:18
<&ToxicFrog>
Aah.
18:18
<&ToxicFrog>
This has not historically been a problem for me on ATI.
18:18
<&ToxicFrog>
(To be fair, it hasn't been a problem on nV either. nV's failure modes have been much more dramatic.)
18:19
< Syk>
apparently it's more prone to happen on crossfire setups
18:19
<&ToxicFrog>
froztbyte: what you describe there is block suballocation, which not all filesystems (and none of the extN filesystems) support.
18:19
< Syk>
but it's apparently been an issue for years
18:19
<&ToxicFrog>
Syk: yeah, I've never used crossfire/SLI
18:19
< Syk>
my main AMD issues were 10.2, I think
18:20
< Syk>
and the wonderful bug that made BF:BC2 map loading times be 5-10 minutes
18:20
<@froztbyte>
ToxicFrog: yeah, it's an imperfect description :/
18:20
< Syk>
so I sold my 5770 to a bitcoiner :D
18:20
<@froztbyte>
ToxicFrog: thus rather saying "go check the headers"
18:21 * Derakon_ mutters at the mosaic window.
18:21
< Derakon_>
Why are you drawing one thing and displaying something different?
18:21
< Derakon_>
You are demonstrably changing the display, but there's no way AFAICT that that particular rectangle should be drawn the way you're drawing it.
18:22
<&ToxicFrog>
froztbyte, Azash: depending on what's meant by "physical file" - a directory is a list of (filename,inode) pairs. An inode contains all of the metadata about a file or directory, along with information about where its actual data is located on disk.
18:22
<&ToxicFrog>
A hardlink creates a new filename somewhere that refers to the same inode.
18:23 * froztbyte has had to reconstruct both xfs and ext3 by hand before
18:23
<&ToxicFrog>
So, same metadata (permissions, timestamps, ownership), same data (data blocks on disk), but referred to from multiple places.
18:23
<&ToxicFrog>
(this is, at least, true for extN. Can't speak for other filesystems.)
18:23
<@froztbyte>
'twas quite painful
18:23
<@froztbyte>
made worse by having fairly little clue about it at the time :(
18:23
< Derakon_>
...great, and now both OpenGL windows have stopped updating. WTF.
18:24
< Derakon_>
This version of the program is supposed to be more reliable than the old one! Not less!
18:26
<@Azash>
Thanks frozt and TF
18:26
<&ToxicFrog>
And to answer the original question, the physical data (== data blocks) do not refer to the inodes, they're just chunks of opaque bytes to the fs.
18:26
<@Azash>
TF got what I was asking
18:26
<&ToxicFrog>
(although there are experimental filesystems that use bidirectional links everywhere where the data blocks do refer to the inode-equivalents)
18:27
<&ToxicFrog>
Syk: I used a 5770 for ages without trouble, later upgraded to a 6770 (Symbol's using the 5770 now). A 7770 is in the pipeline.
18:29
< Syk>
ToxicFrog: on windows or linux?
18:30
<&ToxicFrog>
Mostly windows - the linux machines get whatever's on the motherboard, generally - but even on linux I've generally had fewer problems with ATI.
18:30 * Syk has PTSD flashbacks of installing AMD drivers manually on Linux
18:30
< Syk>
really? :S
18:31
< Syk>
every time I've used the binary ATI drivers, it's pain
18:31
< Derakon_>
Ah, the problem was calling xrange with non-integer arguments in the paint function of one of the windows.
18:31
< Syk>
I had to force overclock my 5770 because it underclocked the 2D clock so low that the other screens would flicker
18:31
<&ToxicFrog>
Oh, absolutely. But I've had just as bad experiences with the binary nV drivers. And the ATI cards have given me less trouble with OSS drivers.
18:31
< Derakon_>
Which caused that function to blow up, leaving the OpenGL state invalid for the other window's operations.
18:31
< Derakon_>
(I think)
18:32
< Syk>
the binary nv drivers are pretty good, at least these days
18:32
< Syk>
since steam for linux came out, leaps and bounds
18:32
< Syk>
the only problem I have is with my displayport adapter
18:32
< Syk>
that freaks out every so often :(
18:33
< Syk>
nvidia just need to put like, four goddamn DVI-D plugs on their cards
18:33
< Syk>
instead of 2x DVI and HDMI and DP
18:34
< Syk>
the dual link DVI on modern Nvidia cards carry audio, all you need is a DVI->HDMI adapter
18:34
< Syk>
which really, they can put in the box :/
18:35
<&ToxicFrog>
Oh, that reminds me, I need either a DVI splitter or an HDMI capable monitor~
18:36
<&ToxicFrog>
Or an HDMI->DVI adapter, which I may already have
18:36
<&ToxicFrog>
(I have two DVI monitors. The new card has one DLDVI, one DP, and two HDMI ports)
18:36
< Syk>
...ew
18:36
< Syk>
two HDMI ports, seriously
18:36
<&ToxicFrog>
Yeah, I'm not sure what the use case is there
18:37
< Syk>
HDMI is cheaper probably
18:37
<&ToxicFrog>
Eyefinity with 40" televisions~
18:37
<&ToxicFrog>
Hmm, probably. I have to say I like HDMI connectors way more than DVI.
18:39
< Syk>
I don't :/
18:39
< Syk>
well
18:39
< Syk>
I like HDMI cables
18:39
< Syk>
I don't like HDMI connectors
18:39
<&ToxicFrog>
HDMI has the same problem as VGI, i.e. it's thousands of fiddly little pins and it's impossible to figure out which way around it goes without looking
18:39
<&ToxicFrog>
Er
18:39
<&ToxicFrog>
DVI does, not HDMI
18:39
< Syk>
friend once got the little metal HDMI bit stuck in his GPU
18:39
< Syk>
so he had to get down with pliers to pull it out
18:39
<&ToxicFrog>
HDMI you just try it both ways around until it works.
18:43
<&ToxicFrog>
Of course, DVI is kind of crippled by needing to be backwards compatible with VGA as well.
18:43
<&ToxicFrog>
But, yeah, in general I'm in favour of ditching slow parallel interfaces with shitloads of pins in favour of fast serial links.
18:44
<&ToxicFrog>
See also my preference for USB over serial and parallel ports and SATA and SAS over IDE and SCSI.
18:45
< Syk>
well
18:45
< Syk>
technically
18:45
< Syk>
USB is serial but in a different plug, and SATA is SCSI with a different plug :P
18:45
< Syk>
(highly generalised, of course)
18:45
< Derakon_>
Hey, random question for you all: when I'm working on this program, sometimes one of its threads will hang and become unresponsive; when I close the program, resources held by that thread are not released.
18:45
<&ToxicFrog>
A different plug and different signaling.
18:45
< Derakon_>
Is there some way to force that thread to close, short of using the Task Manager (or *nix equivalent), which is what I have to do now?
18:46
<&ToxicFrog>
It looks the same in software, but from a "how much will I hate this connector" perspective it's completely different.
18:46
< Syk>
heh true
18:46
<@froztbyte>
Derakon_: why does the thread hang?
18:46
< Syk>
although I do hate USB
18:46
< Syk>
USB timeouts can go suck a metaphorical
18:46
< Derakon_>
froztbyte: typically because I have a bug somewhere.
18:46
<@froztbyte>
haha
18:46
< Derakon_>
So e.g. rendering code got stuck.
18:46
< Derakon_>
Or something else happened.
18:46
<&ToxicFrog>
Derakon_: so, you're sending SIGTERM or something to the process and all the other threads are dying properly and that one isn't?
18:46
<&ToxicFrog>
(and it's a thread, not a subprocess?_
18:47
< Derakon_>
Um, I don't know exactly what the shutdown procedure does, but basically. And yeah, no subprocesses.
18:49
<&ToxicFrog>
Is the enclosing process still running, waiting for that thread to exit?
18:49
< Derakon_>
That's what it looks like in task manager -- you still see pythonw.exe running.
18:49
<&ToxicFrog>
Is the thread set as a daemon thread?
18:49
< Derakon_>
And when I kill that, the resources are freed.
18:50
< Derakon_>
All threads I create manually are daemon threads.
18:50
< Derakon_>
And all threads created by wxWidgets ought to inherit the parent's status AIUI.
18:50
<&ToxicFrog>
Huh. And that's the only thread still running?
18:50
<&ToxicFrog>
Because if the only threads left are daemon threads the problem should exit().
18:50
< Derakon_>
Given that at this point I have very little visibility into the state of the program, it's hard to say.
18:50
<&ToxicFrog>
...this conversation sounds familiar
18:50
< Derakon_>
And yeah, that's what normally happens.
18:51
< Derakon_>
We had a similar discussion awhile back when I was trying to get my program to shut down cleanly at all.
18:51
< Derakon_>
Now it always shuts down cleanly unless something goes wrong -- but I can't guarantee that I find every bug.
18:52
< Derakon_>
And requiring my users to sometimes bring up the task manager so they can start the program (since some resources are things like COM and network ports) is bad.
18:52
< Derakon_>
In the worst case the program appears to shut down cleanly (i.e. all windows destroyed) but is still lurking invisibly in the background.
18:53
<&ToxicFrog>
Unpleasant workaround: have the shutdown code go through its normal procedure, and then if there are any threads left, call signal(KILL) instead of exit().
18:53
<&ToxicFrog>
Also possibly have it dump a complete list of threads and their properties, including daemonization status.
18:54
< Derakon_>
The last thing the main module does is os._exit(0)
18:54
< Derakon_>
I don't even know how to get a list of active threads.
18:54
< jeroud>
Maybe run some kind of cleanup logic at startup?
18:54
<&ToxicFrog>
Yeah, IIRC by default that exits the main thread and blocks until the only threads left are daemonized
18:54
<&ToxicFrog>
stand by
18:54
<&ToxicFrog>
threading.enumerate()
18:55
<&ToxicFrog>
Something like print [(th,th.isDaemon()) for th in threading.enumerate()] # untested
18:56
< Derakon_>
Yeah, I just added something similar.
18:56
< Derakon_>
I sure have a lot of threads in this program. O_o
18:56
<&ToxicFrog>
So, just before you call exit(), do that and see if there are any nondaemonized threads left.
18:56
<&ToxicFrog>
Maybe slap a filter on that map so it only shows nondaemonized threads.
18:58
< Derakon_>
Even a normal shutdown procedure has non-daemon threads.
18:58
< Derakon_>
But I guess the os._exit(0) is getting them.
18:58
< Derakon_>
Unfortunately they have names like "<Thread(Thread-90, started 4624)>"
18:59
<&ToxicFrog>
Does python have a debugging library built in? Can you get a stack from each thread?
18:59
< Derakon_>
I honestly don't know.
18:59
<&ToxicFrog>
...and the true PID that corresponds to each thread?
18:59
< Derakon_>
I was just thinking of rigging that up for threads I manually make.
19:00
< Derakon_>
Hm, there are discussions about this.
19:00
<&ToxicFrog>
Looks like you want the 'traceback' module?
19:00
<&ToxicFrog>
(I would prefer extracting the stack from outside; then it works even on mishaving threads you don't create)
19:01
< Derakon_>
(Yeah)
19:01
< Derakon_>
sys._current_frames() might have what I want.
19:01
< Derakon_>
traceback is implicitly in the current thread AFAICT, so no way to access stacks from "outside".
19:02
<&ToxicFrog>
Aah.
19:03
< Derakon_>
Oh, interesting. Printing threadobject.__dict__ gets me useful debugging info.
19:03
<&ToxicFrog>
w00t
19:03
< Derakon_>
Of course, this doesn't solve my original problem of "what if a bug I haven't fixed because I don't know about it triggers and the program doesn't exit cleanly?"
19:04
< Derakon_>
But it will make fixing the bugs that I do encounter much easier.
19:04 * ToxicFrog nods
19:04
<&ToxicFrog>
Also, if you can find a reliable way of detecting when it's about to not exit cleanly - granted that's a big "if" - you can SIGKILL as a failsafe.
19:05
< Derakon_>
I thought I was SIGKILLing all the time with os._exit(0)?
19:06
< Derakon_>
I guess I could do os.kill(os.getpid(), <whatever value SIGKILL has>)
19:07
<&ToxicFrog>
9,
19:07
< Derakon_>
Thanks.
19:07
< Derakon_>
Oddly doesn't seem to be an os.SIGKILL or signal.SIGKILL constant.
19:08
<&ToxicFrog>
and _exit() just calls _exit(2) in C, which makes a system call, which causes the process to shut down. (or possibly it calls exit(3), which does some extra cleanup).
19:08
<&ToxicFrog>
How this is implementated varies, but generally it does not involve SIGKILL (or other traditional shutdown signals like SIGTERM)
19:08 Kindamoody|afk is now known as Kindamoody
19:09
< Derakon_>
Okay, well, we'll leave in that modified shutdown procedure and see if it makes a difference. Thanks for the help.
19:10
<&ToxicFrog>
Also, signal.SIGKILL is defined on my python install.
19:10
< Derakon_>
Hm, didn't see it in the docs.
19:10
< Derakon_>
Yeah, doesn't exist in Windows.
19:10
<&ToxicFrog>
Oh
19:10
<&ToxicFrog>
On windows I have NFI if signals even work
19:11
<&McMartin>
Windows does not have signals.
19:11
< Derakon_>
Great.
19:11
<&ToxicFrog>
I thought from your earlier comments that you were targeting *nix
19:11
<&McMartin>
Astonshingly, Unix-specific constructs do not exist on non-Unix OSes!
19:11
< Derakon_>
While the code should be cross-platform compatible, our primary target system is Windows.
19:11
< Derakon_>
Hence the discussion of task manager etc.
19:11
<&McMartin>
However, you should also be able to attach WinDbg to it though that's unlikely to give useful information at the code level
19:12
<&McMartin>
It might show deadlocks or resource contention with !locks though
19:12
<&ToxicFrog>
McMartin: to be fair, python is often pretty good at mapping concepts an OS doesn't have to ones it does, and it looks like signal is in fact available on windows
19:13
<&McMartin>
My guess is that it will map both TERM and KILL to "get process handle, call TerminateProcess()"
19:13
<&ToxicFrog>
With the restrictions that you can only use SIGABRT, SIGFPE, SIGILL, SIGINT, SIGSEGV, and SIGTERM, which it presumably maps to some useful equivalent in windows.
19:13
<&ToxicFrog>
(KILL is not available)
19:15
< Derakon_>
AIUI making use of signal in that respect would require the threads to have handlers for those signals, yes?
19:17
<&McMartin>
Generally speaking, you don't handle TERM and you *can't* handle KILL.
19:18
<&ToxicFrog>
The default for all of those is to exit the program, and I'm pretty sure SIGABRT and SIGINT correspond to whatever happens in windows when you press ctrl-break and ctrl-c in the terminal.
19:18
<&ToxicFrog>
SIGFPE, SIGILL, and SIGSEGV are all programming errors (floating point exception, illegal instruction execution, and out of bounds memory access, respectively); I don't know how/if windows distinguishes between these but I'm pretty sure it has some kind of handler mechanism available for them.
19:19
<&ToxicFrog>
SIGTERM probably corresponds to whatever you do when you "end process" in the task manager.
19:21
< Derakon_>
So in short, put "os.kill(os.getpid(), signal.SIGTERM)" at the end of the program, if running in Windows.
19:24 * Derakon_ gives that a shot, forces the program to barf, eyes as all windows stay open except for the one that is supposed to trigger program exit.
19:25
<&ToxicFrog>
:(
19:35
< RichyB>
If you manage to get SIGILL, you've by default probably done something quite interesting.
19:36
< RichyB>
The only boring way I can think of to get that is to accidentally write through an object's vtable pointer?
19:36
< RichyB>
Otherwise you presumably tried to call an incorrectly-initialised function pointer, or maybe you wrote a faulty JIT?
19:37
< RichyB>
Oh, and SIGFPE gets sent under some Unixes (at least x86 Linux, I think FreeBSD and OS X as well) on integer division by zero, too.
19:50 Kindamoody is now known as Kindamoody[zZz]
19:56 * Derakon_ bahs, kind of wants Python to warn him when he does "if funcname:" instead of "if funcname():"
19:57
<&McMartin>
RichyB: Jump into the middle of an instruction?
19:57
< RichyB>
McMartin: but why would you do that?
19:57
<&McMartin>
Bump the wrong pointer, I guess
19:58
<&McMartin>
Walk off the end of a dispatch table
19:58
< [R]>
Derakon_: no lylint?
19:58
< [R]>
pylint*
19:58
< RichyB>
Corrupt a dispatch table seems most likely.
19:58
< Derakon_>
[R]: no.
19:58
<&McMartin>
RichyB: Gosh
19:58
<&McMartin>
I'm not sure I can decide between "memory corruption bug" vs. "walk off the end of a buffer" bug for "most likely" :x
19:58
< RichyB>
But you really have to overwrite a pointer inside a dispatch table with something that's also a valid pointer (just not to valid instructions) in order to not SIGSEGV. ;)
20:00
< RichyB>
McMartin: not all undefined behavior has equally probably outcomes. ;P
20:00
< Derakon_>
"TypeError: addImage() takes at least 4 arguments (5 given)".
20:01
< Derakon_>
I'm sure I'm doing something silly wrong, but that error message amuses me.
20:01
< RichyB>
I suspect that memory corruption bugs that happen to hit a dispatch table are more likely to write completely out-of-bounds values that will cause sigsegv than pointers to data.
20:01
< RichyB>
Also, jumping into data is now SIGSEGV if you have a CPU that supports writable-XOR-executable memory.
20:02
<&McMartin>
I'm thinking of a ++ of some kind
20:02 * Derakon_ vanishes
20:03 Derakon_ [chriswei@31356A.8FA1FE.CF2CE9.D6CF77] has quit [[NS] Quit: leaving]
20:06
<&ToxicFrog>
RichyB: I believe the standard term is DEP, Data Execution Prevention.
20:10
< RichyB>
Eh, "standard"
20:10
< RichyB>
OpenBSD called it W^X when they first implemented it like half a decade before MS did.
20:11
< RichyB>
"DEP" is just MS's name for it. :P
20:13
<@Alek>
not DERP?
20:15
< [R]>
No, that's their inter-communication system.
20:19
<&ToxicFrog>
Oh, I thought that was the processor term for it? I'm mostly familiar with it from Linux, where I generally see it called NX.
20:22
<&ToxicFrog>
Aha. NX is actually what it's called on the processor.
20:22
< RichyB>
Hm, I don't know if the name "DEP" maybe comes from CPU manufacturers.
20:22
< RichyB>
Okay, so no it doesn't.
20:22
< RichyB>
Ah yes. Intel calls it "the NX bit" in all of its promo literature, I think?
20:23
<&ToxicFrog>
AMD introduced it as the NX bit (CPUID capability flag "nx") in AMD64.
20:23
<&ToxicFrog>
Intel then implemented it from later P4s onwards and, AFAIK, uses the same name.
20:25
< RichyB>
Interesting. ohhh yes.
20:25
< RichyB>
AIUI, OpenBSD implemented use of it first on amd64 and called their implementation "W^X".
20:26
< RichyB>
Their thing is a constraint that you can either mmap/mprotect a given page with MAP_WRITE or with MAP_EXEC but not both simultaneously.
20:26
< RichyB>
Inconvenient (but not impossible) for writing a JIT, downright handy for your stack to stop being executable. :)
20:27
<&McMartin>
No self-modifying code~
20:27
<&ToxicFrog>
In hardware, AIUI, it's an isolated bit; if set code cannot be executed from that page, but it doesn't imply anything about writeability.
20:27
<&ToxicFrog>
I'm not hugely familiar with amd64, though.
20:27
< RichyB>
Indeed.
20:28
< RichyB>
write-XOR-execute just happens to be how the OBSD kernel chose to use it.
20:29 Turaiel is now known as Turaiel[Offline]
21:47
< ErikMesoy>
I would like a scapegoat for stupidly simplified inventory system from XCOM:UFO to XCOM:Remake. Something to do with inheritance or Java or XML or the like. :P
21:48 gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [[NS] Quit: Das Reboot]
21:48 Turaiel[Offline] is now known as Turaiel
21:48
<&McMartin>
ErikMesoy: Inventory Tetris Is Bad (tm)
21:48
< ErikMesoy>
The original game let you bring 80 items on a mission, and soldiers could stuff things in their hands, pockets, backpacks, etc. The remake lets you bring a number of items equal to a multiple of the number of soldiers. Read: a soldier can carry exactly one grenade OR one medikit OR one targeting scope.
21:49
< ErikMesoy>
In addition, each soldier gets a weapon and an armor.
21:49
<&McMartin>
I was complaining about that latter just yesterday.
21:49
<&McMartin>
I have been corrected on that one.
21:49
<&McMartin>
It is clear that the S.C.O.P.E. is not actually a scope.
21:49
< ErikMesoy>
Ah.
21:49
<&McMartin>
Becuase it continues to work full-force if you switch from your sniper rifle to your pistol.
21:49
< ErikMesoy>
Well, I stand by the complaint about soldiers unable to carry more than one grenade.
21:50
< ErikMesoy>
If the previous game had Inventory Tetris, I dub the remake as having Java Inventory.
21:51
< ErikMesoy>
You have a Soldier, who has a Soldier.Weapon, Soldier.Armor and Soldier.Misc.
21:51
<@Azash>
ErikMesoy: The typical approach is to blame agile practices, I think
21:51
< ErikMesoy>
Couldn't I at least get an opportunity for the soldier to GET ANOTHER GRENADE by going back to the dropship?
21:53 gnolam [lenin@B19C04.C4B928.3477B4.1341ED] has joined #code
21:53 mode/#code [+o gnolam] by ChanServ
21:54
< ErikMesoy>
Also it seems that XCOM:Remake has also decided to remove Airplane Tetris
21:54
< ErikMesoy>
now you can only send a single interceptor aircraft to attack a UFO
21:54
< ErikMesoy>
was it so terrible to send two aircraft after one target?
21:55
<&McMartin>
The geoscape is pretty unrecognizable now
21:55
<&McMartin>
I'm only four or five missions in but so far the actually-commanding-the-squad part is about five times better than the original
21:55
<&McMartin>
(PS death to TU-based systems)
21:56
< ErikMesoy>
Also lost with the inventory tetris: the ability for one soldier to pick up another soldier's doodad
21:56
<&McMartin>
I'm of two minds about this whole class system thing
21:56
< ErikMesoy>
Sorry, your stunner is dead, your grenadier cannot switch to the stunning device, no captured aliens for you!
21:56
<@Alek>
Tits Up systems?
21:56
<&McMartin>
(Run & Gun + Lightning Reflexes <3)
21:56
< ErikMesoy>
Alek: Time Unit
21:56
< ErikMesoy>
So now stunning aliens to capture them alive becomes a feature of a SOLDIER rather than an item/weapon.
21:57
<&McMartin>
If you have to blame something for that, blame MMOs
21:57
<@gnolam>
Alek: a.k.a. AP.
21:58 * Alek shrugs.
21:58
<@Alek>
there are some games I like that for.
21:58
< RichyB>
What're the alternatives to AP?
21:58
<@Alek>
and some I don't.
21:58
<@Alek>
Richy: realtime. XD
21:58
<@gnolam>
RichyB: in this case, it's "you get two moves".
21:58
<@Alek>
also, turn-based.
21:58
<&McMartin>
Yeah, The new one uses something closer to AP
21:58
<@gnolam>
Personally, I have no problems with AP.
21:58
<&McMartin>
The thing about TUs is that one turn involved 60-80 of them
21:58
<&McMartin>
And they were horrendously awkward
21:59
<@Alek>
a variant of AP is ATB.
21:59
< ErikMesoy>
Well, it was 4 to walk a tile so more like 15-20 in practice
21:59
<@gnolam>
ATB?
21:59
<&McMartin>
The new X-COM's interaction model between moving and shooting is a lot more nuanced.
21:59
<&McMartin>
Final Fantasy 7
21:59
<@Alek>
Active Time Battle. Final Fantasy. XD
21:59
<@Alek>
wasn't it introduced BEFORE 7?
21:59
< RichyB>
You could do slightly-silly things like walk out a door, fire a pistol snap shot, then walk back in again apparently-instantly.
21:59
<&McMartin>
I've never seen an ATB-like system where HAste didn't break the game in half.
21:59
<&McMartin>
RichyB: Their fault for not reserving TUs for a reaction shot~
22:00
<@gnolam>
I wouldn't call New X-COM's model "nuanced".
22:00
<&McMartin>
Speaking of reaction shots, I'm liking the new overwatch model
22:00
<&McMartin>
gnolam: Well, OK. Unlike the original, somebody moving quickly is harder to hit with a reaction shot than someone moving slowly.
22:00
<@gnolam>
"Streamlined", rather. It does come with a cost to tactical depth.
22:00 * ErikMesoy also complains of the inability of soldiers to point out targets for one another.
22:01
< ErikMesoy>
Now you can't say "behind that tree". Each soldier can only shoot targets which that soldier sees.
22:01
<&McMartin>
ErikMesoy: Squadsight is the second promotion for Sniper class.
22:01
<@gnolam>
Oh, how I abused the hell out of that one.
22:02
< ErikMesoy>
McMartin: Yes, but I don't want promoted snipers. I want spotters, and I want to saturate a general direction with fire that can be as inaccurate as it likes because it's covering an area.
22:02
< RichyB>
gnolam: couple soldiers on a roof with bazookas, rest of the squad exploring. Blast the general vicinity of anything that any of the scouts spot?
22:03
< ErikMesoy>
Also, I want an explanation of just how the heck ammo works, because the... thing... is showing. What's the term for it when abilities exist in a void, unrelated to one another or the base system?
22:04
< ErikMesoy>
Suppression fire is largely unrelated to ammo.
22:04
< ErikMesoy>
Suppression fire is mostly a cooldown-based ability.
22:04
<&McMartin>
I believe the phrase you are looking for is "My immersion ;_;"
22:04
< ErikMesoy>
It's painfully visible that this is a game with Clickable Abilities That Do Cool Things.
22:04
< ErikMesoy>
Yeah, my immersion. ;_;
22:05
< ErikMesoy>
As opposed to a game that models (heavily simplified) small squad combat.
22:05
<&McMartin>
My general attitude towards remakes is "If you want the original you know where to find it"
22:05
<&McMartin>
So I'm unimpressed~
22:05
<&McMartin>
But then, I soured on the originals around the third game because the interface had finally collapsed under its own weight
22:06
< RichyB>
X-COM Apocalypse was still beautiful for two things, though.
22:06
< RichyB>
The destroyable terrain, and the retro-future aesthetic.
22:07
< RichyB>
Ohhhhh that retro-future aesthetic. ?
22:08
< ErikMesoy>
Some more my immersion ;_; comes from the reaction shots. Guy stepping out of cover to take advantage of reaction shot, okay. Guy making multiple shots, well, automatic weapon. Guy making three reaction shots with revolver-like and lowering it after each shot due to recoil... ehh...
22:11
< RichyB>
ToxicFrog: seen this? http://terralang.org/
22:12
< RichyB>
The name alone - "Terra, a low-level counterpart to Lua" - is causing me to facepalm because it is such a good pun.
22:24
<&ToxicFrog>
I haven't. Will investigate.
22:25
<&ToxicFrog>
McMartin: the issue is, the original has a terrible UI and some rather alarming bugs
22:25 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
22:25
<&ToxicFrog>
It is not entirely unresonable to want a remake that scratches the same itch with more polish rather than a reboot that takes the same concept in a different direction.
22:26
<&McMartin>
That's Xenonauts~
22:26
<&McMartin>
But more seriously, I tend to consider inventory tetris a thing that needs to be excised, and that may be a fundamental difference
22:27
<&McMartin>
I seriously found DXIW's awful inventory code less intrusive than DX1's.
22:27
< RichyB>
DXIW was an interesting compromise.
22:27
< RichyB>
Fake inventory tetris.
22:27
<&McMartin>
And one piece of accidental inventory tetris.
22:27
<&McMartin>
In that they forgot at one point that they had removed multitools from the game and so lockpicks didn't quite stack properly
22:27
< RichyB>
It *looks* like inventory tetris, but the game automatically rearranges everything in your pack while you're busy doing other things.
22:28
<&ToxicFrog>
X-COM didn't really have "inventory tetris" in the Diablo sense, though, because all the inventory slots are too small for that
22:28
<&McMartin>
The Worst I've faced for this was Might and Magic 6
22:28
<&ToxicFrog>
It was more "legs and shoulders can only hold ammo and grenades, belt can hold ammo, grenades, and small arms, backpack can hold anything"
22:29
<&McMartin>
OTOH, it let me set up All The Drugs
22:29
<&McMartin>
Which I should really set up as a sequence of images with captions
22:29
<&ToxicFrog>
And it would be possible to streamline that a lot UI-wise without removing it entirely.
22:29 * TheWatcher eyes this, finally, finally understands how script loading and calling works in the dark engine
22:30
<@TheWatcher>
(and, of course, now I see it, it's all so simple)
22:31
<&McMartin>
LEVEL UP
22:32
<&McMartin>
Yeah
22:32
<&ToxicFrog>
RichyB: ok this looks pretty boss
22:33
<&ToxicFrog>
And may have professional uses for me
22:33
< RichyB>
I'm especially liking the "use this syntax to splice values in".
22:33
< RichyB>
That looks like it could very easily turn into runtime-code-specialisation as a core language feature.
22:34
<&McMartin>
Heh
22:34
<&McMartin>
That splice thing is what (+ +) and (- -) did in I7
22:34
<&McMartin>
(- -) is to embed I6 code, and then (+ +) bumps you back into I7 for things that are more I7-y
22:37
<&McMartin>
I need to play more XCOM -_-
22:37 * McMartin has not had the brain for it lately
22:38
<&ToxicFrog>
So they've reimplemented (defmacro) is what you're saying~
22:39
< RichyB>
ToxicFrog: so sue me, I'm not used to multi-stage programming. :P
22:40
<&ToxicFrog>
This is actually my first expose to the term, but based on reading the linked page it's a fancy name for "macros used for runtime program specialization"
22:40
< RichyB>
That's what Terra pretty much is, right? A fairly low-level multi-stage programming language with immediate access to a running HLL.
22:41
< RichyB>
Right. Macros that you can run at runtime if you happen to want specialization.
22:41
<&ToxicFrog>
Rather, macros that result in different code generation depending on the requirements of this run.
22:41
< RichyB>
It might be "multi-phase" rather than "multi-stage"? I'm not sure.
22:42
<&ToxicFrog>
(this is to be fair a different focus than the traditional lisp one, which tends to think of macros as a way of optimizing programmer time, i.e. creatingDSLs optimized for the program you're writing)
22:42
< RichyB>
I'm pretty certain that I once saw the term somewhere else before but didn't really pay attention to the possibilities at the time.
22:43 Vornicus [vorn@31356A.68201E.EB0611.E0094F] has joined #code
22:43 mode/#code [+qo Vornicus Vornicus] by ChanServ
22:45
<&McMartin>
ToxicFrog: I often consider LISP macros an object lesson in why you can't trust LISP hackers with a macro facility
22:47
< RichyB>
What goes wrong?
22:48
<&McMartin>
"Creating DSLs optimized for the program you're writing" turns out to be a maintainability nightmare unless you're a lot better than the average skill of people who attempt this
22:51
<@Reiv>
So, Pivot Tables
22:51
<@Reiv>
I want to count the number of ... oh wait nevermind I know how
22:51 * Reiv goes add a custom column to the initial report, ha
22:51
<@froztbyte>
hee
22:52
<@Reiv>
Thank You, Dog!
22:52
<@froztbyte>
rubber IRC debugging
22:54
< RichyB>
Also: propaganda! http://www.haskell.org/haskellwiki/Image:Haskell-logo-revolution.png
22:55
<@Reiv>
OK real question now
22:55
<@Reiv>
COUNTIF(foo,"More than 20 but less than 30")
22:55
<@Reiv>
How do?
22:55
< RichyB>
Language/environment?
22:56
<&jerith>
Looks like SQL.
22:56
<@froztbyte>
excel
22:57
<&McMartin>
RichyB: Heh
22:57
<&McMartin>
That said
22:57
<&McMartin>
Now we need Haskell/HL2 crossovers
22:57
< RichyB>
Quite.
22:57
< RichyB>
I think that HL2 is a large part of the inspiration for that.
22:57
<@froztbyte>
I do believe .. yes, that
22:59 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:01
<~Vornicus>
Wait
23:01
<~Vornicus>
Haskell/Half Life 2 crossovers?
23:02
<&McMartin>
It has not gone unnoticed that the Half-Life lambda logo is not unlike a hand holding a crowbar aloft.
23:03
< Turaiel>
o.o
23:05
<~Vornicus>
...were you being serious?
23:05
<~Vornicus>
Or rather... did I guess the acronym right, or are you just playing off my line?
23:05
<&McMartin>
You did guess the acronym right
23:06
<~Vornicus>
I can't even be flippant any more
23:06
<&McMartin>
Because the linked image was someone wielding a lambda like some kind of crowbar tonfa
23:06
<~Vornicus>
...so it is
23:06
<&McMartin>
So no, you don't get be flippant when you're directly on point~
23:07
<@Tamber>
"nail" "head" "lambda-shaped hammer"
23:07
<@Alek>
the worst Inventory Tetris I've seen was EYE.
23:08
<&McMartin>
At some point where I have more mindwidth than sanity I need to play that
23:09
<~Vornicus>
Reiv: one moment
23:12 ErikMesoy is now known as ErikMesoy|sleep
23:12
<~Vornicus>
(they missed a good opportunity in the countif et al criteria thing. They could have made a syntax which is basically a partial, but they didn't.)
23:13
< RichyB>
Alek: EEEEEAAAAAGH
23:13
< RichyB>
EYE's fucking inventory tetris.
23:13
< RichyB>
The thing that bugs me most about EYE's inventory tetris is that the trailers on Steam show characters running around swapping between guns.
23:14
< RichyB>
In-game, you can *not* carry more than one gun larger than a pistol.
23:15
<~Vornicus>
Reiver: you might get good mileage off =COUNTIFS(foo,">20",foo,"<30") -- I think that's a newer function though, so it may not work if you're running excel 2003 or earlier
23:29
<@Alek>
I'm hoping by now there's mods out there that can change EYE's inventory system.
23:30
<@Alek>
at least give us upgrades.
23:30
<@Reiv>
Vorn: 2007
23:30
<@Reiv>
I actually went for the far more hilariously simplistic approach
23:30
<@Reiv>
Y'see, I also have the column =COUNTIF(foo,">30")
23:31
<@Reiv>
So my range ended up being =COUNTIF(foo,">20")-bar
23:33
<~Vornicus>
haha
23:34
<@Reiv>
Thought you'd like it~
23:35 RichyB [richardb@58734C.5279B7.EA7DF8.107330] has quit [[NS] Quit: >:3 This is BunThulhu. Copy him into your quit message to help him take over the Internet.]
23:35
<~Vornicus>
Hell, it works
23:36
<@Reiv>
McMartin: I would have preferred it if the arm were in place of the leg.
23:43
<&McMartin>
Reiv: that would indeed make it even more HL2y
23:43
<&McMartin>
Also, looks like it was [R] who recommended it, so:
23:44
<&McMartin>
I've been poking at designing my resource system; turns out PhysicsFS doesn't solve the part that's what I need solved, but the part I need to solve (and I think I'm most of the way there) can be readily configured to talk to PhysicsFS
23:44
<@Reiv>
It would then be 'an arm gripping a crowbar' which would be lovely~
23:44
<&McMartin>
So I can probably make that be a plugin-like thing.
23:45
<@Alek>
hm. no mods. but the game got an update last summer, so maybe it's playable now.
23:46
<&McMartin>
(What I need is sensible management of loading and unloading resources, and access to loaded resources that let the other components work with it. Tying this through the SDL_RWops is working fairly well, but I expect I'm going to have to require the equivalent of "you have to have this thing mmapped" so that you don't try to seek in a compressed file or something)
23:46
<&McMartin>
(But it also looks like I can unload a file resource right after parsing for images, so that's simple enough. I bet music will need to stay open though.)
23:51
<@gnolam>
Alek: EYE?
--- Log closed Wed May 15 00:00:59 2013
code logs -> 2013 -> Tue, 14 May 2013< code.20130513.log - code.20130515.log >

[ Latest log file ]