code logs -> 2010 -> Wed, 18 Aug 2010< code.20100817.log - code.20100819.log >
--- Log opened Wed Aug 18 00:00:37 2010
00:04 Vornicus-Latens is now known as Vornicus
00:31 You're now known as TheWatcher[T-2]
00:33 You're now known as TheWatcher[zZzZ]
00:37 Zed [Zed@Nightstar-e4835f03.or.comcast.net] has quit [Ping timeout: 121 seconds]
00:38 Zed [Zed@Nightstar-e4835f03.or.comcast.net] has joined #code
00:55 cpux [cpux@Nightstar-20a84089.dyn.optonline.net] has joined #code
01:50 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
06:18 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!]
06:27 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
06:34 * McMartin is a bad person
06:34
<@McMartin>
Someone observes that using char *** as he is clearly makes him a bad person
06:34
<@McMartin>
I suggest replacing it with the Obviously Cleaner (tm) std::map<std::pair<int, int>, std::string>
06:36
< Vornicus>
;_;
06:36
< Vornicus>
Eh. Three stars isn't all that bad.
06:37
<@McMartin>
The problem with it is that three months later, which it now is, it's hard to tell between a std::map<std::pair<int, int>, std::string> and a std::vector<std::string>&.
06:37
<@McMartin>
Also, anyone who bitches about Java for being verbose? Punch them in the goddamned teeth~
06:37
< Vornicus>
Java at least isn't ambiguous about that kind of shit.
06:40
< Vornicus>
Someone on here Who Shall Not Be Named once wrote a 6-star thing. For no good reason.
06:41
< Vornicus>
(he was doing a thing thatfigured out point values for D&D pointbuy. I pointed out that you could get the same thing from a pair of lists.)
06:42
< Tarinaky>
I'm currently trying to work our how to randomly generate the colour of a star.
06:42
< Vornicus>
Tarinaky: Main sequence, or would you like the exotics in there too?
06:43
< Tarinaky>
Specifically I need to generate a colour on the line Red-Yellow-White-Blue + a dimness.
06:43
< Tarinaky>
Although the thought occurs - Galaxies are all kinds of colours aren't they?
06:44
< Vornicus>
Galaxies are colored by their stars and their dust.
06:46
< Vornicus>
http://en.wikipedia.org/wiki/Black_body <--- you're gonna want this
06:46
< Tarinaky>
I'd rather not pregenerate a list of Class-Magnitude pairs.
06:47
< Rhamphoryncus>
Wait, using C/C++ to calculate point buy?
06:48
< Tarinaky>
Rhamphoryncus: I suspect it was part of a larger project.
06:48
< Vornicus>
It was statistical analysis of the entire gamut.
06:48
< Vornicus>
It was Unwise.
06:48
< Rhamphoryncus>
huh
06:48
< Tarinaky>
Vornicus: I'm... I'm not really sure how to apply that to the problem.
06:48
< Rhamphoryncus>
Was this something that needed to run more than once?
06:49
< Vornicus>
What he did was built a giant 6-dimensional array and then collapsed it.
06:49
< Vornicus>
Rham: no, thank god.
06:49
< Rhamphoryncus>
All the more reason to not use C x_x
06:49
< Rhamphoryncus>
I'm somewhat curious what the exact problem was, so that I might consider how I would solve it
06:51
< Vornicus>
3.5e pointbuy vs dice: how likely is each possible outcome of 4d6 drop lowest 6 times, when converted to points?
06:52
< Vornicus>
(for the record: in 3.5e, the mean is about 30 points -- higher than the "elite array" of 25)
06:53
< Vornicus>
(I haven't run the numbers in 4e, but the book says that the standard pointbuy is better than your typical roll.)
06:54
< Tarinaky>
Vornicus: How would I go about generating a point on the curve?
06:56
< Vornicus>
Tarinaky: there's http://en.wikipedia.org/wiki/Planckian_locus <--- that tells you the color you get off a temperature. Note that it gives you some awesomely ridiculous values.
06:57
< Tarinaky>
Awesomely ridiculous?
06:57
< Vornicus>
http://en.wikipedia.org/wiki/Black_body <--- or, you can use this image and index into it. Much easier.
06:58
< Tarinaky>
Index it?
06:58
< Vornicus>
erp.
06:58
< Vornicus>
http://en.wikipedia.org/wiki/File:Blackbody-colours-vertical.svg <--- this image.
07:00
< Tarinaky>
But I need RGB values.
07:01
< Vornicus>
Then turn the svg into a damn png and index into it. That gives you your color.
07:02
< Vornicus>
Then just do some stuff with your apparent magnitude and you'll have yourself a party.
07:03
< Tarinaky>
Wait, you can do that?
07:04
< Vornicus>
Yes?
07:04
< Tarinaky>
Isn't it slow to do that with the SDL functions?
07:04
< Tarinaky>
Accessing surfaces directly.
07:04
< Vornicus>
Are you building entire stars, or just pixels.
07:04
< Tarinaky>
2x2 dots.
07:04
< Vornicus>
Then it'll be easy. You do your color math first and then just throw a color at a blit function and you're all good.
07:05
< Tarinaky>
How do I dim the colour?
07:08
< Vornicus>
...multiply each component by something less than 1?
07:09
< Tarinaky>
Oh. I thought that didn't work.
07:09 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has quit [Ping timeout: 121 seconds]
07:10 Kazriko [kaz@Nightstar-e09690fa.client.bresnan.net] has joined #code
07:10 mode/#code [+o Kazriko] by Reiver
07:11
< Vornicus>
Multiplying color values by something works fine - you have to be vaguely careful with gamma, but not that careful. Adding color values can give you weirdness though.
07:19
< Rhamphoryncus>
Vornicus: wait, they brute forced the average point buy? Oi, it's much simpler than that
07:20
< Vornicus>
Rham: well, I did want to see the whole curve. I got mine done in five minutes and then it ran for five more.
07:20 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
07:20
< Rhamphoryncus>
What curve?
07:21
< Vornicus>
The whole probability curve; how likely is it that 4d6 droplow gives you x points?
07:21
< Rhamphoryncus>
ahh
07:21
< Namegduf>
I hate 237 line functions.
07:21
< Rhamphoryncus>
5 minutes sounds decent
07:22
< Vornicus>
This was written in relatively naive python and ran on a computer that was new 8 years ago.
07:23
< Rhamphoryncus>
my tools of choice (in python) are itertools.product, sorted, slicing, and sum
07:23
< Rhamphoryncus>
With a little lookup table and the appropriate logic
07:24
< Vornicus>
I used a 6-deep for loop because it was the first thing I thought of. And a pair of lookup tables.
07:25
< Rhamphoryncus>
yeah, itertools.product is most of that deep loop
07:27
< Namegduf>
Ah.
07:28
< Rhamphoryncus>
hopefully not buggy: http://pastebin.starforge.co.uk/337
07:30
< Rhamphoryncus>
Oh, but I did cheat by copying the lookup table out of my existing pointbuy program
07:31
< Vornicus>
Missing something: the probabilities of each outcome.
07:32
< Rhamphoryncus>
yeah
07:32
< Rhamphoryncus>
It gives parts, not percents, and it's not cumulative
07:32
< Tarinaky>
So...
07:33
< Tarinaky>
tuple([prng.random()*a for a in Colour[prng.choice(Colour)] ]) << Would be right?
07:33
< Tarinaky>
Or does it only evaluate random() once?
07:33
< Rhamphoryncus>
evaluates each time
07:33
< Tarinaky>
Whoops. just realised
07:33
< Rhamphoryncus>
You can simplify that by using a genexp instead of a listcomp. The () from the function call double as the genexp's delimiters, so just remove the []
07:34
< Tarinaky>
tuple([prng.random()*a for a in prng.choice(Colour) ]) << Would be right?
07:34
< Rhamphoryncus>
Looks better. What's Colour?
07:34
< Tarinaky>
A list.
07:34
< Tarinaky>
Colour is a list of tuples.
07:34
< Rhamphoryncus>
Rename it to Colours
07:35
< Rhamphoryncus>
a would be a tuple, which you can't multiply by a float
07:35
< Rhamphoryncus>
You might want ...for a, b in...
07:35
< Tarinaky>
Doesn't choice return a tuple?
07:35
< Vornicus>
Rhamphoryncus: no, he's...
07:35
< Tarinaky>
In this context.
07:35
< Vornicus>
choice picks one of the many colors, so he's geting one tuple off that bit there.
07:36
< Rhamphoryncus>
err
07:36
< Vornicus>
tuple(prng.random()*a for a in prng.choice(Colours))
07:36
< Rhamphoryncus>
Yeah, I'm silly x_x
07:36
< Vornicus>
Should work.
07:36
< Vornicus>
Turns it into a genexp instead of a list so it comes out a little more nicely in some ways.
07:38
< Tarinaky>
So if I generate a surface using the pixel draw functions... Can I then change its pallet?
07:39
< Tarinaky>
*palette
07:39
< Vornicus>
Whyyyyy are you doing that
07:40
< Tarinaky>
To set the colour?
07:40
< Vornicus>
Set the color before drawing the pixels, maybe?
07:40
< Tarinaky>
That'd require me to redraw the shape every time I needed it though.
07:41
< Tarinaky>
Which is expensive.
07:41
< Vornicus>
What?
07:42
< Tarinaky>
The star is, at present, drawn at program launch and then just pulled from a variable as it's needed.
07:42
< Vornicus>
It's just 2x2 pixels, right
07:43
< Tarinaky>
It's a -very- frequently called function though.
07:44
< Vornicus>
Are you calling it 5,000 times a frame?
07:45
< Vornicus>
Hell, are you even calling it 100 times a frame?
07:45
< Tarinaky>
...No.
07:45
< Tarinaky>
Well, with 1 exception.
07:46
< Vornicus>
Then you don't get to complain about call frequency.
07:47
< Tarinaky>
k -.-
07:48
< Tarinaky>
... I just got a green star.
07:49
< Tarinaky>
... Why am I getting green and purple stars when those colours aren't in the list?
07:49
< Tarinaky>
>.<
07:57
< Vornicus>
Idunno. Print your star color before and after extraction.
07:59
< Tarinaky>
(255, 122, 0)
07:59
< Tarinaky>
(34.171483697384389, 103.68587698224911, 0.0)
07:59
< Tarinaky>
Oh wait.
08:00
< Tarinaky>
Derp.
08:00
< Tarinaky>
I know what I've done.
08:01 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out]
08:01
< Vornicus>
Well there's your problem.
08:03 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 122 seconds]
08:05 Netsplit *.net <-> *.split quits: cpux
08:05
< Tarinaky>
http://deathcookie.fizkerinc.dk/download/file.php?id=18
08:06
< Vornicus>
Beautiful. You'll want a higher bias though - more blues and whites.
08:06
< Tarinaky>
I can draw a stary background. Welcome to 1993.
08:08
< Tarinaky>
Not too sure how to do that.
08:10 cpux [cpux@Nightstar-20a84089.dyn.optonline.net] has joined #code
08:11
< Vornicus>
What's your color source look like - a tuple of colors, in order from red to blue? Or something in that sense?
08:11 ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code
08:11 mode/#code [+o ToxicFrog] by Reiver
08:11
< Vornicus>
You could random up to the square of the number of colors and then square root it and floor it.
08:14
< Tarinaky>
What gets the length of a list?
08:15
< Vornicus>
len(seq)
08:17
< Tarinaky>
It's complaining that floor is returning a float.
08:17
< Vornicus>
replace math.floor with int
08:19
< Tarinaky>
http://i37.tinypic.com/oiwqjl.png
08:20
< Vornicus>
Better.
08:22
< Vornicus>
Indeed, that's quite nice.
08:31
< Tarinaky>
Hmm.
08:31
< Tarinaky>
k = Colours[int(math.sqrt(prng.randint(0,(len(Colours))**2 ) ) ) ]
08:31
< Tarinaky>
IndexError: list index out of range
08:31
< Tarinaky>
Oh, duh. randint is inclusive.
08:34 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Connection closed]
08:38 * McMartin redoes FotH's default messages.
09:13 You're now known as TheWatcher
09:20 AnnoDomini [annodomini@Nightstar-5f94a80b.adsl.tpnet.pl] has joined #code
09:21 mode/#code [+o AnnoDomini] by Reiver
09:37 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
09:38 Syloqs_AFH is now known as Syloqs-AFH
11:01 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has joined #code
11:03 Vornicus is now known as Vornicus-Latens
11:49
< Tarinaky>
So. If I have a triangle: [(0,0),(0.5,1),(1,0)] how do I translate those points when I rotate it about point (0.5,0.5)?
11:52
< Tarinaky>
I know I'm dealing with a unit circle which means 1=y**2+x**2
11:53 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
12:23 cpux is now known as shade_of_cpux
12:30 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
12:39 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
13:24 thalass [thalass@Nightstar-deab6071.bigpond.net.au] has joined #code
13:24 * thalass grars
13:26
< thalass>
I'm trying to ./configure a package called gpsviewer, and it requires 'chamlain-gtk-0.3' and/or 'champlain-0.3'. I have 0.4 of both, (or, rather, 'libchamplain-0.4') and it refuses to acknowledge it. I can't find where to get the older version (though i'm looking now)
13:44 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Ping timeout: 121 seconds]
13:52
<@ToxicFrog>
thalass: install the -devel version.
13:52
<@ToxicFrog>
generally, "libfoo" \
13:53
<@ToxicFrog>
is just the library binaries, needed to run programs that use that library.
13:53
<@ToxicFrog>
"libfoo-dev" or "libfoo-devel" is the headers and documentation, needed to compile programs that use that library.
14:01
< thalass>
I do have the -0.4-dev versions, actually. I remembered that from the last time i had trouble :P
14:03
< thalass>
ah another look at the ./configure error output. It says the package requirement is 'champlain-gtk-0.3 >= 0.3.3' - and the same for champlain-0.3. odd that they would put an upper limit on the version
14:08 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
14:08 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Connection closed]
14:08 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
14:32
< thalass>
haha. helps if you look up the project's website itself. *downloads*
14:34
< thalass>
gods. there are even more requirements to compile libchamplain-0.3.3, which i need to compile another program. it never ends! hah
14:38 thalass [thalass@Nightstar-deab6071.bigpond.net.au] has left #code ["Leaving"]
14:49 celticminstrel [celticminstre@Nightstar-f8b608eb.cable.rogers.com] has joined #code
14:54
<@ToxicFrog>
Er
14:54
<@ToxicFrog>
>= 0.3.3 is a lower bound on the version
14:54
<@ToxicFrog>
"0.3.3 or later"
15:26 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [Ping timeout: 121 seconds]
15:27 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
15:27 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
16:49 AnnoDomini [annodomini@Nightstar-5f94a80b.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
16:51 AnnoDomini [annodomini@Nightstar-5a061955.adsl.tpnet.pl] has joined #code
16:51 mode/#code [+o AnnoDomini] by Reiver
16:57 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
17:10 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has joined #code
17:16
< RichardBarrell>
Pity thalass left, or we could prod them to check whether their distro's repositories included a "libchamplain-dev" package.
17:35
<@ToxicFrog>
<thalass> I do have the -0.4-dev versions, actually. I remembered that from the last time i had trouble :P
17:38
< RichardBarrell>
Oh.
18:06 RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [Operation timed out]
19:22 AnnoDomini [annodomini@Nightstar-5a061955.adsl.tpnet.pl] has quit [[NS] Quit: Reconnecting]
19:22 AnnoDomini [annodomini@Nightstar-5a061955.adsl.tpnet.pl] has joined #code
19:22 mode/#code [+o AnnoDomini] by Reiver
19:54 aoanla [AndChat@Nightstar-b9d813e9.range86-157.btcentralplus.com] has joined #code
21:08 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
21:09 Stalker [Z@26ECB6.A4B64C.298B52.D80DA0] has quit [Ping timeout: 121 seconds]
21:46 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
22:13 aoanla [AndChat@Nightstar-b9d813e9.range86-157.btcentralplus.com] has quit [[NS] Quit: ]
22:42
< Tarinaky>
'sup?
22:44 Tarinaky [Tarinaky@Nightstar-f349ca6d.plus.com] has quit [Client closed the connection]
22:55 AbuDhabi [annodomini@Nightstar-d2d43cc5.adsl.tpnet.pl] has joined #code
22:57 AnnoDomini [annodomini@Nightstar-5a061955.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
23:14 AbuDhabi [annodomini@Nightstar-d2d43cc5.adsl.tpnet.pl] has quit [[NS] Quit: leaving]
--- Log closed Thu Aug 19 00:00:38 2010
code logs -> 2010 -> Wed, 18 Aug 2010< code.20100817.log - code.20100819.log >