code logs -> 2016 -> Thu, 26 May 2016< code.20160525.log - code.20160527.log >
--- Log opened Thu May 26 00:00:04 2016
00:07 Turaiel[Offline] is now known as Turaiel
00:14
< Azash>
Reiv: Not necessarily pre-installed, slackbot is the name they use for the core one but you can develop your own with that websocket+REST API'
00:15
<@Reiv>
there you go then
00:15
<@Reiv>
I hadn't seen a slack instance without it, so
00:17
< Azash>
Yeah it's more of an interface for the core functionaly
00:17
< Azash>
Compare to FooServ vs. IRC bots
00:17
< Azash>
s/y$/ity/
00:42 Derakon_ is now known as Derakon
00:42 mode/#code [+ao Derakon Derakon] by ChanServ
00:45 catadroid [catadroid@Nightstar-rakpdl.dab.02.net] has joined #code
00:59 Kindamoody is now known as Kindamoody[zZz]
00:59 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has joined #code
00:59 mode/#code [+o himi] by ChanServ
01:01 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
04:04 yardboy [yard_b0y@Nightstar-etv.nu6.56.172.IP] has joined #code
04:07
< yardboy>
anybody still awake over there?
04:09 yardb0y [yard_b0y@Nightstar-5oqh4h.tmodns.net] has joined #code
04:09 yardb0y [yard_b0y@Nightstar-5oqh4h.tmodns.net] has quit [[NS] Quit: Leaving]
04:12 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Ping timeout: 121 seconds]
04:12 yardboy [yard_b0y@Nightstar-etv.nu6.56.172.IP] has quit [Ping timeout: 121 seconds]
04:27
<~Vornicus>
noone ever
04:32
< [R]>
Aynone else find him really annoying?
04:32
<~Vornicus>
eh
04:39 Turaiel is now known as Turaiel[Offline]
04:59 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has joined #code
04:59 mode/#code [+ao McMartin McMartin] by ChanServ
05:09 Derakon is now known as Derakon[AFK]
05:30 crystalclaw|AFK is now known as crystalclaw
05:41 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [Ping timeout: 121 seconds]
05:43 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
05:43 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
05:55 catadroid` [catadroid@Nightstar-gsvp52.dab.02.net] has joined #code
05:57 catadroid [catadroid@Nightstar-rakpdl.dab.02.net] has quit [Ping timeout: 121 seconds]
06:57 crystalclaw is now known as crystalclaw|AFK
07:34 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [Ping timeout: 121 seconds]
07:40 catadroid` is now known as catadroid
07:40 Kindamoody[zZz] is now known as Kindamoody
07:55 himi [fow035@Nightstar-dm0.2ni.203.150.IP] has quit [Ping timeout: 121 seconds]
08:20 catadroid [catadroid@Nightstar-gsvp52.dab.02.net] has quit [[NS] Quit: Bye]
08:26 catadroid [catadroid@Nightstar-gsvp52.dab.02.net] has joined #code
09:03 catadroid [catadroid@Nightstar-gsvp52.dab.02.net] has quit [[NS] Quit: Bye]
09:08 Kindamoody is now known as Kindamoody|afk
09:41 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has quit [[NS] Quit: bye]
10:05 himi [fow035@Nightstar-v37cpe.internode.on.net] has joined #code
10:05 mode/#code [+o himi] by ChanServ
10:07 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
10:09 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has quit [NickServ (RECOVER command used by Xon2)]
10:09 Xon [Xon@Nightstar-j72.ku7.252.119.IP] has joined #code
10:24
<@TheWatcher>
I think my comment for the day: # It's gone well so far, try to make a hash of it!
11:08 ion [Owner@Nightstar-6grqph.vs.shawcable.net] has joined #code
12:42
< abudhabi>
What proportion of decimal fractions cannot be represented precisely in binary notation?
12:45
<@TheWatcher>
Are you using fixed or floating point? Because for floating point hte answer is "none of them can be represented precisely"
12:51
< abudhabi>
Floating point. Um, I'm pretty sure that "0.5" can be represented precisely in both binary and decimal.
12:51
< abudhabi>
(Or am I hallucinating?)
12:54
<@TheWatcher>
The instant you touch IEEE 754, you have no such thing as an exact representation.
13:00
< abudhabi>
OK.
13:01 catadroid [catadroid@Nightstar-0hdfnq.dab.02.net] has joined #code
13:02
<@gnolam>
Also, the proportion is roughly lim -> 0, given that the number of decimal fractions is infinite.~
13:06 Emm [NSkiwiirc@Nightstar-v1pu8a.static.chello.nl] has joined #code
13:14
< abudhabi>
gnolam: Yeah, this is what I wanted to know; the limit towards which unrepresentable fractions tend.
13:17
< pjdelport>
abudhabi: Good question.
13:18
< pjdelport>
abudhabi: You could formalise that as the density of binary fractions in the Stern-Brocot tree or Farey sequence, up to various depths.
13:26
< pjdelport>
abudhabi: I just did a quick experiment: it looks like it approaches ~0.5 for increasing lengths of the Farey sequence.
13:26
< pjdelport>
It alternates on either side, approaching closer.
13:34
< pjdelport>
abudhabi: So the density of rationals with divisors congruent to 2 seems to be about a half.
13:35
< pjdelport>
Congruent to 3 seems to be about a third
13:36
< pjdelport>
Congruent to 5 seems about a fifth
13:37
< pjdelport>
Curiously, 4 also seems to be around ~0.2...
13:37
< pjdelport>
Not a quarter as you might expect.
13:38
< pjdelport>
All the other primes seem to have a rational divisor density of 1/n
13:39
< pjdelport>
The compounds seem to have weirder densitities
13:40
< pjdelport>
Congruent to 6 is ~0.0908
13:42
< abudhabi>
I have no idea what you are doing! ;)
13:43
< pjdelport>
abudhabi: I just hacked a quick thing to enumerate the rationals up to a certain depth with the Farey sequence, and then count the density of rationals with a certain divisor congruence.
13:43
< pjdelport>
Which is maths-speak for what you were discussing above.
13:45
< pjdelport>
IOW, the fractions that you can express in binary notation is the same as the proportion of fractions that have a divisor divisible by two.
13:45
< abudhabi>
OK. The maths speak is what I don't parse.
13:45
< pjdelport>
"divisible by two" = "congruent to two" more or less.
13:46
< pjdelport>
Oh, I see you actually asked about decimal fractions, not all fractions.
13:46
< pjdelport>
That's also easy to work out.
13:50
< pjdelport>
Oh, whoops
13:50
< pjdelport>
I made a calculation error earlier.
13:52
< abudhabi>
Yeah, the point is to see how many are unrepresentable in binary like 0.1 and how many are representable like 0.25.
13:53
< pjdelport>
0.25 is representable in binary.
13:53
< pjdelport>
(Oh, nevermind, read that wrong)
13:54
< pjdelport>
Okay, so for arbitrary rationals, the proportion seems to be 1/(1+n) for primes
13:54
< pjdelport>
So ~1/3 of rationals are binary, ~1/4 are ternary, and so on.
13:56
< pjdelport>
Okay, so considering 0.00⦠to 0.99â¦
14:01
< pjdelport>
For various lengths of digits, the density of binary-representable ones seems to approach 1:
14:01
< pjdelport>
0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.9921875
14:02
< pjdelport>
So that's a density of 0.5 for 0.0 to 0.9
14:02
< pjdelport>
0.75 for 0.00 to 0.99, and so on.
14:03
< pjdelport>
So the general rule seems to be that for n decimal digits of precision, 1 / 2^n will not be binary-representable.
14:04
< pjdelport>
A proportion of 1/2^n that is.
14:04
< pjdelport>
So 1 - 1/2^n will be representable
14:06
< abudhabi>
Huh. That's actually quite different from the ballpark gnolam gave.
14:08
<@gnolam>
Because my ballpark is not assuming that floats are infinitely large, but rather 32 or 64 bits.
14:08
<@gnolam>
A.k.a. the real world.~
14:15
<@TheWatcher>
Like I said, when you're using IEEE 754, you're fucked if you need exact representation for anything other than 0, NaN, negative infinity, and positive infinity; essentially everything else should be treated as an approximation, especially the instant you start actually using them in calculations.
14:18
<@TheWatcher>
(+0 and -0 is supported as the sign bit can be 1 or 0 when the exponent and mantissa are both 0, but hey)
14:47
< pjdelport>
TheWatcher: IEEE 754 does have exact representations; numeral analysis can get pretty involved, though.
14:47
< pjdelport>
"Treat everything as approximate" is a good defensive first approximation, but you can do better. :)
14:47
< pjdelport>
If you're careful.
14:59
< catadroid>
I once did better
15:37
< catadroid>
I find myself agreeing rather a lot with Hyrum Wright and Titus Winters on what makes good and bad tests
15:49 Emm [NSkiwiirc@Nightstar-v1pu8a.static.chello.nl] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
16:06 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
16:06 mode/#code [+o celticminstrel] by ChanServ
16:08 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
16:08 mode/#code [+o Crossfire] by ChanServ
16:16
< ToxicFrog>
TheWatcher: integers are exact depending on how many sig figs there are, and in particular anything that will fit into a [u]int32_t is exactly representable in a double.
16:17
<@celticminstrel>
So a double has >+ 32 significant figures.
16:17
<@celticminstrel>
^ >=
16:19
< ToxicFrog>
celticminstrel: a double has 52 bits mantissa (== 53 bits precision), 11 bits exponent and 1 sign bit.
16:20
<@celticminstrel>
I guess that means [u]int64_t will fit in a quad-float.
16:22
< ToxicFrog>
Yes.
16:23
<@celticminstrel>
I wonder if 80-bit floats exist anymore outside of legacy stuff.
16:37
< catadroid>
Today I am mentoring a new programmer
16:37
< catadroid>
Entirely accidentally
16:37
< catadroid>
He thinks our tools are, and I quote "cool"
16:37 * catadroid beams excessively
16:43
< ToxicFrog>
neat!
16:54 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has quit [[NS] Quit: If I had a world of my own, everything would be nonsense. Nothing would be what it is because everything would be what it isn't. And contrary-wise; what it is it wouldn't be, and what it wouldn't be, it would. You see?]
16:54 abudhabi is now known as Da_Whinea
16:54 Da_Whinea is now known as abudhabi
16:55 Crossfire [Z@Nightstar-r9lk5l.cust.comxnet.dk] has joined #code
16:55 mode/#code [+o Crossfire] by ChanServ
17:09 gizmore [kvirc@Nightstar-a8j3d7.dip0.t-ipconnect.de] has joined #code
17:51 macdjord|wurk [macdjord@Nightstar-pk7ki5.cable.rogers.com] has quit [Ping timeout: 121 seconds]
17:59 macdjord|wurk [macdjord@Nightstar-pk7ki5.cable.rogers.com] has joined #code
17:59 mode/#code [+o macdjord|wurk] by ChanServ
18:58 catadroid` [catadroid@Nightstar-gshm6l.dab.02.net] has joined #code
18:59 catadroid [catadroid@Nightstar-0hdfnq.dab.02.net] has quit [Ping timeout: 121 seconds]
19:14 catadroid` [catadroid@Nightstar-gshm6l.dab.02.net] has quit [[NS] Quit: Bye]
19:41 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
19:41 mode/#code [+qo Vornicus Vornicus] by ChanServ
20:27 crystalclaw|AFK is now known as crystalclaw
20:40 gizmore [kvirc@Nightstar-a8j3d7.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
21:08 * McMartin eyes the Rust patchnotes.
21:08
<&McMartin>
"The time complexity of comparing variables for equivalence during type unification is reduced from O(n!) to O(n). As a result, some programming patterns compile much, much more quickly."
21:08
<&McMartin>
... yeah, I bet.
21:08
<@celticminstrel>
Whaaat!
21:09
<&McMartin>
I'm assuming they've moved from "brute force" to "do it right"
21:09
<&McMartin>
I super-vaguely recall that a full type-inference pass in ML-like languages is O(n^3), so unifying two variables being O(n) with The Right Algorithm doesn't strike me as implausible
21:10
<&McMartin>
But I'm going on vague recollection and ass-pulls here, so~
21:31
<~Vornicus>
O(n!).
21:31
<~Vornicus>
What the hell were they doing
21:36
<&McMartin>
Testing all possible permutations of something by brute force, I'd guess
21:36
<&McMartin>
Still cheaper than all possible subsets!
22:10
<~Vornicus>
it's the other way around actually
22:11
< Azash>
Google won, so yay
22:15
<&McMartin>
Oh, wait, right
22:15
<&McMartin>
All subsets is 2^n
22:15
<&McMartin>
What am I thinking of that's the canonical n^n problem
22:20 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has quit [Ping timeout: 121 seconds]
22:23 Alek [Alek@Nightstar-9qtiqv.il.comcast.net] has joined #code
22:23 mode/#code [+o Alek] by ChanServ
22:29 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
22:29 mode/#code [+o Reiv] by ChanServ
22:33
<~Vornicus>
yeah, this is like -- 1e9 vs 3e32 vs 2e44
22:38
<@Reiv>
what
22:39
<&McMartin>
Reiv: Latest Rust release notes indicate one of the processes run during compilation has been sped up to linear time from, er, factorial time
22:41
<@Reiv>
Wait /what/
22:45
< Azash>
Hahahah
22:52
<~Vornicus>
You are officially the fourth person to have that reaction
22:55
<&McMartin>
We may assume that n was generally very small
22:55
<@Tamber>
s/assume/hope/ ?
22:59
<&McMartin>
No, I mean
22:59
<&McMartin>
I've used it for projects on the scale of thousands of lines of code
22:59
<&McMartin>
And it compiled at a speed comparable to similarly-sized Java programs
23:00
<&McMartin>
As opposed to "life of the universe"
23:01
<@Tamber>
Ah, can't be that bad, then~
23:01
<&McMartin>
Certain programming strategies apparently were very slow to compile
23:01
<&McMartin>
Not anymore, because this is after all a thing we know how to do
23:13 Turaiel[Offline] is now known as Turaiel
23:23 himi [fow035@Nightstar-v37cpe.internode.on.net] has quit [Operation timed out]
23:23 Kindamoody|afk is now known as Kindamoody
23:29 Emmy is now known as Emmy-zZz
23:38
<@Reiv>
I think the bit that makes me pause
23:39
<@Reiv>
Is that if you *ever* find yourself writing factorial-time code, you want to double check you really can't do it a better way
23:39
<@Reiv>
Then
23:39
<@Reiv>
To have that reduced to LINEAR
23:40
<@Reiv>
I mean, factorial to polynomial would be "Oh thank goodness, we have sanity back in the system"
23:40
<@Reiv>
to nlogn would be "Wow, guys did a great job there"
23:40
<@Reiv>
to n? "Wait, what the fuck were you doing the first time round"
23:42
< pjdelport>
It really depends on the expected range of N too.
23:42
<@Reiv>
Well, sure, granted
23:43
< Azash>
Reiv: Reminds me a little of the guy who was head of the CS dept when I studied actively, one of the two people here who have an algorithm named after them
23:43
<@Reiv>
sweet
23:43
< Azash>
Designed a suffix tree algorithm and took the state of the art from n^2 or n^3 to n, iirc
23:43
<@Reiv>
very sweet
23:43
<@Reiv>
But then, polynomial to n is... hm, how to put it
23:44
<@Reiv>
"Congratulations on an exciting algorathm that took a perfectly reasonable runtime and obliterated it through cunning"
23:44
<@Reiv>
Factorial to n
23:45
<@Reiv>
That starts to have me eye the Factorial part askance >_>
23:45
< Azash>
Is less impressive and more "what were you doing to begin with" ?
23:46
<@Reiv>
Correct
23:46
<@Reiv>
I mean, if it really was best practice routines that we were trapped in one of the worst scaling designs imaginable, but little progress had been made, sure
23:46
< Azash>
Reiv: On a trivia note http://stackoverflow.com/questions/9452701/ukkonens-suffix-tree-algorithm-in-pla in-english/9513423#9513423
23:47
<@Reiv>
But, you know, factorial runtimes are the kind of thing where people will usually try to at least come up with a polynomial
23:47
< Azash>
Yeah
23:47
<@Reiv>
And if you find it, you celebrate
23:47
<@Reiv>
Finding a sodding linear makes one wonder if someone hadn't been lazy >_>
23:50
<&McMartin>
Oh uh
23:50
<&McMartin>
This is a long-solved problem
23:50
<&McMartin>
They were really obviously being lazy
23:53 Kindamoody is now known as Kindamoody[zZz]
23:54
< Azash>
McMartin: That was the whole point, yeah
23:56
<@Reiv>
Thank you for confirming my suspicions.
--- Log closed Fri May 27 00:00:20 2016
code logs -> 2016 -> Thu, 26 May 2016< code.20160525.log - code.20160527.log >

[ Latest log file ]