code logs -> 2019 -> Thu, 31 Jan 2019< code.20190130.log - code.20190201.log >
--- Log opened Thu Jan 31 00:00:07 2019
00:10 tripflag [ed@Nightstar-7pe1df.clients.your-server.de] has quit [[NS] Quit: ZNC - http://znc.in]
00:15 tripflag [ed@Nightstar-7pe1df.clients.your-server.de] has joined #code
00:16 Degi [Degi@Nightstar-lafbe2.dyn.telefonica.de] has quit [Connection reset by peer]
01:23 Derakon[AFK] is now known as Derakon
01:24 * McMartin writes a function reverse(s) which reverses the string s by turning the mind inside out, converting madness into reality and opening the door to allow the Old Ones to creep forth once more from their sunken crypt beyond time.
01:29 macdjord|wurk is now known as macdjord
01:37 * ToxicFrog writes a touchscreen UI in zsh using fim, imagemagick and evtest
01:40
<&McMartin>
I spent a good chunk of time today reading about NSAutoreleasePool and how it interacts with automatic reference counting in Objective-C and Swift and oh god Apple what have you done
01:40
<&McMartin>
(Answer, in part: written code that looks at the instructions around the one that called it to try to deduce what sort of code was calling it and behaving differently depending on the results)
01:42
<&McMartin>
This also has solidified my opinion that autorelease pools are a bad solution to a non-problem
01:43
<&McMartin>
But GTK's floating references are a completely different bad solution to the same non-problem, and this means I should maybe revisit my assumption about its non-problematicity
01:43
<&McMartin>
[10 seconds pass]
01:43
<&McMartin>
OK, I've revisited it. I still don't buy that it's a problem that constructor-like functions will return objects that you must free
01:43
<&McMartin>
s/free/release/
01:44
<&ToxicFrog>
What is an "autorelease pool"?
01:44
<&McMartin>
So, normally, Obj-C objects use manual reference counting, so you call retain or release on them
01:45
<&McMartin>
In the alternative, instead of releasing an object you retain before it leaves your scope, you can "autorelease" it
01:45
<&McMartin>
This registers a delayed release to happen the next time the "drain" method is called on the most recently constructed autorelease pool, which also destroys it.
01:46
<&McMartin>
These are syntactically bound in modern ObjC code, so you'll have an @autoreleasepool { ... } block and all autoreleased objects get released when you leave that block.
01:46
<&McMartin>
This happens, in particular, every time the event loop in a GUI app does a cycle, which is generally fine.
01:47
<&McMartin>
Meanwhile, GTK has a notion of a "floating reference", and the way these work is essentially that the first time you try to retain it, it's a no-op.
01:47
<&McMartin>
Both of these are attempting to avoid the case where you have to say
01:47
<&McMartin>
Foo *foo = thing_that_makes_a_foo();
01:47
<&McMartin>
do_thing(foo);
01:47
<&McMartin>
release(foo);
01:48
<&McMartin>
And instead let you just say do_thing(thing_that_makes_a_foo());.
01:48
<&ToxicFrog>
This seems to be solved more elegantly, to the extent it needs solving, by python's with block and similar constructions.
01:49
<&McMartin>
Right
01:50
<&McMartin>
Modern Obj-C uses a Python-like reference-counting system and the compiler automatically inserts retain/release calls as needed
01:50
<&McMartin>
The interaction with autorelease pools is that if you are returning an autoreleased object it disassembles the code around the call site to see if it was being called by an automatic-reference-counting bit of code, and if it is, it just doesn't bother getting the pool involved at all and just returns a retained object like it always should have.
01:51
<&McMartin>
This is all managed by runtime library functions, so this is implemented as sanely as it can be, but still
01:51
<&McMartin>
what the hell dudes
01:52
<&McMartin>
And yeah, my reaction overall is "I am in no way convinced that this needs solving"
01:53
<&ToxicFrog>
Yeaaaaaaaaah.
01:53
<&McMartin>
as for Python's with block etc
01:53
<&ToxicFrog>
Meanwhile, I've realized that evtest gives me the pixel dimensions of the console and stty gives me the character dimensions, which means I can map between them, which in turn means that I can make a touch-driven curses UI.
01:54
<&McMartin>
Both ObjC at the time autorelease pools were introduced to its core library, and GTK itself over its whole existence, are built on top of C, which does not provide the necessary syntactic extensions
01:54
<&McMartin>
It took Apple a long time to realize that nobody else gave a damn about ObjC and that they were thus free to evolve it aggressively in ways that made it suck less
01:54
<&McMartin>
A process that completed around the time that OS X 10.8 was released
01:54
<&ToxicFrog>
GTK has that excuse, but ObjC...aah.
01:55
<&McMartin>
But yeah, I hit a corner case where This Interaction Matters and now I'm digging into how to make sure the spiders stay in their holes and well yeah this is all madness
02:22 celmin|away is now known as celticminstrel
04:39 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
04:55 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
05:03 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code
05:03 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
05:16
<&McMartin>
Man, the late-1980s systems were a weird mishmash
05:16 * McMartin uses the CP/M interface on the Atari ST to do MS-DOS-inspired system calls, but finds that they fail because he wasn't being UNIXy enough in his usage of them.
05:16
<&McMartin>
But now that I've gotten that sorted out, file redirection actually works.
05:16
<&McMartin>
(It turns out that stdout and CON: are not actually the same thing.)
05:19
<&McMartin>
(Though they are in MS-DOS! But CP/M doesn't have a stdout, so the ST followed that half the time. >_<)
05:29 Derakon is now known as Derakon[AFK]
05:49 celticminstrel is now known as celmin|sleep
06:03 macdjord is now known as macdjord|slep
06:15 himi [sjjf@Nightstar-1drtbs.anu.edu.au] has quit [Ping timeout: 121 seconds]
07:24
<&McMartin>
That feeling when you rewrite a big chunk of code with super-dumb brute force and it ends up saving nearly 50% in space
07:26
<&McMartin>
Though it also involves replacing a bunch of actual multiply operations with dozens of shifts and adds
10:53 Degi [Degi@Nightstar-qs95gn.dyn.telefonica.de] has joined #code
10:53 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
11:25 Kindamoody[zZz] is now known as Kindamoody
13:06 celmin|sleep is now known as celmin|away
15:19 Degi [Degi@Nightstar-qs95gn.dyn.telefonica.de] has quit [Connection reset by peer]
15:41 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:41 mode/#code [+qo Vornicus Vornicus] by ChanServ
16:42 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
17:25
<@iospace>
well
17:25
<@iospace>
due to logistical issues
17:25
<@iospace>
intel looks like it'll be falling through
17:25
<@iospace>
(the contractor role)
17:30 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
17:38 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
17:38 mode/#code [+o Alek] by ChanServ
17:42 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
18:33
<@iospace>
I'd rather have it fail there, but even the fact they said "hmm... this resume looks good" gives me a nice ego boost xD
18:40
<&[R]>
That's always good
18:58 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [[NS] Quit: Leaving]
19:16 McMartin [mcmartin@Nightstar-rpcdbf.sntcca.sbcglobal.net] has quit [Operation timed out]
20:20 VirusJTG [VirusJTG@Nightstar-q9r0g8.clt.hostedsolutions.com] has joined #code
20:20 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
20:42 himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code
20:42 mode/#code [+o himi] by ChanServ
20:44 Degi [Degi@Nightstar-qs95gn.dyn.telefonica.de] has joined #code
20:45 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
20:49 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
20:49 mode/#code [+o Alek] by ChanServ
21:43 Kindamoody is now known as Kindamoody[zZz]
21:53 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
21:55 VirusJTG [VirusJTG@Nightstar-q9r0g8.clt.hostedsolutions.com] has quit [Operation timed out]
21:55 VirusJTG_ [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [[NS] Quit: Leaving]
21:55 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
21:55 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
23:03 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
23:07 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
23:07 mode/#code [+o Alek] by ChanServ
23:17 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has quit [Ping timeout: 121 seconds]
23:21 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
23:25 Alek [Alek@Nightstar-o723m2.cicril.sbcglobal.net] has joined #code
23:25 mode/#code [+o Alek] by ChanServ
23:46 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has quit [Ping timeout: 121 seconds]
23:48 crystalclaw [crystalclaw@Nightstar-12q9ui.xyz] has joined #code
23:48 mode/#code [+o crystalclaw] by ChanServ
--- Log closed Fri Feb 01 00:00:09 2019
code logs -> 2019 -> Thu, 31 Jan 2019< code.20190130.log - code.20190201.log >

[ Latest log file ]