code logs -> 2016 -> Sat, 07 May 2016< code.20160506.log - code.20160508.log >
--- Log opened Sat May 07 00:00:45 2016
00:29
<&McMartin>
Man
00:29
<&McMartin>
I am tempted to set up my system to play the MoO2 new-technology jingle whenever my unit tests pass
00:32
<~Vornicus>
At resmark we used the Sims "water accident" song whenever somebody pushed a commit that failed
00:41
< catalyst>
I got the unit tests building and passing again on $project today
00:41
< catalyst>
they tend to rot when I'm not there :<
00:44
<&ToxicFrog>
Boo
00:44
<&ToxicFrog>
You need to enforce test greenness with nuclear failsafes^W^W presubmit checks.
00:46
<&McMartin>
It is not always obvious in our cases what correct behavior even is yet, so things are still in flux
00:47
<&ToxicFrog>
McMartin: the rule in these parts is that you don't have to have unit tests (although if you don't, be prepared to convince the code reviewer why this is OK)
00:47
<&McMartin>
Also, a lot of my "unit tests" right now are actually things like "ensure the language runtime actually destroys objects in the order the documentation implies but does not actually *state* that it does"
00:48
<&ToxicFrog>
But you can't check anything that breaks those tests that already exist.
00:48
<&McMartin>
Yeah
00:48
<&McMartin>
This implies things like "a meaningful unit test infrastructure that can be automatically run", or, if we're going to get right down to it, "a centralized build system"
00:48
<&ToxicFrog>
(or well, you can, but it requires pushing the Big Red Button and you'd better have a really good reason for it)
00:48
<&ToxicFrog>
It does, yews.
00:48
<&McMartin>
The project I'm on is... not at that level of development yet.
00:49
<&McMartin>
We've finally managed to set up a system that will properly do unit tests in an iOS simulator but (a) that's not *really* testing the code and (b) it still only really works on his rig.
00:51
<&McMartin>
But yeah, my region of responsibility right now is a library with an API that is still being negotiated
00:52
<&McMartin>
So my "unit tests" at the moment are mostly 20-line sample programs that print out fixed values
00:52 * ToxicFrog nods
00:52
<&ToxicFrog>
catalyst, on the other hand, works for a long-established game developer~
00:52
<&McMartin>
One could imagine feeding that to a diff on every compile, but, well, with no buildslaves this is literally more work than just typing a command after a build.
00:53
<&McMartin>
Yeeees
00:53
<&McMartin>
Also, eventually the library will have actual enforceable contracts, and a bunch of good stuff is waiting to go on that~
00:53
<&McMartin>
I still want to see them running Actually On An iOS Device though before I'm comfortable with it
00:53
<&McMartin>
... especially since I'm going to be relying on std::is_standard_layout<> here
00:57
<&McMartin>
Which in turn may rely on several reinterpret_cast<>s, unless I can actually use static_cast<>
00:57 * McMartin checks those rules.
00:57
<&McMartin>
Anyway. Stuff where architectural trivia is likely to introduce Surprises(tm).
01:01
<&McMartin>
Yeah. I can't use static_cast. That is... sensible but makes me feel like there has to be a better way to do this than a pair of reinterpret_cast<>s.
01:02
<&McMartin>
I have an object of unknown type, with a member of known type and a known offset within said unknown type. I want a pointer to that member.
01:03
<&McMartin>
The best technique I have for that right now is to reinterpret_cast<char *> it, add the offset, then reinterpret_cast<known_type *> the result.
01:04
<&McMartin>
Maybe I just want to use pointers to members directly.
01:05
<&McMartin>
... but maybe I *don't* because then I need a separate object for representing each different known type.
01:05
<&McMartin>
(I'm trying to do a semi-general demarshaller for a passel of related types)
01:09
<&McMartin>
Yeah, I think if I want a consistent object descriptor I need to rely on offsetof (which is OK because std::is_standard_layout<> says it is) and then reinterpret-through-char * to get at the member.
01:12
<~Vornicus>
I failed miserably at understanding the term "demarshaller" and thought you were speaking like yiddish for a minute
02:13 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
02:26 catalyst [catalyst@Nightstar-890.fhp.187.81.IP] has quit [[NS] Quit: Leaving]
02:28 catadroid [catalyst@Nightstar-63m6gl.dab.02.net] has joined #code
03:35
<~Vornicus>
dem-ars-hal-ler or something
03:47
<&Derakon>
Dem arshes.
03:47
<&Derakon>
Sean Connery admiring the scenery.
05:23 Derakon is now known as Derakon[AFK]
06:12 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
06:43 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has quit [[NS] Quit: brb]
06:53 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has joined #code
06:53 mode/#code [+o Alek] by ChanServ
06:55 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has quit [[NS] Quit: ]
06:57 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has joined #code
06:57 mode/#code [+o Alek] by ChanServ
07:06 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
07:06 mode/#code [+o himi] by ChanServ
07:56 Kindamoody[zZz] is now known as Kindamoody
07:57 catadroid` [catalyst@Nightstar-rurha2.dab.02.net] has joined #code
08:00 catadroid [catalyst@Nightstar-63m6gl.dab.02.net] has quit [Ping timeout: 121 seconds]
10:00 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
10:00 mode/#code [+o Crossfire] by ChanServ
10:05 catadroid` [catalyst@Nightstar-rurha2.dab.02.net] has quit [[NS] Quit: Bye]
10:43 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
10:44 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
12:08 Kindamoody is now known as Kindamoody|afk
12:13 celticminstrel [celticminst@Nightstar-q0f7bb.dsl.bell.ca] has joined #code
12:13 mode/#code [+o celticminstrel] by ChanServ
12:28 Reiver [quassel@Nightstar-ksqup0.co.uk] has quit [Connection closed]
12:28 Orthia [quassel@Nightstar-ksqup0.co.uk] has quit [Connection closed]
12:28 Orthia [quassel@Nightstar-ksqup0.co.uk] has joined #code
12:28 mode/#code [+o Orthia] by ChanServ
12:28 Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code
12:28 mode/#code [+ao Reiver Reiver] by ChanServ
15:25 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has quit [[NS] Quit: Leaving]
15:28 thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
15:28 mode/#code [+o thalass] by ChanServ
15:30 catalyst [catalyst@Nightstar-bt5k4h.81.in-addr.arpa] has joined #code
16:20 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
17:06 Shady [ShadyGuru@Nightstar-ut3scg.t132.ptd.net] has joined #code
17:25 Shady [ShadyGuru@Nightstar-ut3scg.t132.ptd.net] has quit [[NS] Quit: Leaving]
17:54
< simon_>
what's a lossless decimal type? googling gives me Data.Decimal, but I don't know if it's standard.
17:57
< catalyst>
fixed point is a good term to look for
18:00
<&ToxicFrog>
simon_: what do you mean by "lossless" here?
18:00
<&ToxicFrog>
Fixed point is lossless inside its range, but has limited range (for that matter, floating point is also lossless under the right conditions)
18:03
<&ToxicFrog>
There's "can express any rational number", which is a different problem and not the same as "can express numbers to arbitrary precision", for which you want an arbitrary-precision/infinite-precision/bignum type.
18:09
< simon_>
ToxicFrog, whoops, thought this was #haskell :)
18:10
< simon_>
ToxicFrog, it can be bounded, but it shouldn't mess with the fractions like floats.
18:22
<&ToxicFrog>
Floats don't mess with the fractions either as long as you stay within the bounds!
18:22
<&ToxicFrog>
So the question here really is "what kind of behaviour do you want when you exceed the precision bounds of the type"
18:55 thalass [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
19:00 Derakon[AFK] is now known as Derakon
19:17 thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
19:17 mode/#code [+o thalass] by ChanServ
19:19 thalass is now known as Thalass|blendy
19:20
<@celticminstrel>
I wouldn't say bounds is the criteria for floats not messing with fractions.
19:20
<@celticminstrel>
It depends entirely on the denominator.
19:21
<@celticminstrel>
Data.Decimal is probably an arbitrary-precision type.
19:22
<@celticminstrel>
I think even arbitrary-precision can't be lossless though - it still won't be able to represent 1/3 exactly, right?
20:05 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:05 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:05 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:10 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has quit [Ping timeout: 121 seconds]
20:11 Turaiel[Offline] [Brandon@Nightstar-7mqsi0.mi.comcast.net] has joined #code
20:12 Vornotron [Vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving]
20:16
<&ToxicFrog>
celticminstrel: Data.Decimal is, according to the documentation, not arbitrary-precision.
20:17
<&ToxicFrog>
And the whole point of floating point is that whether you lose precision depends not on the denominator but on how many significant bits you need.
20:18
<&ToxicFrog>
A double can exactly represent both 2^100 and 1/2^100, but not either of those + 1
20:19
<@celticminstrel>
But it also can't exactly represent any fraction whose denominator cannot be factored into powers of 2. (Or powers of 10, if a decimal representation is being used.)
20:20
<@celticminstrel>
Or something like that.
20:20
<@celticminstrel>
That sounds wrong somehow.
20:20
<@celticminstrel>
I think it's simply that the denominator needs to be a power of the base.
20:39
<~Vornicus>
floating point numbers have a size limit on their numerator, and their denominator has to be a power of the base.
20:58 Thalass|blendy is now known as Thalass|nomnomnom
22:03 Kindamoody|afk is now known as Kindamoody
22:18 thalass [thalass@Nightstar-283.o7s.158.104.IP] has joined #code
22:18 mode/#code [+o thalass] by ChanServ
22:47 Derakon is now known as Derakon[AFK]
23:13 Kindamoody is now known as Kindamoody[zZz]
23:24 Derakon[AFK] is now known as Derakon
23:57 thalass [thalass@Nightstar-283.o7s.158.104.IP] has quit [Ping timeout: 121 seconds]
23:58 Thalass|nomnomnom is now known as Thalass
--- Log closed Sun May 08 00:00:01 2016
code logs -> 2016 -> Sat, 07 May 2016< code.20160506.log - code.20160508.log >

[ Latest log file ]