code logs -> 2019 -> Fri, 27 Dec 2019< code.20191226.log - code.20191228.log >
--- Log opened Fri Dec 27 00:00:30 2019
00:11 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
00:14 gnolam [quassel@Nightstar-csto10.cust.bahnhof.se] has quit [[NS] Quit: Z?]
00:14 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
00:16 Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code
00:18 Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds]
01:07 Degi [Degi@Nightstar-ua966j.dyn.telefonica.de] has quit [Operation timed out]
01:09 Degi [Degi@Nightstar-5ofvqn.dyn.telefonica.de] has joined #code
02:07 Kindamoody is now known as Kindamoody[zZz]
02:16 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
02:16 mode/#code [+qo Vornicus Vornicus] by ChanServ
05:05 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
05:11 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has joined #code
05:11 mode/#code [+qo Vorntastic Vorntastic] by ChanServ
05:55
<&jeroud>
sshine, macdjord: Why not connect to whois.nic.<tld> and whois.iana.org in parallel?
05:56
<&jeroud>
That way you can return the result from the former if it arrives, or an appropriate error (bad tld or network error or whatever) if it doesn't.
05:58
<&jeroud>
And you can probably keep a list of known tlds (ideally in a resource file rather than hardcoded) that gets updated periodically if necessary.
06:02
<@Alek>
didn't they take out some TLDs recently though?
06:05
<&jeroud>
Sure, but only for things that are very seldom used.
06:06
<&jeroud>
So getting an awkward error for that is forgivable.
06:07
<&jeroud>
But you might want to check iana before returning any kind of "failure to reach tld whois" error anyway.
06:49
<@macdjord|slep>
Alek: It would be better to store each known TLD along with its last-confirmed-to-exist time, and expire any that get too old.
06:53 celticminstrel [celticminst@Nightstar-0p84vo.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!]
08:53
<&McMartin>
Part 2 of, apparently, 8. https://bumbershootsoft.wordpress.com/2019/12/27/raw-win32-an-application-shell/
09:02
<&McMartin>
(After looking through my commit history, the "obvious" breakdown is: syscalls, ABI, toolchain basics; application shell; custom widget painting; player input; menus and keyboard shortcuts therefor; reacting properly to resizing the window; icons and declarative resources; custom dialog boxes)
09:54
<&McMartin>
The S is for Security https://www.youtube.com/watch?v=ozIKwGt38LQ
09:55
<&McMartin>
Also MEMS devices are super neat
10:43 Kindamoody[zZz] is now known as Kindamoody
11:08 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code
11:19 gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has joined #code
11:19 mode/#code [+o gnolam] by ChanServ
13:20 gnolam [quassel@Nightstar-0oc.n80.224.185.IP] has quit [[NS] Quit: Gone]
13:24
<@sshine>
woot, I got a 3% raise this year!
13:27 * Emmy still wishes for more... ^.^;
13:28
<&ToxicFrog>
Meanwhile, I continue to do alarming things with shell escape sequences: http://toxicfrog.github.io/osc-wrapper/
13:30
<&ToxicFrog>
(this is the setup that allows me to run weechat on my server, press a hotkey, and have it open a URL in the browser on the laptop)
13:56
< Emmy>
seems a bit roundabout 0.o
14:14
<&ToxicFrog>
Emmy: if you have an idea for a less roundabout approach, I'm all ears :)
14:14 gnolam [quassel@Nightstar-22puij.mobileonline.telia.com] has joined #code
14:14 mode/#code [+o gnolam] by ChanServ
14:24
< Emmy>
Well, not running the chat on a remote server would be my option, but then again, i'm a lazy ass :P
14:32 gnolam [quassel@Nightstar-22puij.mobileonline.telia.com] has quit [[NS] Quit: Fuck SJ with an entire train]
14:35
<&ToxicFrog>
Not running the chat remotely defeats the entire purpose, so
14:47 celticminstrel [celticminst@Nightstar-0p84vo.dsl.bell.ca] has joined #code
14:47 mode/#code [+o celticminstrel] by ChanServ
14:48
< Emmy>
yea, figured.
14:48
< Emmy>
could try a bouncer, though?
15:09
<@sshine>
jeroud, yes, I could resolve/connect whois.nic.<tld> and fail somewhat gracefully not knowing whether it was a network error or a not-yet-existing TLD.
15:10
<@sshine>
jeroud, and yes, I could connect to whois.iana.org once and cache the result. but since this is a Haskell library, I don't want to rely on file caches, because this increases the complexity of the library. it's not very common, I think, for libraries to depend on implicit file caches. I could use a memory cache, which would be kind of useless if the library e.g. were used in a command-line program that exits
15:11
<@sshine>
between each query.
15:12
<@sshine>
jeroud, combining cached IANA lookup + connect to whois.nic.<tld> in parallel might be an option, but without the cache it'd be very inefficient.
15:12
<@sshine>
I'm building a web-service around this library where caching is going to be much more convenient.
15:13
<@sshine>
so my choice for the library would depend on some kind of optimal mixture between convenience, annoyance, and what people expect.
15:14
<@sshine>
okay, so here's what I'm thinking about going with:
15:15
<@sshine>
1) if it's a recognized TLD, just look up the WHOIS server in the database. 2) if it's supposedly a new TLD, cache https://data.iana.org/TLD/tlds-alpha-by-domain.txt in memory, validate if the TLD is real, and do a 'whois.nic.<tld>' lookup.
15:16 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code
15:16 mode/#code [+qo Vornicus Vornicus] by ChanServ
15:17
<@sshine>
that means I'm doing at most two lookups. an average WHOIS lookup is ~1.5KB and that TLD list is ~12K, so hum. maybe make that extra safety lookup optional.
15:18
<@sshine>
that tlds-alpha-by-domain.txt is what's potentially updated daily, so I can't cache it in the executable.
15:18
<@sshine>
annoyingly they update the file daily even if there were no additions to the list.
15:23
<&ToxicFrog>
Emmy: I used to do that, in fact. The advantage of running the whole client remotely is that there's only place to install and configure.
15:23
<&ToxicFrog>
Anywhere I have an ssh client, I have my entire setup.
15:24
<&ToxicFrog>
*only one place
15:24
<&ToxicFrog>
Overall, it's a much nicer UX than using a bouncer.
15:24
< Emmy>
hmmmh.
15:24 * Emmy ponders
15:25 * Emmy sees opportunities for web-based bouncer front-ends there
15:25
<&ToxicFrog>
(and there is a fair amount of setup involved, since weechat is my client not just for IRC, but discord, slack, twitter, facebook chat, and my monitoring systems)
15:25
<&ToxicFrog>
Those already exist.
15:25
<&ToxicFrog>
IRCCloud is a proprietary one, and GlowingBear is a frontend for weechat.
16:26 gnolam [lenin@Nightstar-e3tf4i.priv.bahnhof.se] has joined #code
16:27 mode/#code [+o gnolam] by ChanServ
19:41 Vorntastic [uid293981@Nightstar-6br85t.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity]
20:12
<&[R]>
`cat /proc/$client_pid/environ | tr '\0' '\n' ` D:
20:12
<&[R]>
You can just `tr '\0' \n' $file`
20:14 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed]
20:14 Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has quit [Connection closed]
20:14 VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code
20:14 mode/#code [+ao VirusJTG VirusJTG] by ChanServ
20:18
<&[R]>
ToxicFrog: grep -azEo '^SSH_CLIENT.*' /proc/$$/environ | tr '\0 ' == | cut -d = -f 2
20:19
<&[R]>
Some small further refinement: grep -azE '^SSH_CLIENT' /proc/$$/environ | tr '\0 ' == | cut -d = -f 2
20:26 Derakon[AFK] is now known as Derakon
20:29
<&ToxicFrog>
[R]: TIL about `grep -z`, thanks
20:30
<&ToxicFrog>
I am well aware that, for most foo, `cat bar | foo` can be replaced with `foo bar`. `cat bar | ...` is easier to experiment with, though, and the cost of forking an additional cat is negligible.
20:31
<&[R]>
You can do: `< $file foo` instead
20:31
<&[R]>
Gives you the same benefit
20:37
<&[R]>
All in one command now: `sed -Ez '/^SSH_CLIENT/ s|.*=([^ ]*) .*|\1|p; d' /proc/$$/environ`
20:39
<&ToxicFrog>
I am aware of that, too.
20:40
<&[R]>
Oh, TIL: sed -Ez 's|SSH_CLIENT=([^ ]*) .*|\1|p; d' /proc/$$/environ
22:05
<&McMartin>
MULTI-REGISTER DRIFTING
22:05
<&McMartin>
The 65816 is made entirely of rusty nails and broken glass
22:05
<&McMartin>
I'd say "I'm amazed anyone ever actually used this for anything" but then again there are like three actually significant uses of it and quite plausibly only one counts as "major"
22:06
<&McMartin>
I have never seen a programming manual, much less an official one, that has so many instances of "the programmer must take extra care not to..." "... or disaster will surely result"
22:06
<&McMartin>
Even instruction decoding depends on run-time processor flags that are expected to change multiple times within a function
22:07
<&McMartin>
And yeah
22:07
<&McMartin>
They Know What They Did
22:09
<&McMartin>
In x86, whether you're loading a 16-bit or 8-bit value depends on the operand, more or less: MOV AL, 3 vs MOV AX, 3 vs MOV EAX, 3 for byte/word/dword
22:10
<&McMartin>
On 65816 whether lda #3 loads a byte or a word depends on the run-time state of a processor status flag regarding whether the accumulator is in byte mode or double-byte mode
22:10
<&McMartin>
And this means that whether that instruction is two or three bytes long also depends on that flag
22:11
<&McMartin>
Which means if you lose control of your flag bits somehow you can end up losing instruction sync within the code stream
22:18
<&[R]>
That's amazing
22:19
<&[R]>
Did they use that trash fire to heat their offices?
22:22
<&McMartin>
Pretty sure there's a reason this was only used for the Apple IIgs, the SNES, and accelerator boards for C64 and Apple II lines
22:22
<&McMartin>
*As an accelerator chip* it's actually completely fine, and they nailed important parts of backcompat that previous 8-bit revisions of the 6502 did not nail
22:22
<&McMartin>
It's also got some features when in "be an accelerator for an 8-bit system" mode that remind me uncomfortably of Zachtronics games, but for real
22:23
<&McMartin>
In particular, the high byte of the 16-bit accumulator becomes a secret second 8-bit accumulator that you can swap in and out
22:23
<&McMartin>
The Z80 has one of those two but you're only really supposed to use it for, like, simulations of supervisor mode
22:24
<&McMartin>
Also it's got 24-bit pointers and the high byte is used like a segment register on x86
22:25
<&McMartin>
And while I've mocked the x86 for spending 32 bits to form a 20-bit address, I can at least acknowledge that this buys something that strictly disjoint banks like the 65816 does not have
22:25
<&McMartin>
Overall still fine except for a few headaches for someone who would want to, well, design the Apple IIgs. I should look into exactly how they made that work
22:26
<&McMartin>
There's a stripped down only-16-address-pins version of the 65816 called the 65802 that was pin-compatible with the 8-bit chips
22:26
<&McMartin>
Despite being crippled I actually have way fewer objections to that crippled version!
22:35 macdjord|slep is now known as macdjord
22:45
<&McMartin>
Poor Life Choices Instruction Set Computer
23:12
<@Alek>
I swear I've read that the 65802 was more popular, more widely used...
23:13
<@Alek>
than the 65816, I mean
23:13
<@Alek>
but eh, it's been so long... I'm probably remembering something wrong.
23:51
<&McMartin>
I can see the 65802 being less insane tbh
23:51
<&McMartin>
In any other application I feel like the Motorola 68000 would be a better choice
23:58 Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Ping timeout: 121 seconds]
--- Log closed Sat Dec 28 00:00:32 2019
code logs -> 2019 -> Fri, 27 Dec 2019< code.20191226.log - code.20191228.log >

[ Latest log file ]