code logs -> 2009 -> Mon, 30 Nov 2009< code.20091129.log - code.20091201.log >
--- Log opened Mon Nov 30 00:00:52 2009
00:01 AbuDhabi [annodomini@Nightstar-9cf08055.adsl.tpnet.pl] has quit [[NS] Quit: Sleep.]
00:08 You're now known as TheWatcher[T-2]
00:09 McMartin [mcmartin@Nightstar-cd8a4fac.pltn13.sbcglobal.net] has quit [[NS] Quit: Kernel upgrade]
00:11 Attilla_ is now known as Attilla
00:12 You're now known as TheWatcher[zZzZ]
00:15 McMartin [mcmartin@Nightstar-cd8a4fac.pltn13.sbcglobal.net] has joined #code
00:20 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has quit [[NS] Quit: ]
01:35 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has joined #code
01:58 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has quit [Client closed the connection]
01:58 Attilla_ [The.Attilla@FBC920.92E3D3.F76883.99588C] has joined #code
02:19 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:38 Derakon[AFK] is now known as Derakon
03:06 dmlandrum [dmlandrum__@8E7DA3.838E9A.6CA65A.A8EF5A] has quit [Ping timeout: 121 seconds]
03:14 Attilla_ [The.Attilla@FBC920.92E3D3.F76883.99588C] has quit [[NS] Quit: ]
04:13 * Vornicus fiddles. Need to build a random 5-regular graph.
04:47 ryan [revfitz@Nightstar-7785a873.scrm01.sbcglobal.net] has joined #code
04:48
< ryan>
I have a question about uml class diagrams, anyone around who could help?
04:55
<@ToxicFrog>
Don't ask to ask; just ask.
04:55
<@ToxicFrog>
(I've spent a while in UML hell this semester, yes)
05:00
< ryan>
I know, but I hate asking when I have no idea if anyone's even around
05:00
< ryan>
I just asked aardvark, so I'll c/p
05:00
< ryan>
In a UML class diagram, what relationship (if any) should I use when Class A doesn't contain any data members of Class B (i.e., class-scoped instances) but does contain function-scoped instances? It seems weird to me to have no connection, but it also seems wrong to use the normal "1 <<uses>> 3" or whatever.
05:00
< ryan>
class A here is my main class, not anything that could be instantiated, so afaik there's nothing wrong with using function-scoped variables like that?
05:07 SmithKurosaki [Smith@Nightstar-e2478917.cable.rogers.com] has quit [Ping timeout: 121 seconds]
05:11
<@ToxicFrog>
...I'd probably just put <<uses>> or generic-relationship there, but to be honest I don't know what you're "meant" to do there.
05:11
< ryan>
yeah I was thinking just using <<uses>> with no numbers but that seems like kind of a fraught path to go down?
05:11
< ryan>
I mean like
05:11
< ryan>
does that mean you have to count block-scoped variables too
05:11
< ryan>
etc. etc.
05:11 SmithKurosaki [Smith@Nightstar-6450f657.dsl.teksavvy.com] has joined #code
05:12
< ryan>
just seems way too messy
05:13
< ryan>
frankly this is not an assignment I care that much about so I guess I'll just leave them unconnected and see what my professor says
05:13
< ryan>
I'm getting very very scattershot uml guidance in general
05:18
<@ToxicFrog>
Re: counting block-scoped variables and whatnot: I would say that any dependency, whether it's is-a, has-a, or uses, should be represented on the diagram; that's what it's for.
05:18
<@ToxicFrog>
If class A requires class B in order to function, there's some relationship there, even if A only has a B in scope for one statement.
05:19 * ToxicFrog queues up half an hour of statistics gathering, and then fires up IDA.
05:19
<@ToxicFrog>
There's something wrong with me ;.;
05:20 AgentIchiro [Smith@Nightstar-e2478917.cable.rogers.com] has joined #code
05:21
< Vornicus>
TF: yes there is, but join the club. I'm sitting here rewriting bisect and random sampling in Javascript.
05:22
<@ToxicFrog>
I'm having another shot at writing a keybinding program for System Shock.
05:23
<@ToxicFrog>
I may end up making a custom dosbox build with HEAVY_DEBUG enabled for this.
05:25
<@ToxicFrog>
I'm not even sure why I'm doing this; adding mp3 support to Total Annihilation is easier and arguably more useful.
05:25
< Vornicus>
Heh
05:26
<@ToxicFrog>
(also, it's a program I would never, ever use, since I like the SS1 keybindings just fine)
05:27
<@ToxicFrog>
...yeah, I'm going to have to breakpoint every occurrence of DPMI SET (REAL|PROTECTED) MODE INTERRUPT HANDLER and wait until one of them is called with a keyboard interrupt number.
05:27
<@ToxicFrog>
And then disassemble the interrupt handler that gets passed in.
05:29 SmithKurosaki [Smith@Nightstar-6450f657.dsl.teksavvy.com] has quit [[NS] Quit: Leaving]
05:29
< Vornicus>
TF: that... yes. Something /is/ wrong with you.
05:31 AgentIchiro is now known as SmithKurosaki
05:33
<@ToxicFrog>
...ooooh yes
05:33
<@ToxicFrog>
"BPINT [intNr] [ah] sets a breakpoint that activates when the program calls the given interrupt and AH has the given value. Enter an asterisk (*) for [ah] if DOSBOX should break regardless of the value of AH."
05:33
< SmithKurosaki>
It's TF, he is... special, in that mad genius way
05:33
< Vornicus>
TF is the closest to SRMD I've ever met.
05:34
< Vornicus>
And that's saying something. My lines of work have a lot of SHOW THEM ALL folks in there.
05:35
< SmithKurosaki>
I have seen him go into the madness place, it's kind of creepy and cute at the same time...
05:36
< SmithKurosaki>
(It's really fun, especially when he starts explaining things. I think my mind edits in some lightning and stuff in the background, and a labcoat(
05:36
<@ToxicFrog>
Hey, I don't even need this! I can just dump the entire interrupt table once I'm in game.
05:36
< SmithKurosaki>
(He even makes things that he doesn't need, he must be a mad scientist)
05:37
< Vornicus>
(how is his evil laugh coming along?)
05:37
< SmithKurosaki>
Oh, it's well on it's way
05:37
< SmithKurosaki>
The grin is totally there
05:37
< Vornicus>
I do recall seeing his headcrab pics.
05:39
< SmithKurosaki>
The headcrab is cute
05:39
< SmithKurosaki>
Doesn't it have a name TF
05:39
< Vornicus>
Princess, iirc
05:40
< SmithKurosaki>
That does sound like something his sister would name it...
05:40
< SmithKurosaki>
TF probably wants me to shut up right now..
05:40 * SmithKurosaki hugs TF
05:43 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
05:44
< SmithKurosaki>
Anyways, yea, he's a spark and has SRMD
05:44 ryan [revfitz@Nightstar-7785a873.scrm01.sbcglobal.net] has quit [[NS] Quit: leaving]
05:44 Syloqs_AFH is now known as Syloqs-AFH
05:52
< SmithKurosaki>
nini akk
05:52
< SmithKurosaki>
all*
05:53
< Vornicus>
nini SK
05:53 * Vornicus applies a bedtime cheese.
05:53
< SmithKurosaki>
:o
06:11 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer]
06:48 Derakon is now known as Derakon[AFK]
07:06
<@ToxicFrog>
...gnar.
07:06
<@ToxicFrog>
I've found a keyboard interrupt handler.
07:06
<@ToxicFrog>
However, when I press ESC, the menu comes up before the breakpoint I set on it triggers.
07:06
<@ToxicFrog>
This implies that something funky is going on.
07:07
< Vornicus>
O.o
07:08
<@ToxicFrog>
...and if I press A, the view actually spins left a visible amount before INT 09 is triggered.
07:08
<@ToxicFrog>
Gnar.
07:11
<@ToxicFrog>
(and dosbox's BPINT command is totally not working)
07:13
<@ToxicFrog>
The way I see it, there's two possibilities: either ss1 is setting an interrupt handler which is invoked when keyboardstuff happens, or it's using a timer to poll the keyboard.
07:13
<@ToxicFrog>
But I don't know which.
07:15 AnnoDomini [annodomini@Nightstar-9cf08055.adsl.tpnet.pl] has joined #code
07:29
<@ToxicFrog>
...the menu coming up before the breakpoint trips may have been a dosbox bug.
07:45
<@ToxicFrog>
Ohho
07:46
<@ToxicFrog>
MOV CL,[EBX+0x0410+AL]
07:46
<@ToxicFrog>
TEST CL,0x01
07:46
<@ToxicFrog>
That looks like an array index on the scancode to me!
07:48
< Vornicus>
Yay knowing assembler!
07:48
<@ToxicFrog>
...sanity check
07:48
<@ToxicFrog>
TEST CL,01
07:48
<@ToxicFrog>
JNE $+0x0C
07:48
<@ToxicFrog>
Will jump if CL is not-1, correct?
07:49
< Vornicus>
I don't know x86 assember tha twell
07:50
<@ToxicFrog>
Hmm. This set of blocks seems to be doing something like:
07:50
<@ToxicFrog>
if !(array[scancode] | 1) then
07:50
<@ToxicFrog>
array[scancode] |= 1
07:51
<@ToxicFrog>
elseif array[scancode] | 2 then
07:51
< McMartin>
Er
07:51
<@ToxicFrog>
-- wackiness!
07:51
< McMartin>
& 1, presumably
07:52
< McMartin>
I think that's a direct comparison of CL to 1, though, not a bitmask.
07:52 * ToxicFrog goes to look up the TEST command
07:52
< McMartin>
array[scancode] | 1 will always be true.
07:52
<@ToxicFrog>
Yeah, you're right, it's &
07:52
<@ToxicFrog>
TEST is a bitwise and that updates CCR only.
07:53
<@ToxicFrog>
So the above jump will jump if the LSB of CL is set.
07:53
<@ToxicFrog>
Ok. This makes sense.
07:53
< McMartin>
OK, so that wll jump if CL is odd.
07:57
<@ToxicFrog>
Ok. So regardless of what happens, it increments AH; it also does some additional stuff I haven't figured out yet if CL & 2 or !(CL & 1)
07:57
<@ToxicFrog>
(and in the latter case, it sets that bit)
07:58
<@ToxicFrog>
...I can say that at no point is it calling anything else.
07:59
<@ToxicFrog>
There is data structure update wackiness occurring, though.
08:01
<@ToxicFrog>
CF 81 C6 77 31 00 00
08:04 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
08:11
< McMartin>
There may be INT 09 chaining issues going on where SS1 is pre-empting dosbox itself.
08:13
<@ToxicFrog>
C3:3A47
08:13
<@ToxicFrog>
I hope not.
08:19
<@ToxicFrog>
Oh god, I can't follow this code at all
08:19
<@ToxicFrog>
...possibly because it's 3 in the morning
08:19
< Vornicus>
Yes.
08:19
<@ToxicFrog>
But mostly because it is horrible
08:19
<@ToxicFrog>
I hate interrupts now
08:24
<@ToxicFrog>
And the fact that IDA and dosbox disagree violently on where the segments are doesn't help.
08:26
<@ToxicFrog>
...this code, however, isn't present in CDSHOCK.EXE at all.
08:27
<@ToxicFrog>
I think one of my breakpoints has ended up inside the DPMI interrupt dispatcher, which would explain a lot :/
08:38
<@ToxicFrog>
...yes
08:39
<@ToxicFrog>
I set a breakpoint at 01A7:004CE520, which appears to be the keyboard interrupt handler, and pressed A.
08:39
<@ToxicFrog>
Just after it did IN AL,60, I edited AL to be 0x01 (MAKE ESC) rather than 0x1E (MAKE A).
08:39
<@ToxicFrog>
And resumed.
08:39
<@ToxicFrog>
And the menu came up.
08:39
<@ToxicFrog>
I'm no closer to figuring out where it keeps its action table, but knowing this I may not need to be.
08:42
< Vornicus>
Do you ever need to type in SS1?
08:42
<@ToxicFrog>
...yes, when starting a new game it asks you for your name.
08:43
<@ToxicFrog>
...hmm. I seem to have sent MAKE S MAKE SPACE rather than the MAKE SPACE BREAK SPACE I intended to.
08:45
<@ToxicFrog>
Ahahahahahahahahahahaha! Yes!
08:45
< Vornicus>
WOOT
08:45
<@ToxicFrog>
All I need to do now is find a bit of space in that segment I can insert some extra code into, and ~256 bytes in the data segment I can appropriate.
08:47
<@ToxicFrog>
There's six bytes free at the end of the INT 09 handler, but I don't think that's enough.
08:47
<@ToxicFrog>
Although I guess I should actually write the code and see how much space it takes.
08:51
<@ToxicFrog>
For the conversion table, I may need to just extend the data segment and stick it on the end.
08:52
<@ToxicFrog>
I'm really wary about grabbing a quarter kbyte from the middle of it; considering how pathological this engine is about packing things tightly, every single byte in .data is probably used for something at runtime.
08:54
<@ToxicFrog>
...ok, there's a huge whack of space at the end of .text32 I can use for code.
08:55
<@ToxicFrog>
Hell, I can probably put the data there too.
08:55
<@ToxicFrog>
Although it may require stupid EIP tricks.
08:55
<@ToxicFrog>
BUT FIRST
08:55
<@ToxicFrog>
sleep
08:56
< Vornicus>
Iwas wondering when you'd do that.
08:57
<@ToxicFrog>
I'm only sleeping now because
08:57
<@ToxicFrog>
I'm not confident in my ability to hand-assemble x86 at this hour.
08:58
< Vornicus>
Heh
08:59 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited]
09:04
<@ToxicFrog>
Argh
09:04
<@ToxicFrog>
Fuck CISC
09:07 You're now known as TheWatcher
09:20
< McMartin>
What exactly is your ultimate goal here?
09:20 * McMartin finds it in backscroll
09:26
< Vornicus>
You know I think my most productive time of day for code is midnight to 5AM.
09:26
< Tarinaky>
Your friends are asleep but you're not too tired to think?
09:27
< Vornicus>
What, are you kidding? I've also been reading TF's stuff, helping out in #math on Freenode, and talking about various ridiculous things in other channels.
09:28
< Vornicus>
Like feelies for an open source game (granted this game is, you know. /Wesnoth/, but.)
09:28
< Tarinaky>
Feelies?
09:29
< Vornicus>
Feelies: stuff like, for instance, a cloth map of Monkey Island; stuff that gets included in a game box that is not the game itself or the manual.
09:29
< Tarinaky>
Ahh.
09:36 * Vornicus ...gah. Okay, gotta do something about that.
09:37
< Vornicus>
My thing is too big.
09:38
< Vornicus>
Or rather it takes too long.
09:42
< Vornicus>
...because for some ridiculous reason it is exploding.
09:58
< Vornicus>
Ah.
09:59
< Vornicus>
Because my sparse matrix implementation was wrong in a way that light testing did not find.
10:36
< Vornicus>
I have you now.
10:48
< Vornicus>
And now, I put together the two graphs, write the email, and head the hell to bed.
11:02
<@TheWatcher>
WTF perl, why is this sort not working *STABS*
11:03 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has joined #code
11:18
< Vornicus>
http://www.flickr.com/photos/7861878@N06/4146269979/
11:18
< Vornicus>
http://www.flickr.com/photos/7861878@N06/4146269939/
11:26
< McMartin>
What language was that generated in, and how was the graphic produced?
11:26
< Vornicus>
Javascript, and I copied the table into Excel.
11:31 Vornicus is now known as Vornicus-Latens
12:20 MyCatSchemes [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
12:56 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has quit [Ping timeout: 121 seconds]
13:00 AbuDhabi [annodomini@Nightstar-77358533.adsl.tpnet.pl] has joined #code
13:02 AnnoDomini [annodomini@Nightstar-9cf08055.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
13:19 Attilla [The.Attilla@FBC920.92E3D3.F76883.99588C] has joined #code
14:31 You're now known as TheWatcher[afk]
14:56 You're now known as TheWatcher
15:34 Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has joined #code
15:35
< Tarinaky_>
Hey. I need to solve (using a computer program) something of the form y = k tan (xy/2). Any suggestions on how I'd go about this?
15:43
< gnolam>
Solve as in..?
15:48
< gnolam>
But I'm guessing that something like Newton-Raphson should work fine for whatever you need to do with it.
16:01
<@jerith>
For those who may be interested, http://foxassault.org
16:03
< gnolam>
Sounds like a PETA site.
16:03
<@TheWatcher>
heh, it's for jerith's game :)
16:12
<@ToxicFrog>
Ok. It looks like the x86 has 21 different forms of the JMP instruction, none of which are 'add the contents of this register to EIP'
16:13
<@ToxicFrog>
I can add a constant to EIP, or I can copy a register into it, but I can't add a register to it.
16:13
<@ToxicFrog>
Nor is there any way to determine the current value of EIP other than using CALL and getting the address from the stack.
16:14
<@TheWatcher>
...
16:14
<@ToxicFrog>
Fuck CISC, and fuck the 8086.
16:18
<@ToxicFrog>
Ok, this is going to be kind of disgusting.
16:19
< Tarinaky_>
gnolam, Solve as in find the value of y which satisfies a specified value of k and x.
16:19
< Tarinaky_>
*satisfies that expression for
16:21
<@ToxicFrog>
I need to have int09_handler call remapscancode instead of getting the scancode itself. This will, I think, take three bytes.
16:22
<@ToxicFrog>
Remapscancode then does a CALL $+0 to get EIP on the stack, and adds (in 60h)*(handler size) + some offset to it.
16:22
<@ToxicFrog>
And then returns.
16:23
<@ToxicFrog>
This jumps it into the remap block for that scancode, which fiddles the contents of AL accordingly and then returns.
16:23
<@ToxicFrog>
...actually, better plan, if I can have read access on the code segment.
16:24
<@ToxicFrog>
call $+0, add offset+scancode, dereference and store in AL, pop, return
16:24
<@ToxicFrog>
Way more civilized.
16:26 * TheWatcher eyes TF
16:27
<@TheWatcher>
what is it you're doing, anyway?
16:29
< Vornicus-Latens>
Tarinaky: I'd try to solve as best I can.
16:30
<@ToxicFrog>
TheWatcher: write a patch for SS1 that allows rebinding the keys.
16:30
<@TheWatcher>
aha.
16:31
< gnolam>
Tarinaky: Then any numerical method should do. I recommend N-R for its simplicity.
16:32
< Tarinaky_>
Won't N-R fail because of the asymptote?
16:48 * Tarinaky_ hasn't done numerical solutions of graphical functions in a -long- time.
16:51 Derakon[work] [Derakon@Nightstar-d44d635e.ucsf.edu] has joined #code
16:51 * Derakon[work] mutters at build processes on Windows.
16:51
< Derakon[work]>
I'm sure they make sense for some people, but this is not a platform I'm familiar with, and it's making resolving dependencies into even more of a pain than it usually is.
16:52
< Derakon[work]>
I think I may wait for Rhamphoryncus to show up, though, before I continue my rant.
16:54 Tarinaky_ [jes55@Nightstar-203b3f66.le.ac.uk] has quit [[NS] Quit: Leaving]
17:00 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has joined #code
17:02
< Derakon[work]>
Hey, and there he is. :)
17:02
< Derakon[work]>
Morning, Rhamphoryncus.
17:03
< Derakon[work]>
So I've been trying to get the microscope program to a) build, and b) run, once built.
17:03
< Derakon[work]>
It has a dependency on Python and Numpy in the C++ code, which means it needs to have access to the relevant header files to build.
17:04
< Derakon[work]>
I can get it to build if I point to a random install of Python2.5 that we have; however, when I try to run, "import numpy" fails because it can't find multiarray.
17:05
< Derakon[work]>
All distributions of numpy/python that I've downloaded lack multiarray and lack numpyconfig.h, so I can't even build them.
17:07
<@jerith>
Derakon[work] and Rhamphoryncus: http://foxassault.org
17:07
< Derakon[work]>
Being at work, I can't really check out games right now.
17:07 * jerith nods.
17:08
<@jerith>
Just letting you know for later. :-)
17:08
< Rhamphoryncus>
jerith: did you look at the two bugs I emailed about?
17:09
<@jerith>
Yes. The one looked like an issue that had theoretically been fixed by the build you used.
17:09
<@jerith>
I can't remember what the other was.
17:10
< Rhamphoryncus>
first was a hang, second was probably a henhouse getting destroyed
17:11
< Derakon[work]>
Rhamph: don't suppose you have any idea how a supposedly complete build of numpy would fail to have multiarray?
17:11
<@jerith>
Ah, the other was fixed in r520, which happened between you plaing it and me remembering to send the bugs to the list. :-)
17:12
< Rhamphoryncus>
Derakon[work]: first thing that comes to mind is wrong version.. and numpy's gone through several project names
17:12
< Derakon[work]>
Searches I've done on the net have generally referred to improperly-installed Numpy/Python installs, but they're also all about Linux. I'm completely at sea here on Windows. >.<
17:13
< Rhamphoryncus>
maybe that's a generated component
17:13
< Rhamphoryncus>
Not running the right build script
17:13
< AbuDhabi>
The lecturer today gave us a voluntary task, anyone who comes up with a solution or proof that it's impossible will get automatic pass in the class.
17:13
< Derakon[work]>
I've tried the binary install of numpy
17:14
<@jerith>
AbuDhabi: P=NP?
17:14
< AbuDhabi>
jerith: Not quite. :P
17:14
< Derakon[work]>
I really don't want to get into having to build my dependencies, since, given this is OSS we're talking about, the first step will be "install these other dependencies and tools you need to build our stuff".
17:14
< Derakon[work]>
And that's just a quagmire of pain.
17:14
<@jerith>
AbuDhabi: One of the equivalent problems, then?
17:15
< AbuDhabi>
There is a random amount of Polish coins (of which we know the WEIGHT only) - determine what the value of this heap is.
17:15
< Rhamphoryncus>
that a packing problem?
17:15
< Derakon[work]>
Sounds like it.
17:16
< AbuDhabi>
The weight of each type of coin is known (from the Polish mint site). The total amount of coins is not known.
17:16
< Rhamphoryncus>
Usually there's multiple solutions to those ones though
17:16
< Derakon[work]>
Well, he did say a solution.
17:16
< Derakon[work]>
And it's not impossible since you can brute-force it.
17:16
< Derakon[work]>
However, brute-forcing would be hellaciously slow.
17:16
< AbuDhabi>
The measuring apparatus is assumed to be ideal, as well as the coins themselves.
17:17
<@jerith>
What's the beat frequency of the weight distribution?
17:17
< AbuDhabi>
What?
17:17
< Rhamphoryncus>
99.99 = 0.1a + 0.21b + 0.33b. Solve
17:18
<@jerith>
How many coins of one type will it take to match a possible weight of an integral number of a different type of coin?
17:18
< AbuDhabi>
We have six coins - 10gr, 20gr, 50gr, 1zł, 2zł and 5zł.
17:19
< Rhamphoryncus>
gr = ?
17:19
<@jerith>
Those are the currency.
17:19
< AbuDhabi>
1/100 zł.
17:19
< Rhamphoryncus>
Monetary value is irrelevant. What is the weight?
17:20
< AbuDhabi>
One moment. I'm still looking those up.
17:20
< Derakon[work]>
So there are 100gr to the z3?
17:22 You're now known as TheWatcher[afk]
17:22
< AbuDhabi>
Yeah.
17:22
< AbuDhabi>
http://pastie.org/720453
17:35
< Derakon[work]>
How heavy is the total?
17:36
<@jerith>
Der: I think that's the input data...
17:37
< Derakon[work]>
Jerith: that's the mass of each coin, surely.
17:38
<@jerith>
Der: No, total mass is the input data. :-)
17:38
< AbuDhabi>
The total mass is known. The amount of coins is not known.
17:38
< AbuDhabi>
The deal here is to take a random heap of coins, plunk it onto some virtual device, and have it tell you how much the heap is worth.
17:39
< Derakon[work]>
Oh, but he wants a program that gets the coins given the total mass; he doesn't want the coins for a mass that he tells you.
17:39
<@jerith>
Yes.
17:40
< Derakon[work]>
Right, well, the brute-force approach would start by trying to use as many of the heaviest coin as possible, and, when it goes over-weight, stepping back and using lighter coins.
17:42
< Namegduf>
AbuDhabi: To prove it impossible, merely find a weight for which there are two possible combinations of coins.
17:43
< Namegduf>
For that weight, there is is no "one" solution findable, and thus it is not possible to write a program to do it for all weights.
17:43
< Derakon[work]>
He said a solution, not the solution.
17:43
< Derakon[work]>
Given that these coins have rational weights, there are clearly going to be situations in which a given weight has multiple solutions.
17:43
< Namegduf>
Derakon[work]: Actually, he said "the value"
17:44
<@jerith>
I think the output needs to be "this is the unique solution" or "there is no unique solution for this mass".
17:44
< Derakon[work]>
Oh, so he did.
17:44
< Derakon[work]>
Of course, that was AbuDhabi translating; the original text might be more carefully-written.
17:44
< AbuDhabi>
I was given it verbally, so yeah.
17:45
< Derakon[work]>
In this situation, I would generally say that a program should either a) provide at least one valid solution, or b) state that no solution exists.
17:45
< Derakon[work]>
I might extend it to providing all valid solutions depending on the problem.
17:45
<@jerith>
It should also state that there is more than one solution should this be the case.
17:45
< Namegduf>
I note there was a question of whether providing "the value" was possible.
17:45
<@jerith>
It's important to note the difference between a unique solution and a non-unique one.
17:46
< AbuDhabi>
What we're really after here is the highest mass of coins for which there is always a unique solution.
17:46
< AbuDhabi>
Does this help?
17:46
< Derakon[work]>
That's a factoring problem.
17:51
< AbuDhabi>
Where should I start on this thing?
17:52
<@jerith>
By allocating several hours to it.
17:52
< Derakon[work]>
Keep in mind that if you get to pass the class by solving one problem, that problem is going to be hard. :)
17:53
<@jerith>
Also keep in mind that there are academic papers written about this problem and its variants.
17:54
< AbuDhabi>
Not necessarily. This guy gives out these problems like candied apples - several people have already auto-passed. Only difference is that the previous problems were first-come only-served, and I have until the end of semester.
17:55
< Derakon[work]>
So to rewrite the problem statement: "Given coins with these values and masses, what is the heaviest mass for which there is exactly one combination of coins that have that mass?"
17:55
<@jerith>
If you're only interested in the smallest mass with a non-unique solution, you can do it by brute-force construction.
17:56
<@jerith>
You may need lots of memory for this.
17:56
< AbuDhabi>
Cool.
17:57
<@jerith>
If you're interested in figuring out what the solution is for a given mass, that's a harder problem.
17:57
<@jerith>
But now I shall go and find a place to satisfy my hunger.
17:59
< AbuDhabi>
I think I might be able to blab my way through with just the highest non-ambiguous mass.
18:00
< AbuDhabi>
The only reason I'm doing it is because if not first-come only-served. Whenever he gave these problems on those terms, I felt my wisdom insulted.
18:12 You're now known as TheWatcher
18:14
< gnolam>
AbuDhabi: ... is the zloty symbol really "z cubed" or is there encoding wonkiness going on? :)
18:18
< gnolam>
(I find the notion of a Complex Currency strangely appealing though)
18:20
< AbuDhabi>
Encoding. It's really a slashed l.
18:28 AbuDhabi [annodomini@Nightstar-77358533.adsl.tpnet.pl] has quit [Client closed the connection]
18:28 AnnoDomini [annodomini@Nightstar-77358533.adsl.tpnet.pl] has joined #code
18:29 Finale [c0cb88fe@Nightstar-14e5d099.mibbit.com] has joined #code
19:25 * AnnoDomini concentrates on finding the smallest ambiguous combination of coins.
19:25
< AnnoDomini>
With six coins, and only 2 decimal points of precision, it shouldn't be very hard.
19:26
< simon`>
I wonder what the frequency is between primes in the interval of current unixtimes.
19:39 MyCatSchemes [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
20:00
<@ToxicFrog>
Bollocks!
20:00
<@ToxicFrog>
My scancode-fiddling approach is impractical; it will break things like ^X.
20:01
<@ToxicFrog>
I still need to find the dispatch table for keyboard handling >.<
20:16 * AnnoDomini struggles with the logic expression for '(i,j) does not equal (k,l) and they aren't mirror items on the symmetrical matrix either'
20:16
< AnnoDomini>
Particularly that second part.
20:34
< AnnoDomini>
For some reason, I find programming in Mathcad unusually satisfying.
20:43 * Derakon[work] sighs at this line: "from Priithon.all import F,U,Y"
20:43
< Derakon[work]>
F,U,2, Sebastian.
20:45
< AnnoDomini>
Sebastian is now a meme.
20:52
< Derakon[work]>
Do tell.
20:55
< AnnoDomini>
A meme internal to this channel, true, but a meme nonetheless - Sebastian is That One Bad Coder You Have To Clean Up After.
20:55
< Derakon[work]>
Heh.
21:01
< AnnoDomini>
BTW, I have proven (by finding) that there is an ambiguous mass-combination of coins (3x50gr+1x1zł and 4x20gr+1x50gr) beyond which an unambiguous algorithm is not possible.
21:01 * AnnoDomini hugs Mathcad.
21:11
< AnnoDomini>
I hope my lecturer is fluent in English. The Matcad file is in Ponglish. <_<
21:16
< McMartin>
Ponglish?
21:17
< McMartin>
Is that "half English, half Polish"?
21:17
< McMartin>
Or does it play electronic table tennis?
21:17 * Derakon[work] eyes his output and the reference output.
21:18
< Derakon[work]>
I'm working on the "align two images" problem since I can't use the microscope right now.
21:18
< Derakon[work]>
And while I've spent a lot of time trying to improve my output...I recently realized that the reference implementation produces crap sometimes too, so perhaps I should just make my version available.
21:18
<@jerith>
AnnoDomini: Can't ypu cancel a 50gr from that?
21:18
< Derakon[work]>
But that requires figuring out how the transformation information it outputs is ordered...and on images where it and my version generate nigh-identical results, we have completely different transformations.
21:20
< Derakon[work]>
(Transformations, according to my notes, are (x, y, z) translate, rotation, anisotropic zoom angle, and anisotropic zoom factor. Why we have a translation factor for the Z axis when this is a 2D image, I don't know)
21:20
< Finale>
ahahah
21:24
< AnnoDomini>
jerith: What do you mean?
21:25
< AnnoDomini>
Oh, 2x50gr+1x1zł and 4x20gr?
21:25
< AnnoDomini>
That's even better!
21:25 * jerith nods.
21:28
< AnnoDomini>
Thanks.
21:28 * AnnoDomini sends another email.
21:56
< McMartin>
Spam message begins: "Do you have a flare for website design?"
21:56
< McMartin>
Response #1: "I like the idea of having something like the Batsignal that makes web designers parachute in"
21:56
< McMartin>
Response #2: "It's not that kind of flash, guys."
22:00
< Finale>
hee
22:18 dmlandrum [darren@8E7DA3.838E9A.6CA65A.A8EF5A] has joined #code
22:21
< dmlandrum>
Ubuntu on a netbook != all that great.
22:21
< dmlandrum>
XP did better.
22:23
< McMartin>
XP was at least somewhat designed for it.
22:23
< Finale>
you can actually fit a working XP installer with drivers in about 250MB.
22:23
< dmlandrum>
I can't change xchat's prefs because the OK/Cancel buttons are off-screen and I can't get to them.
22:24
< Finale>
ouch.
22:24
< McMartin>
>_<
22:24
< dmlandrum>
But that's probably poor coding on the part of the app more than Ubuntu.
22:24
< McMartin>
Can you maximize the X-Chat window, thus making it smaller?
22:24
< dmlandrum>
Not the prefs window. It's a fixed size.
22:24
< dmlandrum>
I can't even reduce it by dragging an edge.
22:24
< McMartin>
Oh. Right. Oy.
22:24
< Finale>
yeah, poor app coding.
22:25
< Finale>
don't you have access to the source? >_>
22:25
< McMartin>
To be fair, dialog boxes do tend to be static.
22:25
< Finale>
they do that.
22:25
< McMartin>
Which this is, which means it isn't a matter of flipping some switch.
22:26
< dmlandrum>
I hear some good things about Win7 on netbooks.
22:26
< dmlandrum>
But I have XP on a recovery partition already, so I'll probably do that. Sometime.
22:26
< dmlandrum>
When my main computer works again. Motherboard fried.
22:26
< dmlandrum>
Err, not literally, but it decided to stop working in a usable fashion.
22:27
< dmlandrum>
So, new mobo and CPU (hey, may as well upgrade while I'm at it) is on the way, but I spent my oscilloscope money on this, which annoys me.
22:29 Vornicus-Latens is now known as Vornicus
22:33
< dmlandrum>
On the plus side, I'll have my first ever quad core, and I also got one of those Kodak pocket camcorders, which I've been coveting for doing some video podcasting. Yeah, it's just a short hop from me to Internet famous, baby!
22:45
< dmlandrum>
All stepping stones on the way to becoming a professional guest on various British and Australian panel shows.
22:51
< Vornicus>
dmlandrum: you have strange goals.
22:51
< Finale>
don't we all?
22:52
< dmlandrum>
Well, to be completely honest:
22:52
< dmlandrum>
Yes, I would love to be on my favorite panel shows.
22:52
< dmlandrum>
But...
22:53
< dmlandrum>
I don't want to accomplish that simply by "being famous for being famous."
22:54
< dmlandrum>
If I'm going to be famous for anything, it's going to be for being an expert, like Sagan and Kaku.
22:54
< Derakon[work]>
Who's Kaku~?
22:54
< dmlandrum>
Will it ever happen? Eh, who knows? Anything's possible.
22:54
< dmlandrum>
Michio Kaku, the Japanese-American physicist.
22:54
< Derakon[work]>
(Google says http://en.wikipedia.org/wiki/Michio_Kaku )
22:55
< dmlandrum>
Not as famous as Sagan, but he'll probably get there.
22:59
< dmlandrum>
I'm of two minds on the whole issue, since wanting to be famous is surely a self-destructive behavior. Neither Sagan nor Kaku both sought fame, it just came to them for being competent.
22:59
< dmlandrum>
So, I can't help but think that my desire for any fame is some kind of mental illness I should be dealing with.
23:04
< Finale>
Hollywood Syndrome.
23:11
< dmlandrum>
Eh, I'll do my podcasts, keep going with my physics degree, and go from there.
23:14 You're now known as TheWatcher[T-2]
23:16 AnnoDomini [annodomini@Nightstar-77358533.adsl.tpnet.pl] has quit [[NS] Quit: DEATH.]
23:22 You're now known as TheWatcher[zZzZ]
23:22 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
23:24 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:32 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
23:35 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
23:43
< Derakon[work]>
Whuff...it's gonna be tough to work on the microscope for the next few weeks.
23:43
< Derakon[work]>
It's almost completely monopolized. I get two hours in the morning before the non-morning people show up, and that's it.
23:44
< Derakon[work]>
I'd better find some significant project I can work on outside of the microscope room. Or else start working night shift or something.
23:48
< Finale>
where do you work?
23:48 Rhamphoryncus [rhamph@Nightstar-a62bd960.abhsia.telus.net] has quit [Client exited]
--- Log closed Tue Dec 01 00:00:53 2009
code logs -> 2009 -> Mon, 30 Nov 2009< code.20091129.log - code.20091201.log >