code logs -> 2013 -> Sun, 30 Jun 2013< code.20130629.log - code.20130701.log >
--- Log opened Sun Jun 30 00:00:34 2013
01:24 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code
01:24 mode/#code [+o Orthia] by ChanServ
01:29 Vornicus is now known as Vash
02:12 Vash is now known as Vornicus
02:33 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.]
02:36 RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code
03:09 Typh|offline is now known as Typherix
03:10
<~Vornicus>
I dreamed that my brother asked me for an editor that could separate syntax highlighting from the text.
03:12 Kindamoody[zZz] is now known as Kindamoody
03:17
<@gnolam>
I didn't even know you had a brother.
04:06 * Derakon sighs, starts reviewing a 2241-line diff.
04:07
<~Vornicus>
Yeah, he's not as nerdy as I am.
04:17
<&Derakon>
Oh hey, it's only 1764 lines if you ignore whitespace changes. ?.?
04:18
<&Derakon>
(This guy uses an editor that automatically trims the whitespace at the ends of lines, as I recall)
04:19
< [R]>
See, the polite thing to do is to disable that when sharing patches
04:19 cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has joined #code
04:19
<&Derakon>
This is a pullreq from his repo to mine; basically you're asking him to disable that feature altogether in his editor.
04:20
<&Derakon>
(Or alternately rig up something that reverts all whitespace-only changes before he submits, I guess)
04:20 cpux [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
04:32 Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
04:32 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [NickServ (GHOST command used by Derakon_)]
04:32 Derakon_ is now known as Derakon
04:32 mode/#code [+ao Derakon Derakon] by ChanServ
04:35 * Derakon eyes this pullreq, wonders why people never comment their code adequately.
04:39
<&Derakon>
562 lines into the diff, and I have 86 lines of commentary. This is not a promising ratio~
04:42 ktemkin is now known as ktemkin[awol]
04:53 * Derakon tries to get grep to return him all lines that have a # with no following # or whitespace.
04:53
<&Derakon>
It's...not working.
04:53
<&Derakon>
`grep -rE "#[^\s]" *` gets me every commented line in the source code.
04:54
<&Derakon>
Ah, just using a blank space instead of \s works.
05:01
<&McMartin>
I should probably comment up that code I've been testing now that it appears to work.
05:05
<&Derakon>
Yes.
05:07
<&McMartin>
Then I can fold it into Monocle and break my C++ dependencies \o/
05:08
<~Vornicus>
Yay, planet loadout generation works
05:08
<~Vornicus>
Next up... oh, this will be a bad day.
05:09
<~Vornicus>
Finally I'm getting into the proper processing meat of this program.
05:10
<&Derakon>
750 lines of review done (close to halfway!), 128 lines of commentary written. Sigh.
05:10
<&Derakon>
Granted that includes a decent amount of whitespace for the commentary.
05:14
<~Vornicus>
So, let's see.
05:18 Kindamoody is now known as Kindamoody|afk
05:19
<~Vornicus>
Each planet creates an UnmergedSystemMORMap, a map<SystemFacilitySelection, SubSystemMORMap>; SubSystemMORMap is a map<MORCoordinates, MultiPlanetLoadoutDescription>.
05:20 Derakon is now known as Derakon[AFK]
05:20
<~Vornicus>
Then I join planets: for planets A and B, I take certain pairs of SubSystemMORMaps, iterate both pairs, add their coordinates, and join their MultiPlanetLoadoutDescriptions. The pairs give me a new SystemFacilitySelection (based on the original two SFS's)
05:23
<~Vornicus>
I take all the things with the same SystemFacilitySelection and merge them, creating a new UnmergedSystemMORMap, which I then send down the line to join with more planets.
05:25
<~Vornicus>
Once I have joined all the planets in a single system, I filter out 'incomplete' SystemFacilitySelections from the USMORM, and merge the remaining SubSystemMORMaps.
05:26
<~Vornicus>
Now, I have a whole bunch of whole-system MORMaps (with some approriate tags so the SystemFacilitySelections data I had gets kept); these I must join, adding system loadouts together.
05:28
<~Vornicus>
In four places here, I filter out unoptimal loadouts, and in all cases it's the same way; however there are of course basically four different types.
05:29
<~Vornicus>
Two of these places are adds: I add the coordinates of two disjoint loadouts, and join the maps that give those loadouts; two of them are merges: I keep the coordinates of each loadout, and also the map.
05:31
<~Vornicus>
The adds are where it really gets hairy; because the adds require a cartesian product of a possibly very large number of loadouts, and I don't need the joined map to determine whether it's optimal or not, I don't want to actually generate the joined map unless I've shown it's optimal.
05:36
<~Vornicus>
Okay, so. The optimizer takes an iterator-oid; both add and merge iterator-oids produce the MORCoordinates automatically, and the maps on demand.
05:39
<~Vornicus>
optimizer then returns a map<MORCoordinates, loadout_map_type>.
05:41
<~Vornicus>
Now. The merge iterator-oid works off a priority queue; all maps that I'm merging go in, and then when I pop them I pump and push back into the queue.
05:49
<~Vornicus>
The add iterator-oid also works off a priority queue, and also a set; when I pop, I 1. remove that object from the set and 2. check whether either of the two successors are in the set; if not I add them to the set and push them.
05:51
<~Vornicus>
Again, of course, both of these iterators have to work on several types of object.
05:53 Kindamoody|afk is now known as Kindamoody
06:00 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
06:05 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
06:22 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
06:22 mode/#code [+qo Vornicus Vornicus] by ChanServ
06:23
<~Vornicus>
Well, that was a lovely little adventure.
06:24
<&McMartin>
What's MOR here?
06:24
<~Vornicus>
MOR: Minerals, Organics, Radioactives. The three resources I'm optimizing on.
06:24
<&McMartin>
Ah
06:26
<~Vornicus>
I'm sorting on those (technically the key is [m, o+r, o]) because the optimization algorithm is fastest when I have them in order.
06:34
<~Vornicus>
So, right now I have several tasks before me: 1. write the thing that joins maps; 2. write the merge and add iterators; 3. write the optimizer; 4. write the things that actually decide when to call those...
06:35
<@Tarinaky>
What's Vorn making?
06:35
<~Vornicus>
I've been working on a resource output optimization program for a space 4x.
06:36
<@Tarinaky>
*whooosh*
06:37
<~Vornicus>
In simpler terms: I have a whole bunch of planets of varying size and quality; I wish to load each planet with resource production facilities, in such a way that I can build as many of a particular ship as possible.
06:39 Typherix is now known as Typh|offline
06:44
<@Tarinaky>
I see.
06:46
<~Vornicus>
At the moment I'm working on the design for the thing that removes guaranteed-non-optimal layouts; specifically, this bit removes layouts where there is another layout that gives more resources of every type.
06:46
<~Vornicus>
Unfortunately, I have to use it in four different places, so now here I am writing templates.
06:52
<~Vornicus>
(the real question is what's the actual signature I'm working off of here)
07:01 Turaiel is now known as Turaiel[Offline]
07:50
<~Vornicus>
Right about now I need a big book of C++ template bs because Dang
07:51 ErikMesoy|sleep is now known as ErikMesoy
08:00 Kindamoody is now known as Kindamoody|out
08:18
<~Vornicus>
okay. The merge and add iterator-oids need to implement ++, getMOR, and getLoadout; the optimizer takes an iterator-oid and returns a map<MORCoordinates, LoadoutType>
08:29 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.]
08:46
<~Vornicus>
merge takes a vector of iterators; add takes two iterators; in both cases, the iterators are map<MORCoordinates, something>::iterators.
08:50 * Vornicus tries to figure out what the hell he need to do with templates to make that happen.
09:11 You're now known as TheWatcher
09:27
<~Vornicus>
I don't even know.
10:39 You're now known as TheWatcher[swim]
10:47 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has joined #code
11:49 AverageJoe [evil1@Nightstar-4b668a07.ph.cox.net] has quit [[NS] Quit: Leaving]
12:46 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
12:53 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has quit [[NS] Quit: Going dooooown...]
12:54 Orthia [orthianz@3CF3A5.E1CD01.B089B9.1E14D1] has joined #code
12:54 mode/#code [+o Orthia] by ChanServ
13:12 You're now known as TheWatcher
14:47 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
15:28 sshine [simon@Nightstar-2aa33f9d.pronoia.dk] has quit [Ping timeout: 121 seconds]
15:28 sshine [simon@Nightstar-2aa33f9d.pronoia.dk] has joined #code
17:23 celticminstrel [celticminst@Nightstar-8403057e.dsl.bell.ca] has joined #code
17:23 mode/#code [+o celticminstrel] by ChanServ
17:34 Typh|offline is now known as Typherix
17:38 Turaiel[Offline] is now known as Turaiel
17:43 * AnnoDomini manages to get drivers and software for the HMR. I got to the point where I can receive radio, which is getting somewhere.
17:49 Turaiel is now known as Turaiel[Offline]
18:13
< AnnoDomini>
Ugh. Can this thing even receive normal TV?
18:14 [R] is now known as DrDREAM
18:29 Turaiel[Offline] is now known as Turaiel
18:47 Typherix is now known as Typh|offline
19:09 ktemkin[awol] is now known as ktemkin
19:26 Derakon[AFK] is now known as Derakon
19:40 Kindamoody|out is now known as Kindamoody
19:57 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds]
20:21 Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code
20:21 mode/#code [+ao Derakon Derakon] by ChanServ
20:21 Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has quit [Ping timeout: 121 seconds]
20:22 Turaiel [Brandon@Nightstar-7dc8031d.mi.comcast.net] has joined #code
20:26 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:26 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:10 Kindamoody is now known as Kindamoody[zZz]
21:37
<@Tarinaky>
AnnoDomini: Dumb question but... Analogue TV or Digital TV?
21:48
< AnnoDomini>
I don't know about these things. I want TV. That you get on a TV set.
22:03
< Turaiel>
The question still applies
22:03
< Turaiel>
I am so late...
22:04
< Turaiel>
Normal TV as in with an antenna?
22:06
<@Azash>
http://fc00.deviantart.net/fs71/f/2012/154/3/2/me_as_a_evil_hacker_by_mitchpratt tv-d526oqp.jpg
22:07
< Turaiel>
And AnnoDomini, what is "this thing">
22:08 DrDREAM is now known as [R]
22:20 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down]
22:28
< ktemkin>
AnnoDomini: Did you ever get the kernel driver to recognize the device?
22:29 Turaiel is now known as Turaiel[Offline]
22:39
<@Tarinaky>
AnnoDomini: You should check if the country you are in has the type of tv signal your equipment is designed to acquire.
22:40
<@Tarinaky>
I did say it was a dumb question >.>
22:44 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds]
22:44
< AnnoDomini>
ktemkin: No. I am on WinXP now. The manufacturer's drivers and software worked for getting radio.
22:45
< AnnoDomini>
Turaiel[Offline]: Terratec T-Stick+.
22:50 Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
22:50 mode/#code [+o Pandemic] by ChanServ
22:56 ErikMesoy is now known as ErikMesoy|sleep
23:19
<@Namegduf>
Linked to a thread with someone complaining about C / C++ having sharp edges... and the one they choose is that f() + g() has an arbitrary evaluation order.
23:20
<@Tarinaky>
I struggle to think of serious languages where f() + g() doesn't have arbitrary evaluation order...
23:21
<@Namegduf>
I know.
23:21
<@Tarinaky>
I have no words.
23:21
<@Namegduf>
Also any code relying on the evaluation order of a mathematical expression is basically begging for some later programmer who assumes that + is commutative to break the program.
23:21
< [R]>
...
23:21
< [R]>
Good fuck
23:22
< [R]>
If you're running into a problem where that's an issue... you're doing something wrong.
23:22
<@Tarinaky>
If you're running into a problem where that's an issue... you're the problem.
23:22
< [R]>
Yeah
23:23
<@Namegduf>
Yes.
23:25
<~Vornicus>
(addition in floating point numbers is commutative but not associative. there's an entire field of study about what to do about it)
23:26
<@Namegduf>
Yeah. Also some types of matrix multiplication aren't commutative, despite regular multiplication being so.
23:27
<@Tarinaky>
Commutative but not associative means...?
23:28
< ktemkin>
You can flip the order of the operands, but not change the order of evaluation.
23:28
<~Vornicus>
commutative but not associative: (a+b)+c = (b+a)+c != a+(b+c)
23:28
<@Namegduf>
(a + b) + c == (b + a) + c, but (a + b) + c does not essentially = a + (b + c)
23:28
<@Namegduf>
Beaten to it
23:28
<@Tarinaky>
I... see.
23:30
<&McMartin>
Not being associative is a royal pain in the ass because associativity is one of the most basic things you like to assert about your mathematical operators
23:31
<&McMartin>
That said, a programmer assuming that * is commutative is not reading the documentation carefully enough.
23:32
<@Namegduf>
I would tend to suspect that non-commutative * still results in bugs which get missed from reordering, but thanks to matrices we just need to live with it
23:32
<&McMartin>
Well
23:33
<&McMartin>
That's kind of the thing
23:33
<@Namegduf>
Less bad than +, which has a stronger "this is a commutative operator" thing
23:33
<&McMartin>
Quite so.
23:33
<~Vornicus>
though it's not commutative on strings~
23:33
<&McMartin>
Also quite so~
23:34
<&McMartin>
Though given the etymology of &, and how + is a piece of that, I'm willing to say it gets a claim on +.
23:35
<&McMartin>
Oh, OK, I have a semi-sane version of evaluation order mattering on f() + g() if you're lazy or careless as opposed to actively malevolent.
23:36
<&McMartin>
If you're doing unit testing by turning on debug logging and diffing log files.
23:36
<&McMartin>
You'll get false positives with a naive log format.
23:36
<@Namegduf>
Oooh.
23:36
<@Namegduf>
That's a pretty good one.
23:36
<@Namegduf>
Consistency mattering.
23:37
<@Namegduf>
For debug side effects.
23:37
<&McMartin>
Honestly, there even "lazy or careless" may be too strong.
23:38
<@Namegduf>
Might be a bit. I think it's a very fragile method of doing testing which would be broken by a lot of things- which means it'd be not very good for checking changes to code still worked.
23:38
<@Namegduf>
It'd basically serve as a reminder to manually check the results when you went to rebaseline it.
23:38
<@Namegduf>
This is the current state of GUI testing, so it's workable.
23:42 VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code
23:46 You're now known as TheWatcher[T-2]
--- Log closed Mon Jul 01 00:00:49 2013
code logs -> 2013 -> Sun, 30 Jun 2013< code.20130629.log - code.20130701.log >

[ Latest log file ]