Next>> Scroll to Bottom
Stuff goes here
L1[12:03:54] ⇨
Joins: payonel
(payonel!~payonel@2607:5300:60:9e85::bad:c0de)
L2[12:04:26] <payonel> %lua function
utf8_char(decimal) local bytemarkers = { {0x7FF,192}, {0xFFFF,224},
{0x1FFFFF,240} } if decimal<128 then return string.char(decimal)
end local charbytes = {} for bytes,vals in ipairs(bytemarkers) do
if decimal<=vals[1] then for b=bytes+1,2,-1 do local mod =
decimal%64 decimal = (decimal-mod)/64 charbytes[b] =
string.char(128+mod) end charbytes[1] =
string.char(vals[2]+decimal) break end end return
table.concat(charbytes) end
L3[12:04:31] <payonel> %lua return
utf8_char
L4[12:04:31] <MichiBot> function:
0x7f7c60093db0
L5[12:04:37] <payonel> %lua return
utf8_char(0x2525)
L6[12:04:37] <MichiBot> ┥
L7[12:05:08] <payonel> %lua return
utf8_char(0x1f0A1)
L8[12:05:09] <MichiBot> ð
L9[12:05:10] <payonel> %lua return
utf8_char(0x1f0A0)
L10[12:05:10] <MichiBot> ð
L11[12:05:13] <payonel> %lua return
utf8_char(0xf0A0)
L12[12:05:13] <MichiBot>
L13[12:05:17] <payonel> %lua return
utf8_char(0xFFFF)
L14[12:05:17] <MichiBot> �
L15[12:05:31] <payonel> %lua
s=utf8_char(0x1f0A1) return #s
L16[12:05:31] <MichiBot> 4
L17[12:05:33] <payonel> huh
L18[12:05:50] <payonel> %lua
s=utf8_char(0x1f0A1) return s[1]
L19[12:05:50] <MichiBot> nil
L20[12:09:16] <payonel> %lua local byte =
function(n) local l = #s if l < n then return end return
string.byte(s, n, n) end
L21[12:09:33] <payonel> %lua local byte =
function(s, n) local l = #s if l < n then return end return
string.byte(s, n, n) end
L22[12:09:39] <payonel> %lua
byte("abc", 1)
L23[12:09:39] <MichiBot> main:1: attempt to
call global 'byte' (a nil value)
L24[12:09:44] <payonel> %lua byte =
function(s, n) local l = #s if l < n then return end return
string.byte(s, n, n) end
L25[12:09:46] <payonel> %lua
byte("abc", 1)
L26[12:09:46] <MichiBot> 97
L27[12:09:48] <payonel> %lua
byte("abc", 2)
L28[12:09:48] <MichiBot> 98
L29[12:10:56] <payonel> %lua function
unwrap(s, n) if #s < n then return end return byte(s, n),
unwrap(s, n + 1) end
L30[12:11:01] <payonel> %lua
unwrap("abc")
L31[12:11:01] <MichiBot> main:1: attempt to
compare number with nil
L32[12:11:12] <payonel> %lua function
unwrap(s, n) n = n or 1 if #s < n then return end return byte(s,
n), unwrap(s, n + 1) end
L33[12:11:13] <payonel> %lua
unwrap("abc")
L34[12:11:13] <MichiBot> 97, 98, 99
L35[12:11:30] <payonel> %lua
unwrap(utf8_char(0x1F0A1))
L36[12:11:30] <MichiBot> 240, 159, 130,
161
L37[12:12:56] <payonel> %lua
unwrap('?')
L38[12:12:56] <MichiBot> 237, 160, 188,
237, 178, 161
L39[12:20:28] <Mimiru> I still have no idea
why it doesn't work via Query... :/
L40[12:21:04] <payonel> i have no idea why
unwrap('?') returns 237, 160, 188, 237, 178, 161
L41[12:21:12] <payonel> in a shell, it is
240, 159, 130, 161
L42[12:21:24] <payonel> here in irc
(hexchat) it is different
L43[12:21:41] <Mimiru> Michibot uses JNLua,
and it's supposedly a somewhat modifed OC thing.
L44[12:21:51] <Mimiru> gamax92, wrote it so
IDK exactly how the lua side of it works
L45[12:21:59] <payonel> fair enough
L46[12:22:24] <payonel> but something with
multibyte chars is being mangled or shifted
L47[12:22:37] <payonel> and i have a
feeling the 3 byte unicode codepoint is related
L48[12:23:19] ⇨
Joins: MichiBot2
(MichiBot2!~MichiBot2@mail.pc-logix.com)
L49[12:23:19]
Spock sets mode: +o on MichiBot2
L50[12:25:40] <Mimiru> Well, now I see
what's going on with query
L51[12:26:03] <Mimiru> Helper.AntiPings =
Helper.getNamesFromTarget(target); seems to return null somehow but
not throw a NPE
L52[12:26:46] <Mimiru> Ah.. and now I know
why thats happening
L53[12:38:36] <Mimiru> fixed, next time
MichiBot is restarted
L54[12:39:19] ⇦
Quits: MichiBot2 (MichiBot2!~MichiBot2@mail.pc-logix.com) (Read
error: Connection reset by peer)