code logs -> 2016 -> Mon, 27 Jun 2016< code.20160626.log - code.20160628.log >
--- Log opened Mon Jun 27 00:00:24 2016
00:07 Kindamoody is now known as Kindamoody[zZz]
01:20
<&Derakon>
Random thought: what does "i = ++i++" do in C?
01:23
<@celticminstrel>
My first thought is, is that undefined behaviour?
01:24
<@celticminstrel>
Even if not, though, it's a pretty weird statement... it's not clear to me which increment would be executed first, for instance.
01:24
<@Azash>
I wouldn't think so?
01:24
<@Azash>
It increments i by 1, sets it to itself, and increments it by 1 again
01:24
<@Azash>
afaict
01:25
<@celticminstrel>
...how do you get that from it?
01:25
<&Derakon>
It may well be undefined and/or compiler-dependent.
01:25
<@celticminstrel>
If you go strictly right to left...
01:26
<@celticminstrel>
If that's how the precedence works, I think it wouldn't compile.
01:26
<@celticminstrel>
Because the post-increment would return an r-value, and pre-increment cannot be applied to an r-value.
01:27
<@celticminstrel>
Assuming that it compiles, I guess the pre-increment would first increase i be 1; then, the pre-increment would increase it again, after which the assignment effectively decrements it. So the final effect is of i being increased by 1.
01:27
<@celticminstrel>
s/be/by/
01:27
<@Azash>
Hm.. According to this table at cppreference both prefix and suffix increments have precedence over assignment
01:28 * Azash forgets
01:28
<&Derakon>
Yes, because j = ++i should execute the ++ before the =.
01:28
<@celticminstrel>
Hmm, that table seems to support post-increment being executed first, though.
01:28
<@Azash>
I thought one of those was lower to allow eg. lower = higher_by_one++; or so
01:29
<@celticminstrel>
"lower = higher_by_one++" increments higher_by_one, then assigns its former value to lower.
01:29
<@Azash>
"I thought one of those" was there to denote that I forgot which one that was
01:30
<@Azash>
But apparently neither one does
01:30
<@celticminstrel>
Based on that table, I think Derakon's statement probably should not compile...
01:30
<@Azash>
And yeah celticminstrel that's actually what I meant
01:30
<@Azash>
I didn't realize the return worked in mysterious ways though
01:31
<@celticminstrel>
The normal implementation of i++ is {auto j = i; ++i; return k}
01:31
<@celticminstrel>
j, not k
01:31
<@celticminstrel>
Copy, increment, return the copy.
01:31
<@Azash>
Right
01:32
<&Derakon>
Which makes it super-weird that "i++" is the default.
01:32
<&Derakon>
Postincrement should be deprecated in favor of pre-increment in basically every scenario.
01:32
<@celticminstrel>
Preincrement is more efficient in most cases, yeah. I don't think it actually makes a difference with integers, though.
01:33
<&Derakon>
It's not so much efficiency as it is having mechanics that make sense.
01:34
<&Derakon>
"increment i and then return the non-incremented value". Who ever thought that was a useful thing to do?
01:34
<@celticminstrel>
I don't know, but I can't claim it's not useful.
01:35
<&Derakon>
What for?
01:36 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has joined #code
01:36 mode/#code [+o himi] by ChanServ
01:43 catadroid [catadroid@Nightstar-2k0p46.dsl.teksavvy.com] has joined #code
02:21 JustBob [justbob@ServerAdministrator.Nightstar.Net] has joined #code
02:21 mode/#code [+o JustBob] by ChanServ
03:30 crystalclaw|AFK is now known as crystalclaw
03:45 Derakon [chriswei@Nightstar-2bf.47h.168.50.IP] has quit [[NS] Quit: Leaving]
03:47 Derakon [chriswei@Nightstar-5mvs4e.ca.comcast.net] has joined #code
03:47 mode/#code [+ao Derakon Derakon] by ChanServ
03:47
<&McMartin>
while (*dest++ = *src++);
03:47
<&McMartin>
Is the traditional implementation of strcpy
03:49
<&McMartin>
Which is also the MOVSB instruction on x86, and the postincrement addressing mode in a lot of the old minicomputers
03:49
<&McMartin>
"After you read this pointer, make the pointer point to the next thing"
03:50
<&McMartin>
C was simply directly exposing a generic chip capability of the time.
04:45 crystalclaw is now known as crystalclaw|AFK
05:03 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
05:07 Derakon is now known as Derakon[AFK]
05:12 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:21 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has joined #code
05:21 mode/#code [+o Reiv] by ChanServ
05:42 Turaiel is now known as Turaiel[Offline]
06:39 Kindamoody[zZz] is now known as Kindamoody
07:00 Reiv [NSwebIRC@Nightstar-q8avec.kinect.net.nz] has quit [Ping timeout: 121 seconds]
07:58 Shady [ShadyGuru@Nightstar-qfckjl.tv13.ptd.net] has quit [[NS] Quit: Yay, he's gone]
08:21 Kindamoody is now known as Kindamoody|afk
08:38 himi [sjjf@Nightstar-dm0.2ni.203.150.IP] has quit [Connection closed]
10:46 Reiv [NSwebIRC@Nightstar-sotclq.xtra.co.nz] has joined #code
10:46 mode/#code [+o Reiv] by ChanServ
11:21 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has quit [Connection closed]
11:21 gnolam [lenin@Nightstar-t1tbf0.cust.bahnhof.se] has joined #code
11:21 mode/#code [+o gnolam] by ChanServ
12:18 catadroid` [catadroid@Nightstar-2k0p46.dsl.teksavvy.com] has joined #code
12:18 catadroid [catadroid@Nightstar-2k0p46.dsl.teksavvy.com] has quit [Connection closed]
12:50 catadroid` [catadroid@Nightstar-2k0p46.dsl.teksavvy.com] has quit [[NS] Quit: Bye]
14:22 Reiv [NSwebIRC@Nightstar-sotclq.xtra.co.nz] has quit [Ping timeout: 121 seconds]
14:40 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
14:40 mode/#code [+o celticminstrel] by ChanServ
14:53 * TheWatcher flails
14:53
<@TheWatcher>
Temporary variables everywhere
14:57
<~Vornicus>
gonna put that under that picture of Buzz Lightyear?
15:06 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
15:07 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
15:07 mode/#code [+o celticminstrel] by ChanServ
15:18 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
15:18 celmin [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
15:18 mode/#code [+o celmin] by ChanServ
15:32 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection reset by peer]
16:52 Shady [ShadyGuru@Nightstar-qfckjl.tv13.ptd.net] has joined #code
17:18 crystalclaw|AFK is now known as crystalclaw
17:36 crystalclaw is now known as crystalclaw|AFK
18:22 Shady [ShadyGuru@Nightstar-qfckjl.tv13.ptd.net] has quit [Operation timed out]
18:24 Shady [ShadyGuru@Nightstar-qfckjl.tv13.ptd.net] has joined #code
18:59
<@gnolam>
https://twitter.com/cperciva/status/746590650661888000
19:13 Kindamoody|afk is now known as Kindamoody
19:13 crystalclaw|AFK is now known as crystalclaw
19:18 celmin [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
19:19 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
19:19 mode/#code [+o celticminstrel] by ChanServ
19:38 gizmore [kvirc@Nightstar-veprua.dip0.t-ipconnect.de] has joined #code
19:40 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
20:01 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
20:01 mode/#code [+o celticminstrel] by ChanServ
20:25 celmin [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
20:26 mode/#code [+o celmin] by ChanServ
20:27 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
20:27 celmin is now known as celticminstrel
20:30 crystalclaw is now known as crystalclaw|AFK
20:33 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
20:33 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
20:33 mode/#code [+o celticminstrel] by ChanServ
20:37 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Operation timed out]
20:39 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
20:39 mode/#code [+o celticminstrel] by ChanServ
20:51 gizmore|2 [kvirc@Nightstar-veprua.dip0.t-ipconnect.de] has joined #code
20:52 gizmore|2 [kvirc@Nightstar-veprua.dip0.t-ipconnect.de] has quit [[NS] Quit: KVIrc 4.9.2 Aria http://www.kvirc.net/]
20:55 gizmore [kvirc@Nightstar-veprua.dip0.t-ipconnect.de] has quit [Ping timeout: 121 seconds]
20:59 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Connection closed]
20:59 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
20:59 mode/#code [+o celticminstrel] by ChanServ
21:05
<&McMartin>
"Version 1.0 of .NET Core, the open source, cross-platform .NET runtime platform that was first announced in 2014, has been released today."
21:05
<&McMartin>
"Microsoft picked an unusual venue to announce the release: the Red Hat Summit."
21:12 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
21:15 crystalclaw|AFK is now known as crystalclaw
21:18 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
21:18 mode/#code [+o celticminstrel] by ChanServ
21:24 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
21:24 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
21:24 mode/#code [+o celticminstrel] by ChanServ
21:39
<&McMartin>
TIL: std::shared_ptr lets you call the routines from std::atomic on itself
21:41 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
21:41 mode/#code [+qo Vornicus Vornicus] by ChanServ
21:45 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
21:47 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
21:47 mode/#code [+o celticminstrel] by ChanServ
22:01 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
22:02 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
22:02 mode/#code [+o celticminstrel] by ChanServ
22:02 Reiv [NSwebIRC@Nightstar-sotclq.xtra.co.nz] has joined #code
22:02 mode/#code [+o Reiv] by ChanServ
22:19 celmin [celticminst@Nightstar-80kfip.dsl.bell.ca] has joined #code
22:19 mode/#code [+o celmin] by ChanServ
22:19 celticminstrel [celticminst@Nightstar-80kfip.dsl.bell.ca] has quit [Connection closed]
22:19 celmin is now known as celticminstrel
22:32 ricer [ricer@Nightstar-52ic2g.wechall.net] has joined #code
22:55 Kindamoody is now known as Kindamoody[zZz]
23:13 crystalclaw is now known as crystalclaw|AFK
23:57 Turaiel[Offline] is now known as Turaiel
--- Log closed Tue Jun 28 00:00:40 2016
code logs -> 2016 -> Mon, 27 Jun 2016< code.20160626.log - code.20160628.log >

[ Latest log file ]