code logs -> 2010 -> Wed, 01 Dec 2010< code.20101130.log - code.20101202.log >
--- Log opened Wed Dec 01 00:00:06 2010
--- Day changed Wed Dec 01 2010
00:00
< Alek>
that's what the alt key and numpad are for. :P
00:00
< AnnoDomini>
I'm on Debian 5. What packages do I need to download for Python development?
00:00
< Alek>
or an alternate keyboard map.
00:01
< Alek>
come on, I'm sure somewhere there's an APL keyboard map for Windows that you can plug into the "input languages" section for hot-switching.
00:02 * AnnoDomini sees there's a Python plugin for Netbeans.
00:03
< AnnoDomini>
aptitude returns a huge list of python packages.
00:04
<@McMartin>
Argh, debian
00:04
<@McMartin>
Debian's python packages are retardedly organized.
00:04
<@McMartin>
My guess is going to be python26, and the things it probably recommends on that.
00:04
<@McMartin>
python27 might also exist.
00:05
< AnnoDomini>
I think 26 is only on sid. I see lots of 24 and 25 packages.
00:05
<@McMartin>
Oy.
00:06
< AnnoDomini>
Yeah, lenny has python-dev (2.5.2-3) as the default if I understood their website correctly.
00:07
<@McMartin>
2.6 is years old.
00:08
<@McMartin>
minor revisions in Python are basically major revisions in other compilers, so Debian is two revisions behind.
00:08
<@McMartin>
2.5 is *okay*, but 2.7 is the best dev environment now since it includes the backports of Python 3 techniques.
00:08 kwsn [kwsn@Nightstar-ca9721ae.dyn.centurytel.net] has joined #code
00:08
<@McMartin>
2.5.2.
00:08
<@McMartin>
What the shit
00:09
<@McMartin>
That's 3 bugfix patches behind.
00:10 * McMartin checks to see if 2.5.x has curses bindings.
00:10
<@McMartin>
Looks like. http://docs.python.org/library/curses.html
00:11
<@McMartin>
... also, http://docs.python.org/howto/curses.html
00:13
< AnnoDomini>
Do I just need python2.5-dev, or do I need to install some other packages?
00:16
< AnnoDomini>
Hmm. Okay, Hello World compiles and runs.
00:16
<@McMartin>
Just runs, actually. Python's an interpreted language.
00:16
<@McMartin>
Looks like os.curses is part of the standard distribution though
00:17
< AnnoDomini>
Trying to import curses and initialize it gives me "Error opening terminal: unknown.".
00:18
<@McMartin>
Are you doing it from the interactive loop or from a separate script?
00:18
< AnnoDomini>
I don't know.
00:20
< AnnoDomini>
http://pastie.org/1336995 <- I'm trying to run this.
00:22
< celticminstrel>
That looks fine to me...
00:31
< AnnoDomini>
Some googling reveals that it might not know what terminal to use.
00:35
< gnolam>
Dear Sketchup: Go fuck yourself and your eternally unfixed face creation bugs. Sincerely, gnolam.
00:39 Attilla [Some.Dude@Nightstar-d0c6737e.threembb.co.uk] has quit [[NS] Quit: ]
00:41 You're now known as TheWatcher[T-2]
00:42
< AnnoDomini>
Another day. I need sleep.
00:42 AnnoDomini [annodomini@Nightstar-cefeb0f7.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
00:51 You're now known as TheWatcher[zZzZ]
00:58 Vornicus-Latens is now known as Vornicus
01:03 Derakon[AFK] is now known as Derakon
01:25
< celticminstrel>
Yay for dict.update.
01:32
<@Derakon>
I actually find myself using set.update more often.
01:32
< gnolam>
It updates your dictators to the latest model?
01:32
< celticminstrel>
XD
01:33
<@Derakon>
It adds all of the entries in the provided dict to the invoked-upon dict.
01:33
<@Derakon>
foo.update(bar) adds everything in bar to foo, in other words.
01:33
< celticminstrel>
Overwriting duplicates.
01:33
< gnolam>
kim = dict.update(kim) # HACK: invalid outside North Korea!
01:33
< celticminstrel>
XD
01:35
<@Vornicus>
Apparently dict.update returns something in North Korea.
01:38
<@Derakon>
"So! You look like you're smart! Who's in charge here?" "Er, you are." "Wow! You're so smart, I'll just slap this guy around instead!" "Duprée..." "Hey! I'm working here! Do I come to your lab and tell you how to torture rats?" "Frequently."
01:38
<@Derakon>
Mischan.
02:53 * McMartin prepares to bludgeon his co-workers with the Windows security model, which is apparently far too stringent for them.
02:53
<@McMartin>
again.
02:53
<@McMartin>
POSIX has made everyone soft.
02:54
<@Vornicus>
I don't really know what the Windows security model looks like. Or POSIX's, really, outside of file permissions.
02:54
<@McMartin>
The key feature of POSIX that Windows lacks is that root can do everything.
02:55
< Namegduf>
Windows has ACLs.
02:55
< Namegduf>
POSIX doesn't have ACLs.
02:55
<@McMartin>
And specifically, "administrators" are kept on a fairly tight leash.
02:55
<@Vornicus>
And I don't know what an ACL is really either.
02:55
< Namegduf>
Windows also has a richer capability setup to Linux.
02:55
<@McMartin>
Access Control List
02:55
< Namegduf>
Access Control List
02:56
<@McMartin>
This is about the fourth time I'm having to have the conversation that goes something like "Why can't you have the installer do X?" "Because you have to be a device driver to do that."
02:56
<@Vornicus>
I know what it stands for, I don't know what it is.
02:56
< Namegduf>
It's a list of users and groups with permissions on a thing.
02:56
< Namegduf>
As opposed to a single user and a single group.
02:57
<@McMartin>
And Windows has about a hundred kinds of permission all told.
02:57
<@McMartin>
(across all accessible object types)
02:57
<@Derakon>
ACLs, as I understand it, are basically task-specific lists of users. If you're on the list, you can do the task.
02:57
<@Derakon>
(Or group of tasks)
02:58
<@McMartin>
Yeah
02:58
< Namegduf>
Of course, the simple fact we're comparing 80s stuff to NT says a lot about Windows prior to Vista.
02:58
<@McMartin>
prior to 2k~
02:58
<@Vornicus>
Ah, so Windows has bouncers, not padlocks~
02:58
<@McMartin>
Vorn: What's the difference?
02:58
< Namegduf>
2k and XP were basically the equivalent of having all that security and leaving it setup to log you in as root by default anyway.
02:59
< Namegduf>
It existed but it was still terribly done.
02:59
<@McMartin>
Namegduf: except that admin is vastly less powerful than root and still can't do a lot of things even in XP.
02:59
<@McMartin>
things like ps. -_-
02:59
<@Vornicus>
McM: a bouncer has a list, a padlock has a key.
02:59
< Namegduf>
Admin is capable of installing device drivers.
02:59
<@McMartin>
Yes, but those device drivers don't run as the admin.
03:00
< Namegduf>
Any distinction between what they and device drivers can do is superfluous.
03:00
<@McMartin>
False.
03:00
< Namegduf>
For security purposes, no, it isn't.
03:00
<@McMartin>
Or rather, spoken like someone whose job is to secure computers, not operate them.
03:00
<@McMartin>
Your attitude is what leads focus groups to say "why not do X? they're an admin! they can totally do that!"
03:01
<@McMartin>
And yes, they can, but they have to install a custom device driver to gain the capability to do so, and fuck that noise.
03:01
< Namegduf>
No, my attitude is simply one focused on security, not design of software to run on the system.
03:01
< Namegduf>
Of course it's stupid to do X in legitimate software. It doesn't change the fact that it CAN be done.
03:01
<@McMartin>
I am dealing with the people in charge of designing the spec for legitimate software.
03:01
<@McMartin>
I need to convince them to not want these things.
03:02
< Namegduf>
Well, the legitimate argument is that it's awful design of their own software which isn't worth it, but I can understand trying to convince them they *can't* instead.
03:03
<@McMartin>
Nah, both the request and why it doesn't work are reasonable on its surface.
03:04
<@McMartin>
The design is correct - the desire is unreasonable for reasons that take awhile to explain and that is then forgotten in a week.
03:06
<@McMartin>
(but the short form is that Windows's sudo-equivalent is way more thorough, so if IT comes in and tries to run stuff as Administrator they don't see all the data the end user will.)
03:06
<@McMartin>
(And because Administrator is not root and people with admin access don't get unlimited access to nonadmin users' stuff.)
03:09
<@McMartin>
In particular, all of these "X" things would be perfectly rational things to want if you could ensure one of (a) the user is always an adminstrator or (b) the software is such that you could reasonably install it to, like, the user's desktop.
03:10
<@McMartin>
Neither of these are true for our specific use cases.
03:12
<@McMartin>
(The more security-enhanced versions of POSIX systems have similar hilarity where you have to do little dances because running setuid root and running as root are different)
04:00 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has quit [Connection reset by peer]
04:04 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
04:07 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has joined #code
04:11 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has quit [Connection reset by peer]
04:18 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has joined #code
04:18 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has quit [Connection reset by peer]
04:26 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has joined #code
04:26 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has quit [Client closed the connection]
04:35 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has joined #code
04:45 Allison is now known as Agent_Panda
04:45
< gnolam>
A debugger. My kingdom for a debugger!
04:51
< Alek>
yuuus?
05:08
< gnolam>
?
05:11 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Reboot (Bloody Steam)]
05:14 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:17 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
05:24
< Alek>
not that I'm formally trained or anything, but I've had some success finding the nits in other people's ideas/writing/code. ?_?
05:27
< gnolam>
How good are you with the inner workings of the black box parts of Source? :P
05:28
< gnolam>
EUREKA!
05:29
< gnolam>
I solved it.
05:29 Agent_Panda [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
05:30
< gnolam>
Apparently, the game event manager does not keep a refcount (unlike the rest of the engine, which handles deallocation of resources automagically).
05:31
< gnolam>
So somewhere, an entity reference went invalid.
05:31
< gnolam>
*on level change.
05:50 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
06:45 Derakon is now known as Derakon[AFK]
06:48 Orthia [orthianz@Nightstar-61dbfba9.xnet.co.nz] has quit [Ping timeout: 121 seconds]
06:50 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [Ping timeout: 121 seconds]
06:52 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
06:52 Orthia [orthianz@Nightstar-98779d46.xnet.co.nz] has joined #code
07:09 You're now known as TheWatcher
07:12 kwsn [kwsn@Nightstar-ca9721ae.dyn.centurytel.net] has quit [[NS] Quit: BEEP BEEP IMMA JEEP]
07:52 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
08:01 Rhamphoryncus [rhamph@Nightstar-473f8685.abhsia.telus.net] has joined #code
08:10 You're now known as TheWatcher[afk]
09:06 Anno[Laptop] [annodomini@Nightstar-8adefcc2.adsl.tpnet.pl] has joined #code
09:10
< Orthia>
HEY VORNICUS
09:11
< Orthia>
You once did a spreadsheet on probabilities for Exalted, which was a dice pool system. Said system relies on rolling pools of d10s, 7+ is a success, 10 is two successes.
09:11
< EvilDarkLord>
Orthia: http://tinyurl.com/exaltedstats
09:12
< Orthia>
woot
09:12
< EvilDarkLord>
It's in the #exalted topic >.>
09:12
< Orthia>
Yeah, #exalted can DIAF.
09:12
< EvilDarkLord>
No.
09:12
< EvilDarkLord>
Why the random hating of this thing?
09:13
< Orthia>
Yet another fucking gaming channel.
09:13
< Orthia>
I am in enough as it is I do not want even more.
09:14
< Orthia>
Besides is DullFeld really so busy that it needs a spechul sidechannel for one topic of games?
09:14
< EvilDarkLord>
So it can die in a fire because you're not in it? That seems a little over-the-top.
09:15
< Orthia>
No, because its very existance means people expect me to be in it
09:15
< Orthia>
Which I find vastly irritating.
09:16
< EvilDarkLord>
Don't you cheat wrt channel limits anyway?
09:16
< Orthia>
Not on this account, no.
09:39 You're now known as TheWatcher
10:03 Anno[Laptop] [annodomini@Nightstar-8adefcc2.adsl.tpnet.pl] has quit [[NS] Quit: Going.]
10:07 You're now known as TheWatcher[afk]
10:38 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has joined #code
10:46 * Anno[Laptop] pokes McMartin. Any idea why my curses hello world failed?
10:47 Vornicus is now known as Vornicus-Latens
10:47
< Orthia>
Your hello world failed?
10:47
<@Vornicus-Latens>
It's curses.
10:47
<@Vornicus-Latens>
There's a reason it's called that.
10:48
< Orthia>
Yeah, I wasn't so much doubting Anno's skill as going "Holy geez, a language where Hello World is a nontrivial entity O.o"
10:49
<@Vornicus-Latens>
s/language/library/
10:49
< Anno[Laptop]>
Orthia: The plain Hello World worked. When I added curses to the mix, it failed.
10:49
< Anno[Laptop]>
Error opening terminal: unknown.
10:50
< Anno[Laptop]>
I googled this problem, and it seems to crop up in bash more often. There, the solution is to export TERM=whatever, but I don't know how to apply that here.
11:43
< Rhamphoryncus>
Anno[Laptop]: what language and pastebin the sourcecode
11:47
< Anno[Laptop]>
http://pastie.org/1336995
11:47
< Anno[Laptop]>
Python.
12:00
< Anno[Laptop]>
I'll be back eventually.
12:00 Anno[Laptop] [annodomini@F67919.F326B3.98D923.BDA7B6] has quit [[NS] Quit: leaving]
12:00 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
12:16 You're now known as TheWatcher
12:29 cpux is now known as shade_of_cpux
13:12 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection reset by peer]
13:25 Anno[Laptop] [annodomini@Nightstar-8adefcc2.adsl.tpnet.pl] has joined #code
13:39
< Rhamphoryncus>
Anno[Laptop]: did you try curses.wrapper()?
13:41
< Anno[Laptop]>
No. How do I use that?
13:43
< Rhamphoryncus>
http://docs.python.org/library/curses.html#module-curses.wrapper
13:47 * Anno[Laptop] scratches head.
13:47
< Anno[Laptop]>
So I put everything in the arguments to wrapper?
13:58
< Anno[Laptop]>
http://pastie.org/1338313
13:58
< Anno[Laptop]>
I have no idea how to use this.
14:07
<@ToxicFrog>
Anno[Laptop]: you have some sort of function that actually does the program, right?
14:07
<@ToxicFrog>
Say, main() does a bit of setup and then calls run(foo, bar, baz)
14:07
<@ToxicFrog>
Using wrapper, it would instead call curses.wrapper(run, foo, bar, baz)
14:07
<@ToxicFrog>
That said, I don't think this will actually fix the problem, it'll just make error handling better.
14:08
<@ToxicFrog>
Why can't you export TERM?
14:08
< Anno[Laptop]>
How do I do that?
14:08
< Anno[Laptop]>
I'm working from Netbeans, using its Python plugin.
14:11
<@ToxicFrog>
Running it inside netbeans?
14:12
<@ToxicFrog>
I suspect that's your problem, then
14:12
<@ToxicFrog>
Each terminal behaves differently. Curses has an internal database of terminals and on startup it tries to figure out which one it's running in (mostly using the TERM environment variable) so that it knows what escape sequences to use, what capabilities the terminal supports, etc.
14:13
< Anno[Laptop]>
Is that variable set by default?
14:13
<@ToxicFrog>
Netbeans may not even provide a terminal, just a character stream; if it does provide a terminal it's probably not one curses understands and may not even have all of the capabilities it needs.
14:14
<@ToxicFrog>
If your shell is running in a terminal, yes.
14:14
<@ToxicFrog>
I mean, you could try going to the netbeans project settings(?) and setting the environment variable TERM to, say, vt100
14:14
<@ToxicFrog>
But if you're testing a curses program, you should be testing it in a proper terminal emulator.
14:16
< Anno[Laptop]>
How do I run the program outside of it?
14:16
<@ToxicFrog>
(to draw an analogy with 3d graphics - say you're using a rendering library that automatically detects whether the system supports 3dFX, openGL or Direct3D on startup. Then you run it in a VM, which doesn't support any of those...)
14:16
<@ToxicFrog>
Just 'python foo.py'
14:16
<@ToxicFrog>
Showertime, bbiab
14:17
< Anno[Laptop]>
Doing that outputs nothing.
14:17
< Anno[Laptop]>
Just returns me to the normal prompt.
14:18
<@TheWatcher>
you're in the same directory as your python script?
14:18
< Anno[Laptop]>
Yes.
14:20
<@TheWatcher>
`echo 'print "Hello World!"' > hello.py && python hello.py` works?
14:22
<@TheWatcher>
You might also want to try `python -v yourscript.py`
14:23
< Anno[Laptop]>
Hello: command not found
14:24
<@TheWatcher>
do it without the ``s
14:24
< Anno[Laptop]>
I get lots of ASCII rubbish.
14:24
<@TheWatcher>
...
14:25
< Anno[Laptop]>
http://pastie.org/1338371
14:25
<@TheWatcher>
What should be happening: http://pastebin.starforge.co.uk/439
14:26
< Anno[Laptop]>
The first command does what you pasted.
14:31
<@TheWatcher>
have you tried any of the examples on, say, https://www.ironalbatross.net/wiki/index.php5?title=Python_Curses ?
14:33
< Anno[Laptop]>
The Good Curses stub works exactly as my earlier attempts did - nothing.
14:33
<@TheWatcher>
that's 'cos it has nothing doing any work
14:33
< Anno[Laptop]>
Putting print "Hello World" in the 'your code here' section doesn't change it.
14:33
<@TheWatcher>
try the "first curses script"
14:34
< Anno[Laptop]>
This works.
14:35
<@TheWatcher>
well, the rest of that page will give you the basics you need, as far as I can tell given that my python knowledge is pretty minimal
14:42
< Anno[Laptop]>
Thanks.
14:49 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
14:52
<@TheWatcher>
... the hell was I on when I wrote this code?!
14:52 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Ping timeout: 121 seconds]
14:57
< gnolam>
Shrooms? LSD? The radio?
15:01 Stalker [Stalker@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
15:14
< gnolam>
Mmm, random crashes...
15:33 * TheWatcher vaguely stabs hs-minor-mode's hs-hide-all command
15:33
<@TheWatcher>
goddamned thing complaining about unbalanced parenthesis
16:01 * gnolam stab stab STABS Steam in the kidneys.
16:56 celticminstrel [celticminst@Nightstar-f8b608eb.cable.rogers.com] has joined #code
17:27 Attilla [Some.Dude@Nightstar-e75d5e66.threembb.co.uk] has joined #code
17:27 mode/#code [+o Attilla] by Reiver
17:43 VectoR` [fs2oo6@842092.0FEF5C.C73857.2F6646] has joined #code
17:53 VectoR` [fs2oo6@842092.0FEF5C.C73857.2F6646] has left #code []
17:56 Orthia [orthianz@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
18:15 jeroid [jerith@687AAB.5E3E50.3626FC.221500] has joined #code
19:17
<@ToxicFrog>
Welp, I learned two new phrases today: "duck punching" and "snake fucking".
19:17
<@ToxicFrog>
Duck punching is modifying object/type definitions at runtime so that they pass duck typing.
19:18
<@ToxicFrog>
Snake fucking is handling an exception by modifying the call stack and then resuming the program from the point where the exception was thrown.
19:18
< jeroid>
Done that.
19:18
< jeroid>
That's too hairy for me.
19:18
<@ToxicFrog>
(or possibly from the start of the call that threw the exception - you get the idea)
19:20
<@McMartin>
TF: Those sound like they should be used in different languages.
19:21
<@McMartin>
The latter in particular sounds like something a lot of C++ developers would think was really awesome instead of utterly retarded.
19:21
<@McMartin>
(Is there any advantage to snake fucking that can't be gained by putting your try-catch in a loop?)
19:21
<@ToxicFrog>
Duck punching is pretty much a dynamic-typing-with-easily-modifiable-objects thing, yeah - I've seen it in the wild in python, lua and ruby at least.
19:22
<@ToxicFrog>
Snake fucking I've never seen in the wild, thank god, although someone posted a sample implementation in Python.
19:22
<@McMartin>
You can hack the call stack in Python?
19:22
<@ToxicFrog>
(and someone else said it sounds kind of like exception handling in some lisps, only horrible)
19:22
<@McMartin>
... actually, yeah
19:23
<@McMartin>
Windows SEH has it too, from the pre-C++ days.
19:23
<@ToxicFrog>
Apparently! News to me too.
19:23
<@McMartin>
But that "S" is for "structured" and it basically is.
19:24
<@McMartin>
IIRC SEH "exceptions" are actually hardware traps, though, so the OS doesn't get to pick and choose what causes it.
19:25 * McMartin is too lazy to look it up in his Windows Internals book.
19:27 jeroid [jerith@687AAB.5E3E50.3626FC.221500] has quit [[NS] Quit: Bye]
20:45 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
21:15 * Anno[Laptop] seems to recall snake fucking being used extensively in the x86 assembly class last semester.
21:34 TarinakyKai [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
23:36 shade_of_cpux is now known as cpux
23:41 You're now known as TheWatcher[T-2]
23:46 You're now known as TheWatcher[zZzZ]
--- Log closed Thu Dec 02 00:00:35 2010
code logs -> 2010 -> Wed, 01 Dec 2010< code.20101130.log - code.20101202.log >