not_bob
I host a ton of torrents and have no real issues.
dr|z3d
zzz identified a bug so it'll be fixed soon.
not_bob
Yep, read the scrollback. Good stuff.
not_bob
Still super busy on this end.
dr|z3d
busy's good.
dr|z3d
busy and compensated :)
not_bob
I just had dinner at a brazalian steakhouse, totally worth it.
not_bob
So tasty.
dr|z3d
sure you didn't have a brazilian at a steakhouse? :)
not_bob
No, no. I ate so much meat. It was amazing.
dr|z3d
*** makes the sound of barber's sheers. ***
not_bob
hahahahaa
not_bob
I don't like barbor shops.
dr|z3d
What about berber shops?
not_bob
Hahhaa, I read that wrong :)
not_bob
Anyway.
dr|z3d
:)
not_bob_afk
Alas, later!
dr|z3d
laters o/
zzz
yeahno. svg qr code experiment over
zzz
it's a horrible idea
zzz
because a qr code is essentially a bitmap, which png is really good at compressing
zzz
7KB typ
zzz
in svg it's over 1600 rectangles, 180KB, and that's after doing some work to consolidate the rectangles
dr|z3d
yeah, you'd probably want to use a different algo for svg, not sure if the library supports that.
dr|z3d
have you tried tweaking the error correction level?
dr|z3d
EncodeHintType class might offer some assistance..
dr|z3d
there are other tunables in there that might affect the complexity of the output and therefore size of the svg.
dr|z3d
> Error correction level: Reducing the error correction level from Q (25% Reed-Solomon coding) to L (15% Reed-Solomon coding) or even M (7% Reed-Solomon coding) can significantly reduce the QR code's size. This is because lower error correction levels require less data to be encoded, resulting in a smaller QR code.
dr|z3d
PDF417_COMPACTION, PDF417_DIMENSIONS, and AZTEC_LAYERS variables also look promising.
zzz
sure you could make reductions on the margin but it's still a shitload of rectangles
zzz
it gzips down to nothing but you're still asking the browser to render a thousand shapes
dr|z3d
yeah, but how are you loading it into the browser? as <svg> or <img> ?
zzz
doesnt matter
dr|z3d
it very much does matter.
zzz
img
zzz
still has to render it whether in the document dom or not
dr|z3d
that's what you should be doing, the browser will rasterize the svg when specified as an img. and remember, we only need to render it once.
zzz
it's still rendering a bitmap as a svg.
dr|z3d
sure, that was the point :)
dr|z3d
as an img, it'll also be cached.
dr|z3d
if (hints != null) {
dr|z3d
if (hints.containsKey(EncodeHintType.ERROR_CORRECTION)) {
dr|z3d
errorCorrectionLevel = ErrorCorrectionLevel.valueOf(hints.get(EncodeHintType.ERROR_CORRECTION).toString());
dr|z3d
}
dr|z3d
if (hints.containsKey(EncodeHintType.MARGIN)) {
dr|z3d
quietZone = Integer.parseInt(hints.get(EncodeHintType.MARGIN).toString());
dr|z3d
}
dr|z3d
}
zzz
with our typ. qr w/ addresshelper into a 384x384 img, the 'core' qr part is 81x81 scaled up 4x to 324x324
zzz
81x81=6561 pixels, half on, half off more or less
zzz
so we have to draw 3300 pts, with consolidation into boxes it's about 1600
dr|z3d
yeah, I think you can get that right down if you tweak error correction and the other variables.
zzz
"right down" means what, 25%? 50%? it's too much by a factor of 20 at least
zzz
wrong encoding for the job
dr|z3d
well this is curious: javacodegeeks.com/2019/04/create-code-svg-using-zxing-jfreesvg-java.html
dr|z3d
this comment suggests optimizations to avoid pixel-level translation: stackoverflow.com/a/67248024
zzz
the SO post is basically what I did
dr|z3d
up to you. you can try to optimize the output, tweak some knobs, or move on to something less frustrating :)
dr|z3d
it's not like qrcodes play a prominent role in the console.
zzz
right. for simple hostname-only urls it would be reasonable but not with our 600-char urls w/ addresshelper
dr|z3d
yeah, very true. any which way you cut it, encoding 600 characters ain't going to be pretty.
dr|z3d
dunno if you can compromise there and encode the b32 instead of the b64.
dr|z3d
or encode a hash of the b32 which you can then feed into a form in susidns.
dr|z3d
significant updates to the zilvero snark theme in latest + dev build, let me know how you find it if you're a zilvero user (or even if you're not!). thanks!
dr|z3d
one for you, T3s|4: lore.kernel.org/all/CAHk-=wiGk+1eNy4Vk6QsEgM=Ru3jE40qrDwgq_CSKgqwLgMdRg@mail.gmail.com
dr|z3d
linus and jason in conversation.
dr|z3d
*** chuckles. "Jason. This smells. It's BS." ***