--- Log opened Tue Feb 25 00:19:42 2020 |
00:19 | | TheWatcher [chris@GlobalOperator.Nightstar.Net] has joined #code |
00:19 | | Irssi: #code: Total of 34 nicks [27 ops, 0 halfops, 0 voices, 7 normal] |
00:19 | | mode/#code [+o TheWatcher] by ChanServ |
00:19 | | Irssi: Join to #code was synced in 20 secs |
00:27 | | Kindamoody is now known as Kindamoody[zZz] |
01:25 | | mac [macdjord@Nightstar-rslo4b.mc.videotron.ca] has joined #code |
01:25 | | mode/#code [+o mac] by ChanServ |
01:28 | | macdjord|slep [macdjord@Nightstar-rslo4b.mc.videotron.ca] has quit [Ping timeout: 121 seconds] |
01:36 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed] |
02:28 | | celmin|away is now known as celticminstrel |
03:05 | | Degi [Degi@Nightstar-co9dp7.dyn.telefonica.de] has quit [Operation timed out] |
03:08 | | Degi [Degi@Nightstar-sa7apa.dyn.telefonica.de] has joined #code |
03:59 | | Pi [sid25146@Nightstar-oju.p8m.184.192.IP] has quit [Ping timeout: 121 seconds] |
03:59 | | Pi [sid25146@Nightstar-oju.p8m.184.192.IP] has joined #code |
03:59 | | mode/#code [+o Pi] by ChanServ |
04:00 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds] |
04:00 | | McMartin [mcmartin@Nightstar-c25omi.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
04:00 | | McMartin [mcmartin@Nightstar-c25omi.ca.comcast.net] has joined #code |
04:00 | | mode/#code [+ao McMartin McMartin] by ChanServ |
04:01 | | Tamber [tamber@furryhelix.co.uk] has quit [Ping timeout: 121 seconds] |
04:05 | | Tamber [tamber@furryhelix.co.uk] has joined #code |
04:05 | | mode/#code [+o Tamber] by ChanServ |
04:14 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
04:14 | | mode/#code [+ao ToxicFrog ToxicFrog] by ChanServ |
04:52 | | mac is now known as macdjord|slep |
05:04 | | Derakon is now known as Derakon[AFK] |
05:16 | | celticminstrel [celticminst@Nightstar-80avij.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
05:32 | | catalyst [yaaic@Nightstar-295h3e.cpe.teksavvy.com] has quit [[NS] Quit: Bye] |
07:32 | | catalyst [yaaic@Nightstar-295h3e.cpe.teksavvy.com] has joined #code |
08:20 | | Kindamoody[zZz] [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Client exited] |
08:21 | | Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
08:21 | | mode/#code [+o Kimo|autojoin] by ChanServ |
09:04 | | Kimo|autojoin is now known as Kindamoody |
09:31 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
09:31 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
09:32 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
09:57 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
09:57 | | mode/#code [+o Kindamoody] by ChanServ |
10:13 | | Kindamoody [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
10:34 | | Kimo|autojoin [Kindamoody@Nightstar-eubaqc.tbcn.telia.com] has joined #code |
10:34 | | mode/#code [+o Kimo|autojoin] by ChanServ |
13:13 | | celticminstrel [celticminst@Nightstar-80avij.dsl.bell.ca] has joined #code |
13:13 | | mode/#code [+o celticminstrel] by ChanServ |
13:39 | | celticminstrel is now known as celmin|away |
13:55 | <@sshine> | code of the day: |
13:55 | <@sshine> | # This redirect is here due to an earlier wrong Swedish translation. Remove it after a few months. JBA 2016-03-02 |
13:55 | <@sshine> | { "name" => "dimensionexplain_oldswedishtranslation", |
14:13 | <@TheWatcher> | Well, to be fair, 'few' isn't entirely specific~ |
14:13 | | Kimo|autojoin is now known as Kindamoody |
14:19 | <@sshine> | https://imgur.com/gallery/qUBolrG |
14:19 | <@sshine> | TheWatcher, 'few' definitely lacks context. |
14:19 | <@sshine> | I think for "a few stars", 48 is definitely on target. |
14:20 | <@TheWatcher> | On galactic timescales, a 'few' months is probably measured in tens of thousands! |
16:44 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
17:15 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
17:15 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
19:30 | | Derakon[AFK] is now known as Derakon |
20:36 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
21:18 | | ErikMesoy [Bruker@Nightstar-3p2nck.bb.online.no] has quit [[NS] Quit: Leaving.] |
21:18 | | ErikMesoy [Bruker@Nightstar-3p2nck.bb.online.no] has joined #code |
21:28 | | * McMartin does terrible things with automatically generated C declarations. |
22:01 | <@TheWatcher> | Yay! |
22:05 | <&McMartin> | Specifically: an object graph with loops created completely out of static initializers. |
22:05 | <&McMartin> | This code is also Extremely Not Valid C++ |
22:05 | <&McMartin> | (C++ doesn't allow static forward declarations of structures) |
22:06 | <&McMartin> | (You can fake it with anonymous namespaces though I guess) |
22:29 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds] |
22:36 | <@sshine> | anonymous namespaces. there's something oxymoronic about that. :D |
22:37 | <@sshine> | should they just be called spaces? |
22:38 | <&McMartin> | The space is *for* names but does not *have* a name. |
22:39 | <&McMartin> | Thus, it is a namespace, but it is itself anonymous. |
22:39 | <&McMartin> | And the primary feature of them is that unlike namespaces that *have* names, which let you set up a hierarchy of names across the entire application |
22:39 | <&McMartin> | Anonymous namespaces, once the reference to them is "lost", are intentionally unreachable. |
22:40 | <&McMartin> | In practice, they are usually assigned some gensym as their namespace and thus still show up in your linker exports, which is not great but, I suppose, makes debugging easier sometimes. |
22:40 | <@sshine> | but I thought the idea of the namespace having a name itself was crucial as that added a kind of extension to the name? |
22:40 | <@sshine> | ahh |
22:41 | <@sshine> | so somehow something inside them initializes and is subsequently unreachable by other code? |
22:41 | <&McMartin> | To a first approximation, names defined within an anonymous namespace are restricted to file scope. |
22:41 | <&McMartin> | Well. Translation-unit scope. |
22:41 | <@sshine> | sure, ok |
22:41 | <@sshine> | I think C# calls that 'internal'? |
22:41 | <&McMartin> | And since C's "static" keyword has been weakened in C++, this is your only option for a few corner cases, one of which I just hit. |
22:42 | <&McMartin> | Fortunately, I am not working in C++ here~ |
22:42 | <@Reiv> | When I hear about them, they feel an awful lot like temporary tables. |
22:42 | <&McMartin> | The thing is that you can nest anonymous namespaces inside other named or unnamed namespaces. |
22:43 | <&McMartin> | Reiv: The main difference is that the data continues to exist |
22:43 | <&McMartin> | It's just shielded from prying eyes. |
22:43 | <@Reiv> | Right |
22:43 | <@sshine> | I'm betting on never learning C++. I did glance in one of my old roomie's C++ books once, and it struck me that if I'm ever building a language of some kind, it should also contain some notion of "friendship". |
22:43 | <@Reiv> | but I more mean in terms of being 'full power, but without the permanency' |
22:43 | <&McMartin> | Yeah, pretty much. Except with the permanency :) |
22:43 | <&McMartin> | Let's see if I can make a more direct example |
22:44 | <@sshine> | they make sense to me, I guess. I generally like scoping constructs. :) |
22:44 | <&McMartin> | As You Know, programs usually ship as an executable and then a bunch of support libraries that are separate binary files. Windows calls them DLLs. |
22:44 | <&McMartin> | To use stuff in a DLL you basically call it like it's a function, and then let the rest of the system figure out what that means, and it's not important here |
22:45 | <&McMartin> | The trick is that the DLL itself probably has a whole bunch of functions in it that it uses on its own but that it would really rather not have you call |
22:45 | <&McMartin> | In part so that they can change or get rid of them later on a whim |
22:46 | <&McMartin> | So the most direct way to make that happen is to simply not let those functions exist from the point of view of the machinery that links up calls from outside the DLL to functions in the DLl |
22:46 | <&McMartin> | If you try to call dll_internal_magic it just goes <????>. |
22:46 | <&McMartin> | The next most direct way is to have it be there, so that, for instance, you can attach external monitoring tools to it because you have a Damn Good Reason to want to know about |
22:46 | <&McMartin> | But instead of having it have a real name, you give it a name that is impossible nonsense. |
22:47 | <@sshine> | I learned through word-of-mouth how DLLs work once (first time a function is called, it actually points to a loading function that subsequently replaces the function pointer to the memory in which the DLL was loaded into). so functions in DLLs should necessarily have one layer of indirection for this functionality. |
22:47 | <&McMartin> | And then have a table somewhere that says that fhqggads53__dll_internal_magic() |
22:47 | <&McMartin> | means that it's internal, and fhqwgads53 might even means something helpful too |
22:48 | <&McMartin> | sshine: That's very Windows-specific, and in fact may be MSVC-toolchain-specific |
22:48 | <&McMartin> | It's been awhile since I've done direct hacking of the Import Address Table, but there's stuff that happens at the time that a DLL is first mapped into memory as well |
22:48 | <@sshine> | McMartin, I think maybe the guy who explained it wasn't talking about Windows. I'm just saying DLLs. I actually thought he was talking about .so's produced by GCC on Linux... |
22:49 | <&McMartin> | This can be interfered with for library-interposition techniques, and I *think* but am not completely positive that gcc-on-Windows relies solely on the Import Address Tables. |
22:49 | <@sshine> | McMartin, ok. well, I never do low-level stuff like this, so this is probably in the category of "hypothetical stuff I learned but don't actually know if works like that in practice." |
22:50 | | * McMartin nods |
22:50 | <&McMartin> | The first professional level systems hacking I did was Import Address Table hacking on Windows, so I once knew much more about the PE32 format than I now do |
22:50 | <&McMartin> | However, here is my article about Dumb Loader Tricks In C: https://bumbershootsoft.wordpress.com/2019/04/02/fun-with-symbol-collision/ |
22:51 | <&McMartin> | If you've had to deal with MSVC, you may recall that you need special .lib files to go with all your .dll files that you need at runtime |
22:51 | <&McMartin> | Those are what are responsible for the process you describe. |
22:52 | <&McMartin> | But I don't know the internals of what ld.so does on Linux, either, so it may well be doing a simple cache when you aren't playing silly buggers with dlopen and dlsym like I do in that article. |
23:14 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code |
23:14 | | mode/#code [+o himi] by ChanServ |
--- Log closed Tue Feb 25 23:17:57 2020 |
--- Log opened Tue Feb 25 23:26:32 2020 |
23:26 | | TheWatcher [chris@GlobalOperator.Nightstar.Net] has joined #code |
23:26 | | Irssi: #code: Total of 33 nicks [25 ops, 0 halfops, 0 voices, 8 normal] |
23:26 | | mode/#code [+o TheWatcher] by ChanServ |
23:26 | | Irssi: Join to #code was synced in 15 secs |
23:52 | | Reiver [quassel@Nightstar-ksqup0.co.uk] has joined #code |
23:52 | | mode/#code [+ao Reiver Reiver] by ChanServ |
--- Log closed Wed Feb 26 00:00:22 2020 |