code logs -> 2020 -> Fri, 25 Dec 2020< code.20201224.log - code.20201226.log >
--- Log opened Fri Dec 25 00:00:38 2020
00:02 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
00:24 McMartin [mcmartin@Nightstar-c25omi.ca.comcast.net] has quit [[NS] Quit: Upgrade]
00:32 McMartin [mcmartin@Nightstar-c25omi.ca.comcast.net] has joined #code
00:32 mode/#code [+ao McMartin McMartin] by ChanServ
01:35 Pink [uid208117@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
02:00 catalyst [catalyst@Nightstar-idr9jk.dab.02.net] has joined #code
02:00 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
02:03 catalyst [catalyst@Nightstar-idr9jk.dab.02.net] has quit [Connection reset by peer]
02:33 Netsplit Deepthought.Nightstar.Net <-> Krikkit.Nightstar.Net quits: @PinkFreud
02:34 Netsplit over, joins: @PinkFreud
04:17 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
04:17 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
04:17 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
04:43 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code
04:43 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
04:50 Degi_ [Degi@Nightstar-dmkouv.dyn.telefonica.de] has joined #code
04:52 Degi [Degi@Nightstar-slkn9d.dyn.telefonica.de] has quit [Ping timeout: 121 seconds]
04:52 Degi_ is now known as Degi
07:40 celticminstrel [celticminst@Nightstar-26ueug.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:40 * Vorntastic pokes at properties in lua
09:06 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
09:16 Kindamoody[zZz] is now known as Kindamoody
09:17 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
09:21 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
09:22 catalyst [catalyst@Nightstar-8tcln3.dab.02.net] has joined #code
09:22 catalyst_ [catalyst@Nightstar-8tcln3.dab.02.net] has joined #code
09:22 catalyst [catalyst@Nightstar-8tcln3.dab.02.net] has quit [Connection closed]
09:36 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
09:38 catalyst_ [catalyst@Nightstar-8tcln3.dab.02.net] has quit [Ping timeout: 121 seconds]
09:48 Kindamoody is now known as Kindamoody|afk
09:56 gnolam [quassel@Nightstar-ac2toj.cust.bahnhof.se] has joined #code
09:56 mode/#code [+o gnolam] by ChanServ
10:43 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
12:08 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
12:08 catalyst_ [catalyst@Nightstar-8tcln3.dab.02.net] has joined #code
12:34 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
12:37 catalyst_ [catalyst@Nightstar-8tcln3.dab.02.net] has quit [Ping timeout: 121 seconds]
13:25 Kindamoody|afk is now known as Kindamoody
13:27 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds]
13:34 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
13:34 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
13:52 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
13:52 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection reset by peer]
14:08 catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed]
14:08 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
14:44 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
14:44 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:26 celticminstrel [celticminst@Nightstar-26ueug.dsl.bell.ca] has joined #code
15:26 mode/#code [+o celticminstrel] by ChanServ
16:42 Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
16:51
<&ToxicFrog>
Properties as in fields with automatically invoked getters/setters?
16:54
<~Vornicus>
yeah. looks like you can do it with __index and __newindex but you now have to proxy the actual methods
16:54
<&ToxicFrog>
Yeah.
16:55
<&ToxicFrog>
metamethods are fallbacks rather than overrides, so for anything like this you need a proxy object with __index and __newindex that forward to the real object.
16:56
<~Vornicus>
I don't think I understand what you just said
16:56
<&ToxicFrog>
If you're interfacing with C (or are ok using the debug API) you can use a zero-size userdata as the proxy.
16:56
<&ToxicFrog>
Ok so
16:56
<&ToxicFrog>
If you have a table t, and you setmetatable(t, { __index = my_index_function, __newindex = my_newindex_function })
16:56
<~Vornicus>
right
16:57
<&ToxicFrog>
t["foo"] will call my_index_function iff the key "foo" doesn't exist in t
16:57
<~Vornicus>
also right
16:57
<&ToxicFrog>
And t["foo"]="bar" will call my_newindex_function under the same conditions
16:57
<~Vornicus>
nothing surprising yet.
16:57
<&ToxicFrog>
So usually you do something like: local proxy = {}; local real = {...}; return setmetatable(proxy, make_metatable_for(real))
16:58
<&ToxicFrog>
So the proxy stays empty permanently, so that __index and __newindex get called for every get/set on its fields
16:58
<&ToxicFrog>
And the metamethod handlers store data in `real` instead
17:00
<~Vornicus>
oh I see what you're up to now
17:00
<&ToxicFrog>
There are other ways you can do this (e.g. rather than a separate proxy and real object, mangle the field names, so obj.foo="bar" instead stores it in obj[".field.foo"] or something)
17:01
<&ToxicFrog>
But they all stem from the same restriction that if you want your getters and setters to fire you aren't allowed to use the key they fire on.
17:01
<~Vornicus>
In this particular case I'm looking into swizzles
17:01
<&ToxicFrog>
(or rather, aren't allowed to store stuff under that key for real, "use" is a bit vague)
17:01
<&ToxicFrog>
The vector composition technique?
17:02
<~Vornicus>
Yeah
17:02
<&ToxicFrog>
Good luck!
17:04
<~Vornicus>
and I'm pretty sure I'll be safe using "mangled" names - really it's a regular ordered table and then the swizzles return/expect another vec
18:31 catalyst [catalyst@Nightstar-letc1k.dab.02.net] has joined #code
18:31 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds]
19:05 catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
19:08 catalyst [catalyst@Nightstar-letc1k.dab.02.net] has quit [Connection reset by peer]
21:13 catalyst_ is now known as catalyst
21:32 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code
21:40 catalyst` [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code
22:20 celticminstrel [celticminst@Nightstar-26ueug.dsl.bell.ca] has quit [Ping timeout: 121 seconds]
22:22 celticminstrel [celticminst@Nightstar-ao8eni.dsl.bell.ca] has joined #code
22:22 mode/#code [+o celticminstrel] by ChanServ
22:36 Pink [uid208117@Nightstar-h2b233.irccloud.com] has joined #code
22:49 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
23:30
<&[R]>
https://github.com/sarfata/pi-blaster <-- neat
23:41 Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Connection closed]
23:45 catalyst` [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [[NS] Quit: Leaving]
--- Log closed Sat Dec 26 00:00:40 2020
code logs -> 2020 -> Fri, 25 Dec 2020< code.20201224.log - code.20201226.log >

[ Latest log file ]