code logs -> 2019 -> Fri, 20 Sep 2019< code.20190919.log - code.20190921.log >
--- Log opened Fri Sep 20 00:00:37 2019
00:22 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
00:22 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
00:49
<&ToxicFrog>
jeroud: the ones I've used don't do that; either the ligature is genuinely the same length as the characters it replaces, or it's padded with whitespace on either side so that it has the same metrics.
00:50
<&ToxicFrog>
Also, yes, space-completion can go in the sea
00:50
<&ToxicFrog>
ST3 uses tab-completion by default
02:03 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
02:03 mode/#code [+o celticminstrel] by ChanServ
02:23 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has quit [Connection closed]
02:33 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
03:15 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Connection reset by peer]
03:16 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
03:16 mode/#code [+o Alek] by ChanServ
04:22 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
04:22 mode/#code [+o mac] by ChanServ
04:22 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [[NS] Quit: ]
04:23 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
04:23 mode/#code [+o Alek] by ChanServ
04:25 macdjord [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
04:27 macdjord|slep [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code
04:27 mode/#code [+o macdjord|slep] by ChanServ
04:30 mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds]
05:09
<&McMartin>
OK, it's up. https://bumbershootsoft.wordpress.com/2019/09/20/iglossolalia-mixing-all-of-apples-officially-supported-compiled-languages/
05:19
<@celticminstrel>
What do you mean lambdas are not really closures...
05:19 Derakon is now known as Derakon[AFK]
05:21
<&McMartin>
C++ lambdas don't treat upvalues as upvalues, they treat them as constructor arguments, and by default non-reference ones.
05:22
<&McMartin>
In particular, C++ does not jettison stack discipline the way traditional closures require.
05:22
<&McMartin>
If you phrase everything just so you can get the heap objects properly placed and managed, but you have to do that by hand and it's not something the C++ lambda syntax does for you.
05:24
<@celticminstrel>
I see...
05:25
<&McMartin>
Also they flubbed it in C++11, and one of the few actually valuable additions in C++14 is closing that gap... which also has the side effect that capturing certain kinds of upvalues in a lambda will render the variable unusable in its original context
05:25
<&McMartin>
(Move constructors! Fun for the whole family, if your family is a colony of rabid, meth-addled weasels.)
05:26
<@celticminstrel>
...what? What did they mess up in 11 that was fixed in 14?
05:27
<&McMartin>
Remember how I said that lambda captures are basically constructor arguments in C++?
05:27
<&McMartin>
You get a choice of copy-by-value or "take a reference" and if you take a reference there's no lifetime support for it, so watch your lifetimes, etc.
05:28
<&McMartin>
But C++11 adds a notion of _move_ constructors, which are like copy constructors but they're allowed to trash the object being copied from.
05:28
<&McMartin>
THe idea here is that if the last thing you do with a std::string is assign it to some other string, instead of actually copying it you could just transfer ownership of the string's bytes to the target and leave dummy data back in the moved-from string.
05:29
<&McMartin>
More excitingly, though, we have std::unique_ptr<T>, which has a move constructor but does not have a copy constructor, so the only way to make it be somewhere else is with a moving operation.
05:29
<&McMartin>
... and that meant, in C++11, that a lambda could not capture one.
05:29
<&McMartin>
A reference doesn't outlive the creating function, which is never what you want, and the value capture tries to copy it and fails.
05:29
<@celticminstrel>
Oh right, the [x = y] syntax was new in 14, wasn't it.
05:30
<&McMartin>
Yep, and that lets you arrange a 'y' that triggers a move instead of a copy.
05:30
<@celticminstrel>
So in C++11 you couldn't capture [x = move(y)].
05:30
<&McMartin>
bingo
05:31
<&McMartin>
As long as you capture everything by value as a std::shared_ptr, C++ lambdas do behave more or less like traditional closures.
05:41 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
07:36 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has joined #code
07:36 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
11:34
<&ToxicFrog>
McMartin: "f a C++ object has fields that themselves are destructors," -- should be "have destructors"?
13:31 celticminstrel [celticminst@Nightstar-6an2qt.dsl.bell.ca] has joined #code
13:31 mode/#code [+o celticminstrel] by ChanServ
13:53 celticminstrel is now known as celmin|away
13:56 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
13:57 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
14:45 Kindamoody[zZz] is now known as Kindamoody
15:12 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:12 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:44 Kindamoody is now known as Kindamoody|afk
17:10 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
17:12 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
17:25 Vorntastic [uid293981@Nightstar-2dc.p8m.184.192.IP] has quit [[NS] Quit: Connection closed for inactivity]
17:38 Degi [Degi@Nightstar-s3u44d.dyn.telefonica.de] has joined #code
18:43 M-E [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
18:57 Kindamoody|afk is now known as Kindamoody
19:14 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
19:23 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
20:27 catalyst [catalyst@Nightstar-5dv16h.cable.virginm.net] has joined #code
20:53 M-E is now known as Emmy
21:18 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code
21:18 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
22:06
<&McMartin>
TF: yeah, it should
22:07
<&McMartin>
... also
22:07
<&McMartin>
I've got a file here I just refactored to stop being C++
22:08
<&McMartin>
This involved deleting, like, a hundred lines, none of which were template or inline code beyond taking some standard library types in the arguments of three of its methods
22:08
<&McMartin>
This decreased the size of the final .a file by twenty megabytes
22:08
<&McMartin>
Go home, C++, you're drunk
22:09
<&McMartin>
That is more than twice the size of the smallest application we produce that actually used that class.
22:27
<~Vornicus>
why is c++ like this
22:34
<&McMartin>
The two short answers I know are "classes with template types, like, uh, the two stardard library classes used, have really long names once you expand the templates out, and that affects linker symbols and debug information"
22:34
<&McMartin>
and "every .o file copies every template instantiation it uses and it is the job of the linker to actually merge together each copy of it so that the final binary only has one version"
22:35
<&McMartin>
Since a .a file is a collection of .o files, perhaps that was generating a bunch of mergable detritus across the rest of the usage of the library.
22:35
<&McMartin>
These are normally the kinds of questions where I turn to catalsyt for answers, but here it is curiosity
22:35
<&McMartin>
As my path forward is, uh, pretty clear
22:47 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
22:50 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
23:01 Pink` [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
23:04 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
23:05 Kindamoody is now known as Kindamoody[zZz]
23:18 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
23:24
<&jeroud>
BURNINATE! BURNINATE!
--- Log closed Sat Sep 21 00:00:38 2019
code logs -> 2019 -> Fri, 20 Sep 2019< code.20190919.log - code.20190921.log >

[ Latest log file ]