code logs -> 2012 -> Wed, 01 Aug 2012< code.20120731.log - code.20120802.log >
--- Log opened Wed Aug 01 00:00:04 2012
00:01 iofficespace is now known as iospace
00:22 Nemu_ [NeophoxProd@Nightstar-55d158b3.asahi-net.or.jp] has quit [Ping timeout: 121 seconds]
00:25 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
00:25 mode/#code [+o himi] by ChanServ
00:25 Derakon[AFK] is now known as Derakon
00:26 mode/#code [+ao Derakon Derakon] by ChanServ
00:35 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code
00:43 You're now known as TheWatcher[T-2]
00:55 You're now known as TheWatcher[zZzZ]
01:13 gruber [lenin@9D46A2.F4E9D7.E4B4CF.2072AD] has joined #code
01:14 gnolam is now known as NSGuest35214
01:14 gruber is now known as gnolam
01:16 NSGuest35214 [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Ping timeout: 121 seconds]
01:18 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
02:10 Attilla [Obsolete@Nightstar-429b0f61.as43234.net] has quit [Ping timeout: 121 seconds]
02:13
< Rhamphoryncus>
http://i.imgur.com/jUXDd.jpg
02:14
< Rhamphoryncus>
The pentagons are my favourite. They're still hexagons, just with a collapsed edge XD
02:15
<~Vornicus>
Yay
02:15
<~Vornicus>
The color's an eyesore though
02:16
<~Vornicus>
Also check out the ridiculous distortion on that hub hexagon.
02:18
< Rhamphoryncus>
yup
02:19
< Rhamphoryncus>
The colour was an accident I ran with
02:19
< Rhamphoryncus>
distortion is the next step
02:20
< Rhamphoryncus>
If I crank the "subdivision" to 45 (meaning each edge of a pentagon is split into 45 triangles) I get the same hexagonal tile count as civ 5's huge setting
02:22
<~Vornicus>
Note that Civ5 still doesn't do spherical worlds - higher connectivity of a sphere makes it feel smaller.
02:22
< Rhamphoryncus>
ahhh, well put. I had that feeling but couldn't put it in words
02:24
< Rhamphoryncus>
The system is flawed for civ 5 anyway. If you place a city directly on a pentagon you lose 1/6th of your surrounding area
02:25 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Client closed the connection]
02:31
< Rhamphoryncus>
whoever made this, I hate them: http://geomagmasters.com/img/spheres/Sphere810Stand.jpg
02:31
< Rhamphoryncus>
I got a bunch of those recently at a garage sale and couldn't get anything near that to stay up
02:34 Syloq_Home [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
02:39 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
02:50
< Rhamphoryncus>
Vornicus: http://thomson.phy.syr.edu/thomsonapplet.php
02:54
< Rhamphoryncus>
I don't know if my goals *exactly* coincide with the thomson problem, but they're pretty damn close
02:55
<&McMartin>
OSX 10.8 has a new command line utility "caffeinate" to block system sleep
03:01
<~Vornicus>
pfff
03:18
< Rhamphoryncus>
Vornicus: it demonstrates that any sort of ideal solution will involve lots of regular grids
03:24
< Rhamphoryncus>
If avoiding regular grids was really that important to me then I'd have to change the problem such that I get a *worse* solution
04:19
< Rhamphoryncus>
Vornicus: did you use family 2? http://myweb.tiscali.co.uk/oaktree/butterfly/backpages/icosa_great_circles.htm
04:25
< iospace>
Rhamphoryncus: how goes pointer snorting? :P
04:36
<~Vornicus>
Rham: uh. No, I didn't.
04:36
<~Vornicus>
I need to show you what I really did so you can see how it works.
04:36
< Rhamphoryncus>
iospace: all done. See screenshot. No more gaps. http://i.imgur.com/jUXDd.jpg
04:37
< iospace>
nice
04:37
< Rhamphoryncus>
Vornicus: I appreciate it
04:45
< Rhamphoryncus>
Right now I'm subdividing before flattening, which I think is my worst source of distortion
04:50
< Rhamphoryncus>
maybe useful? http://en.wikipedia.org/wiki/File:Icosahedral_reflection_domains.png
04:55 Kindamoody[zZz] is now known as Kindamoody
05:00
<~Vornicus>
Probably.
05:02 * Derakon sads at Python
05:03
<&Derakon>
{}.get('foo', []).append('bar') doesn't result in {'foo': ['bar']}
05:04
< Rhamphoryncus>
setdefault
05:04
< Rhamphoryncus>
aka worst named method in the language
05:05
<&Derakon>
Heh.
05:05
<&Derakon>
The specific use case here is that I have a mapping of things to lists of things.
05:05
<&Derakon>
And I need to either create a list with one element, or append to the list, depending on if it exists yet.
05:07 * Rhamphoryncus checks help(collections.defaultdict), finds only autogenerated garbage x_x
05:08
< Rhamphoryncus>
x = defaultdict; x['foo'].append('bar') # Works
05:09
<&Derakon>
...yikes.
05:09
<&Derakon>
That, uh, makes me think of Perl. >.<
05:11
<~Vornicus>
defaultdict works too, but you should use defaultdict(list) to be explicit
05:11
< Rhamphoryncus>
ergh sorry
05:11
< Rhamphoryncus>
I meant defaultdict(list)
05:11
<~Vornicus>
I use defaultdicts a lot because of this very problem.
05:11
<&Derakon>
I think I'd rather be explicit.
05:12
<&Derakon>
I was just hoping there was an elegant way to be explicit and compact.
05:12
< Rhamphoryncus>
x = {}; x.setdefault('foo', []).append('bar')
05:12
< Rhamphoryncus>
It's exactly the semantics you're asking for. A get that will assign the default if it wasn't there already
05:13
<&Derakon>
Yeah, but it subverts the expectations for how dicts work.
05:13
<&Derakon>
You have to see where the dict is created to understand what's going on.
05:13
<&Derakon>
It's a bit too magic for me.
05:14
<&Derakon>
(I'd rather assume that anyone reading my code needs to have their face shoved in exactly what is going on, because that is all too often the case for me)
05:14 * Vornicus pokes at his ancient POV knowledge.
05:16
< Rhamphoryncus>
Derakon: a short comment is justified ;)
05:16
<&Derakon>
Heh.
05:17
<&Derakon>
Out of 3413 lines in this project, 816 are comments and 571 are whitespace.
05:17
<~Vornicus>
Yeah. Now I remember some things I wished I'd figured out
05:18 * Vornicus tries to get toruses to appear where he wishes.
05:20
< Rhamphoryncus>
Vornicus: that thomson problem applet has a torus mode, fwiw
05:20
<~Vornicus>
Gnah.
05:20
<~Vornicus>
No, not what I mean
05:21
< Rhamphoryncus>
Didn't think so
05:21
<~Vornicus>
I'm using toruses to draw circles on a sphere; but in order to do so I must figure out how to transform the toruses to get them where i want.
05:21
<~Vornicus>
This means, in particular, figuring out the rotation.
05:22
<~Vornicus>
but I've never gotten around to doing that, so now I'm sitting here with ridiculous math to do.
05:22
<&Derakon>
Move the torus straight up to the radius of the sphere, then rotate it about the X axis to the desired latitude, then rotate it about Z to the desired longitude.
05:22
<~Vornicus>
"rotate it about the X axis to the desired latitude" - desired latitude of what part of the torus?
05:23
<&Derakon>
You're placing the center of the torus on a specific point on the sphere, yes?
05:23
<~Vornicus>
Ah, okay.
05:23
<&Derakon>
With the plane of the torus tangent to the sphere surface?
05:23
<~Vornicus>
Wait, no
05:23
<~Vornicus>
No, no.
05:23
<~Vornicus>
I'm placing the center of the torus at the center of the sphere.
05:24
<&Derakon>
But ultimately you want the torus on the surface of the sphere, right? You're trying to draw circles on a sphere?
05:24
<~Vornicus>
Through two points on the sphere. This is a great circle.
05:24
<&Derakon>
...ah, that kind of circle.
05:24
<&Derakon>
You're trying to draw the lines of latitude/longitude?
05:24
<~Vornicus>
No.
05:24
<~Vornicus>
I have a pair of points, I want a torus through them.
05:25
<&Derakon>
Two points on the sphere, and a torus, also on the surface of the sphere, that connects the two points. Hm.
05:25
<&Derakon>
Clearly the torus must have the same primary radius as the sphere does, then.
05:25
<~Vornicus>
Right, that part's obvious
05:25
< Rhamphoryncus>
Could be used for longitude, if you were so inclined, but not for latitude?
05:26
<~Vornicus>
I can take the cross product of the two points to get the axis of symmetry of the great circle.
05:26
<~Vornicus>
Rham: that's great circles, yeah.
05:27
<&Derakon>
Okay, this is too complex for me to do in my head, sorry.
05:27
<~Vornicus>
hng
05:27
<~Vornicus>
Okay, cross product gives me a point.
05:27
<~Vornicus>
Well, a point on the sphere. If I can get the point, uh... hang on, which plane are toruses rendered in.
05:28
<~Vornicus>
okay, need to get y to the appropriate point, which means rotate about x and then about y.
05:30
<~Vornicus>
Okay. How much do I rotate about x? acos(axis.y); How much do I rotate about y? atan2(...not sure which is first)
05:30
<~Vornicus>
but it's axis.x and axis.z in there
05:30
<~Vornicus>
OKay, I think I can do this now.
05:33 iospace is now known as iospacedout
05:45 * Derakon spends 20 minutes tracking down a stupid bug.
05:46
<&Derakon>
I determined that a function a) was doing nothing specifically with the "self" variable, and b) might be useful elsewhere, so I moved it to an external module, and swapped its argument order so that it would be in "source, dest" order.
05:46
<&Derakon>
Except I forgot to swap the point in the function itself where it recursed.
05:48
<~Vornicus>
...I think it worked.
05:48
<&Derakon>
\o/
05:49
<~Vornicus>
torus {1, 0.01 rotate <degrees(acos(axis.y)), degrees(atan2(axis.x, axis.z)), 0>}
05:50
<~Vornicus>
Yes, victory
05:50
<&McMartin>
Derakon: Maybe a stupid bug but not a simple one >_<
05:52
<~Vornicus>
okay. Now let's see if I can'
05:53
<~Vornicus>
t get this to do the things I need.
05:53
<&Derakon>
McM: and it wouldn't even have been caught by strict typing, since both of the inputs were dicts of similar structure.
05:54
<&McMartin>
Boo.
05:55 * Derakon finds himself about to type "if not canContinue: continue", swaps "canContinue" for "canAllolcate", sighs.
05:55 * Vornicus tries to remember how he did evenly-spaced locations along a great circle.
05:56
<~Vornicus>
well, okay, I know how I did it. I have no idea how I'll do it when I don't have "rotate about axis"
06:07
< Rhamphoryncus>
Vornicus: you used the model editor to do the rotations before?
06:12 Kindamoody is now known as Kindamoody|breakfast
06:14
< Rhamphoryncus>
hmm, radius of ?3
06:34
<&McMartin>
Allolcate?
06:35
<&Derakon>
Yes.
06:35
<&Derakon>
Hence the sigh.
06:35
<&McMartin>
x = [Lolcat() for x in range (nyanyanyan)]
06:36 Derakon is now known as Derakon[AFK]
06:45 Kindamoody|breakfast is now known as Kindamoody
06:47
< Rhamphoryncus>
woo fail. Length of vector in 3d is still square root, not cube root
06:54
< Rhamphoryncus>
http://i.imgur.com/VfWZE.jpg
06:55
< Rhamphoryncus>
So much better that I'm not sure there is any more readjustment to be done
06:57
< Rhamphoryncus>
All I changed was normalizing the radius of each pentagon's centroid *before* subdividing, rather than later when I normalize every radius
06:58
<~Vornicus>
Rham: I used a handmade matrix lib to do the rotations before.
06:58
<~Vornicus>
Like I made it myself.
06:58
< Rhamphoryncus>
ahh
06:59
<~Vornicus>
This was... foolish, but I was ten years younger then.
06:59
< Rhamphoryncus>
heh
06:59
<~Vornicus>
And yeah, that looks good.
07:00
< Rhamphoryncus>
thanks
07:01
< Rhamphoryncus>
Enough that the inherent distortion around each pentagon is the worst
07:03
<~Vornicus>
But yeah, I couldn't get openGL to go right, so I wrote myself a 3d vector-matrix lib and poured the results into POV-Ray for final rendering.
07:04 * Rhamphoryncus nods
07:04
< Rhamphoryncus>
I've learned a lot.. what's most surprising is how solid the result is
07:05
< Rhamphoryncus>
Yes, it's hideous and slow, but there are no gaps between the triangles, nor any overlap. Not "unlikely, implementation dependant", but rather guaranteed none; it's in the specs
07:07
< Rhamphoryncus>
Even my cheat of rendering the pentagons as hexagons with two identical vertices, that's perfectly safe
07:14
<~Vornicus>
Indeed it is.
07:15 * Rhamphoryncus deletes 60% of his file as old code XD
07:18
< Rhamphoryncus>
So, next step.. terrain and/or object placement?
07:20
<~Vornicus>
Probably.
07:20
<~Vornicus>
I remember a few things that snuck up on me when I was trying to do terrain.
07:21
< Rhamphoryncus>
Well, it does mean I'm back to needing addressing again as well as both dense (terrain) and sparse (object) storage
07:22
< Rhamphoryncus>
An octree or half-assed equivalent should be sufficient for object storage. Not optimal, but the ease of implementation should easily win out
07:23
<~Vornicus>
Specifically: any 3d models that are tiles will need to do some crazy stuff to line up right.
07:24
< Rhamphoryncus>
Oh, yeah, that's a grounding assumption
07:24
< Rhamphoryncus>
Buildings will need to be somewhat flexible, rather than absolutely rigid models
07:25
< Rhamphoryncus>
But on a real mapsize that'll be a fraction of a percent so it won't be user visible
07:26
< Rhamphoryncus>
For most it should be the ground around that soaks up the difference, so the massive skyscraper doesn't end up larger at the top *g*
07:37
< Rhamphoryncus>
I suppose the absolute laziest coordinate system is to use floats :/
07:45
< Rhamphoryncus>
I half expect to end up with something like quaternions; "redundant" axis to avoid extreme situations
07:52
< Rhamphoryncus>
gack. A webpage that describes itself as "heavily under construction - hard hat area!!!"
07:52
< Rhamphoryncus>
At least there's no animated gif :P
07:53
<~Vornicus>
Man. I thought you'd found a door to the 90s.
07:54
< Rhamphoryncus>
... 2005
07:55
< Rhamphoryncus>
And it was actually from MIT research that modelled muscle tissue
07:57
< Rhamphoryncus>
Okay, I need to quantify what I want from a coordinate system. Starting with portability; I don't want to rely on C/C++'s vague float/double semantics. However, that's particularly for stored points, so intermediate calculations (do a track from A to B) could relax that
07:58
< Rhamphoryncus>
I also want to avoid significant variation in numerical precision. E.g. longitude at the pole vs equator
07:59
< Rhamphoryncus>
I shouldn't need to worry about alignment of the numerical precision, so long as I throw on enough spare bits
08:00
< Rhamphoryncus>
(if the GUI only lets you place tracks to within ?1 cm then storing at 1 mm is sufficient, regardless of rotation)
08:01
< Rhamphoryncus>
It sounds like a fairly simple x/y/z should be sufficient
08:02
< Rhamphoryncus>
in integer form
08:03
< Rhamphoryncus>
which is.. a little over 32 bits
08:07
< Rhamphoryncus>
If I'm lazy and bump that to 64 bits.. I can get 10% of the way across the milky way :P
08:11
< Rhamphoryncus>
I do want to include aircraft and possibly even satellites.. but they may be better off under a separate system anyway, since they're obviously highly mobile and not fixed to the ground
08:14
< Rhamphoryncus>
Hrm, but I can't occlude the core of the earth. That's key to using a simple x/y/z vector :P
08:36 himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds]
08:56
< Rhamphoryncus>
hmm FLT_EVAL_METHOD == 0
08:59
< Rhamphoryncus>
caught me by surprise. Apparently gcc and clang on 64-bit x86 no longer play with floating point types on you
09:00
< Rhamphoryncus>
the defined values are 0: use the type you gave, 1: promote to double, and 2: promote to long double
09:00
< Rhamphoryncus>
Or anything else being implementation defined
09:01
< Rhamphoryncus>
The way I learned C was in the "anything else" camp: yes, it'd promote to long double, but when was totally arbitrary
09:32 Rev [Reiver@5B433A.F67240.CBBC50.C3A90E] has joined #code
09:55 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has quit [[NS] Quit: I lovecraft Vorn!]
10:06 You're now known as TheWatcher
10:09 Rev [Reiver@5B433A.F67240.CBBC50.C3A90E] has quit [Client closed the connection]
10:10 Rev [Reiver@5B433A.F67240.CBBC50.C3A90E] has joined #code
10:24 Kindamoody is now known as Kindamoody|lunch
10:56 himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code
10:56 mode/#code [+o himi] by ChanServ
11:10 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code
12:10 iospacedout is now known as iospace
12:20 Attilla [Obsolete@Nightstar-429b0f61.as43234.net] has joined #code
12:24 * TheWatcher eyes this form
12:24
<@TheWatcher>
... how is this getting past the validator, what
12:24 * TheWatcher applies the "print STDERR"s
12:55 Kindamoody|lunch is now known as Kindamoody
13:02 iospace is now known as iofficespace
13:52 Rev [Reiver@5B433A.F67240.CBBC50.C3A90E] has quit [Connection reset by peer]
14:08 EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has quit [Operation timed out]
14:19 EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has joined #code
14:40 Kindamoody is now known as Kindamoody|afk
14:44 Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited]
15:15 Kindamoody|afk is now known as Kindamoody
16:11
< iofficespace>
yay grounding +3v lines by mistake
16:11
< iofficespace>
whoops!
16:13
<@TheWatcher>
>.<
16:13
< froztbyte>
haha
16:13
< froztbyte>
seems in line with this wednesday
17:11 Vash [Vash@Nightstar-e8057de2.wlfrct.sbcglobal.net] has joined #code
17:11 mode/#code [+o Vash] by ChanServ
17:42
< iofficespace>
froztbyte: that was yesterday actually
17:43
< iofficespace>
the sad thing is these are DFNs and the pin i was trying to ground was right next to the +3v pin
17:43
< iofficespace>
add in the fact that I have to time the grounding well
17:45
< iofficespace>
it wasn't until I got a board without an obstructive heat frame on that I was able to do it reliably >_>
17:47
< iofficespace>
oh and as an added bonus! It was the pin attached to the flash where the firmware was stored
17:48
< iofficespace>
so yeah, i had to manually reflash the thing Dx
17:51
< froztbyte>
hmm
17:51
< froztbyte>
well, at least you could still access the programming path
17:51
< froztbyte>
and didn't burn anything out :)
17:53
< iofficespace>
yeah :P
17:53
< iofficespace>
mind you i never shorted any of the pins
17:53
< iofficespace>
just grounded +3v
17:59
< iofficespace>
(plus, the pin that was next to the +3v? the clock pin)
18:04
< froztbyte>
haha
18:04
< froztbyte>
so this is $dayjob for you, I'm guessing?
18:05
< froztbyte>
not a university student in the lab thing?
18:07
< iofficespace>
yup
18:10
< iofficespace>
i'm testing our firmware when hardware faults are injected
18:59
< froztbyte>
I see
19:01
< iofficespace>
^^;;
19:30 Kindamoody is now known as Kindamoody[zZz]
19:59 RichyB [MyCatVerbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: Leaving]
21:07 cpux|2 [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code
21:09 cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
21:25
< gnolam>
https://www.youtube.com/watch?v=0FLlxq5LSlo
21:56 himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds]
23:25 himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code
23:25 mode/#code [+o himi] by ChanServ
23:31 You're now known as TheWatcher[T-2]
23:44 You're now known as TheWatcher[zZzZ]
23:59 cpux|2 is now known as cpux
--- Log closed Thu Aug 02 00:00:18 2012
code logs -> 2012 -> Wed, 01 Aug 2012< code.20120731.log - code.20120802.log >

[ Latest log file ]