-
Link Mauve
Zash, https://github.com/xsf/xeps/pull/1010
-
jonas’
ohhh
-
jonas’
intriguing
-
Link Mauve
I probably missed some elements, and the examples are too bright in order to not have to modify the other CSS, but it’s a starting point.
-
jonas’
doesn’t seem to work with my fennec
-
jonas’
even though fennec itself is dark
-
jonas’
oh wait
-
Link Mauve
I only tested with my laptop’s Firefox, not my phone’s.
-
jonas’
my laptop firefox doesn’t know about dark mode at all -.-
-
jonas’
only via about:config methinks
-
Link Mauve
I configure mine from GTK’s settings.
-
jonas’
no GTK here
-
Link Mauve
echo '[Settings] gtk-application-prefer-dark-theme = true' >> ~/.config/gtk-3.0/settings.ini
-
jonas’
works on my laptop’s firefox if I force it to dark
-
Link Mauve
Oh, do you build it with Qt support?
-
jonas’
Link Mauve, no, but I don’t have any gtk tooling
-
Link Mauve
I didn’t know it still supported that.
-
jonas’
I use whatever debian does
-
Link Mauve
Debian most likely builds Firefox with GTK.
-
jonas’
sooo... on the platform which most natively supports dark mode (android), firefox (fennec) fails to respect it for websites, while it does for its own ui?
-
jonas’
hm, I find the syntax highlighting hard to read
-
jonas’
not sure this is an improvement
-
Link Mauve
I could make it fully white if you prefer.
-
jonas’
yes, that or fixing the stylesheet of the syntax highlighter
-
Link Mauve
Or figure out XML colours which go better on a dark background.
-
Link Mauve
jonas’, there.
-
jonas’
now they’re dark
-
jonas’
https://share.dreckshal.de/dpm/ZiGcUDzS8UZ3iGfpV-LiMoZHjhIvWmfvkGRZU8nyyAk.png
-
Link Mauve
Wut, did I forget to commit the prettify.css?
-
jonas’
oh
-
jonas’
sorry
-
Link Mauve
No I didn’t.
-
jonas’
I was under the impression you only changed xmpp.css
-
jonas’
I didn’t update prettify.css on my webserver
-
jonas’
much better
-
jonas’
this is great, thanks!
-
Link Mauve
:)
-
jonas’
pushed
-
jonas’
need to poke the docker stuff once it’s done, but lunch first
-
Link Mauve
I should have done that years ago…
-
jonas’
no, that would’ve been with the old CSS ;)
-
jonas’
huh
-
jonas’
the change didn’t make it into the docker image
-
jonas’
not sure why, need to look at it later, lunch first
-
Link Mauve
Enjoy. :)
-
Zash
Ooooh
-
larma
jonas’, I am not a big fan of Blurhash. I think it's not really well documented. https://github.com/woltapp/blurhash/blob/master/Algorithm.md is all you get. It uses custom, digit-based base 83 encoding, doesn't support alpha channel. And as far as I can see, it's not even heavily popular. Mastodon and Signal use it, and that's basically it. It just happen to be circulated within XMPP people for some reason and the word Blurhash is even used here as a synonym for "very small image scaled up in a blurry way" by some.
-
jonas’
larma, no, I specifically talk about blurhash
-
jonas’
by that I mean the entire package, because I looked at it and I consider it a reasonable and smart solution to the problem
-
jonas’
in contrast to taking an 8x8 JPEG/PNG and scaling that up with a bilinear filter
-
jonas’
I’m not sure how alpha channels would even work with such a technology, that needs more thought
-
larma
why do you think it's smart comparing to a simple bitmap? I wouldn't take jpeg or png because they have huge overhead for small size images
-
larma
classic pc bitmap, you now this old .bmp, is much better for very small images
-
larma
4x3 = 12 32-bit colors are just 48 byte, encode them using base64 and you get 64 ascii chars. Yes a 4x3 blurhash is "just" 28 ascii chars. But given the overall overhead we have in XMPP that's not a huge thing. Also as quality of blurhash isn't exactly comparable with 32-bit color, we can easily reduce this by half (using 16-bit colors) and reach a size that is pretty close.
-
jonas’
Link Mauve, there, it’s live (cc @ Zash)
-
Zash
Shiny, thanks Link Mauve
-
Link Mauve
Woohoo!
-
larma
jonas’, test image: http://larma.de/blur_sample_base.jpg 4x3 blurhash: http://larma.de/blur_sample_blurhash_4x3.jpg image scaled to 4x3, reduced color depth to 12-bit (no alpha) and then scaled up again, both scaling used cubic interpolation: http://larma.de/blur_sample_cubic_scaled_4x3.jpg
-
Link Mauve
Tbh I don’t recognise any feature of the original image in either of the 4×3.
-
jonas’
larma, can you use cubic in browsers?
-
larma
well, you can see a rough estimate of the color
-
Link Mauve
jonas’, you can use any algorithm with the <canvas> API.
-
Zash
Point is to have something to show until you download the actual image
-
jonas’
Link Mauve, sure
-
larma
The problem is that if you don't have alpha in the preview you can't correctly display it if the final image has alpha and you want to display it on background of varying color (which we need to consider in a heterogenous environment like public XMPP network). You certainly could add an alpha component to blurhash, but then you couldn't reuse existing implementations, making it probably harder to use (and not smaller in size) than just using bitmap data.
-
jonas’
larma, not wrong, but I wonder how that cubic interpolation of yours would look like with alpha
-
larma
I guess cubic interpolation isn't that good for images that typically have alpha. It works good for photos, not necessarily for graphics
-
jonas’
yep
-
jonas’
downscaling alpha also doesn’t work wel✎ -
jonas’
downscaling alpha also doesn’t work well ✏
-
larma
but blurhash also doesn't work well for anything that is not photos, so that's a general issue for these kinds of things
-
jonas’
exactly
-
jonas’
but I guess one could pick a blurhash-y thing for JPEG input and a simple downscaled bitmap for non-JPEG input
-
larma
with alpha: http://larma.de/blur_cat_base.png image scaled to 4x4 (32-bit with alpha) and scaled up to original: http://larma.de/blur_cat_cubic_scaled_4x4.png
-
jonas’
hm, probably OK on a uniform coloured background✎ -
jonas’
hm, probably OK on a uniformly coloured background ✏
-
larma
would probably have more effect on images where more than just a few pixels on the edges have transparency
-
larma
http://larma.de/blur_xmpp_base.png, http://larma.de/blur_xmpp_cubic_scaled_4x4.png
-
larma
in any case scaling down to very small images and reducing color depth and then scaling up again gives decent enough results, at least on the same level of blurhash, if you use some more advanced interpolation. If for some reason your platform does not allow you to do this, but you can do gaussian blur, an alternative would be to use no interpolation when scaling up and then apply gaussian blur (with radius set to scaling factor) on the few "very large pixels". Results should be similar.
-
larma
especially implementation work for everyone who can't use any of the existing encoder and decoders is going to be much less when being based on simple rgb bitmaps instead of complex encodings.
-
jonas’
sure
-
jonas’
makes sense
-
Zash
MattJ, jcbrand, either of you happen to have an updated XEP-0317: Hats somewhere in your TODOs?
-
MattJ
Yes
-
MattJ
edhelas also expressed an interest in it recently, maybe he'll beat me to it
-
SamWhited
I think a lot of distros (maybe Debian?) enable Firefox's anti-fingerprinting protections by default (which disables dark mode entirely)
-
SamWhited
For whomever was saying it wasn't working in Firefox.
-
Zash
Wasn't that Firefox mobile? Worksforme with Firefox on Debian
-
SamWhited
oh, fair, I just saw "doesn't work in Firefox" in the history and was taking a wild-ass guess. So grain of salt.
-
moparisthebest
Zash: https://addons.mozilla.org/en-US/firefox/addon/darkreader/ actually seems to work great on almost all sites
-
mathieui
moparisthebest, yes but is quite heavy
-
mathieui
(I mean if you don’t have a recent multicore machine you will struggle on anything but simple pages like linkmauve.fr)
-
Link Mauve
linkmauve.fr once again > *
-
moparisthebest
I haven't noticed any problems, I even use it on my android firefox
-
Zash
Good thing I broke my new laptop and only use a 9 year old thinkpad.
-
Zash
(stationary thinkpad, grown stuck to my desk)
-
mathieui
moparisthebest, I noticed on an i7-7700k with 16GB of ram
- eta can't reach linkmauve.fr
-
Link Mauve
:o
-
eta
Link Mauve, oh, you don't do port 80
-
Link Mauve
No, only port 443.
-
Link Mauve
It should be part of hsts preload though.
-
eta
huh, so it is
-
eta
(checking hstspreload.org)
-
eta
that reminds me, I need to fix HSTS on theta.eu.org
-
Ge0rG
HSTS preload. Whoever had that idea needs to be punished in horrible ways. I mean, yes, it works for something like the top 1000, but how are you supposed to bundle all the crypto nerds' homepages into all the browsers?
-
moparisthebest
seems to be working no?
-
Ge0rG
So I need to submit all my websites to make it break?
-
moparisthebest
submit them all, it'll be fine
-
Zash
inb4 Ge0rG submits <every uuid>.example
-
Zash
Aren't browsers also shipping CRLs embedded? And all sorts of stuff
-
Zash
Ge0rG: Looks like it's only 12MB uncompressed JSON https://github.com/chromium/chromium/blob/master/net/http/transport_security_state_static.json
-
Ge0rG
Zash: well yes, that's *before* I submitted all my domain names! 😁
-
jonas’
SamWhited, I have the issue on android, and it’s officially not supported according to MDN
-
lovetox
that there is a execute action and an execute attribute and both have defaults if absent
-
lovetox
is beyond confusin in 0050
-
Zash
yeah
-
lovetox
The action "execute" is equivalent to the action specified in the "execute" attribute. If the "execute" attribute is absent, it defaults to "next".
-
lovetox
that sentence is a real treat
-
lovetox
what default to next here
-
lovetox
the action or the attribute
-
Zash
You're telling me it's still confusing after this went trough council? :/
-
lovetox
actually no
-
lovetox
the way this is written, it must be the attribute that is meant
-
Ge0rG
It was even more confusing, and then there was a long discussion how to remove the confusion without changing any normative text
-
lovetox
it would be so much clearer if the execute action simply did not exist
-
Zash
I was thinking that execute = start
-
lovetox
execute = everything
-
lovetox
wait, is the execute action a real action element?
-
lovetox
its not in any of the examples
-
Zash
Isn't it the first step?
-
Zash
https://xmpp.org/extensions/xep-0050.html#execute-simple
-
lovetox
yes
-
lovetox
the question was, will i see in real life ever a <execute/> element
-
Zash
no
-
lovetox
no
-
lovetox
yeah, ok starts to make more sense slowly
-
lovetox
would be useless
-
Zash
action=execute → status=executing → { action=next|prev|complete } → status=completed
-
lovetox
ah so i can simply never send action=execute
-
lovetox
except for the first command
-
Zash
you MAY, or not. it's the only option at that point, so redundant
-
lovetox
ok that makes it simpler
-
lovetox
because from a gui standpoint, if i draw buttons next, prev, etc
-
lovetox
but when clicking on them i send "execute" suddenly
-
Zash
Link Mauve, p.box (Note: ...) has black text
-
Lance
you can send action=execute any time. but it's the "idk what i want, you decide for me" option. so the responder decides what actually happens
-
Link Mauve
Zash, do you want to fix it, or should I do it?
-
Zash
Link Mauve: Do *you* want to? I can, but not now.
-
Lance
i'd wouldn't send action=execute if a user actually clicked on a prev/next/complete button, just the explicit action the user chose
-
Link Mauve
Zash, I’m working on Jingle stuff.
-
Link Mauve
I can do it at some point too.
-
lovetox
yeah Lance thats what i also think
-
Lance
only time id consider using action=execute would for some automated exchange, where i just want to fast track though the default happy path the responder wants
-
Lance
but even then, ehhh
-
lovetox
oh wow just found this
-
lovetox
If the <actions/> possesses the "execute" attribute, that value is the default button or option. If the <actions/> does not possess the "execute" attribute, there is no default button or option.
-
lovetox
thats what i was actually searching
-
lovetox
so i just pick whatever the execute attr tells me and color my button
-
lovetox
and i never have to actually send execute or even care what it "defaults" to if its not htere
-
Lance
yeah, the whole execute attribute thing is entirely for UI guidance/hinting on the submitter side. if you're the responder and receive action=execute it just means you get to choose what happens instead of the submitter choosing
-
Lance
the ambiguity in the model comes from when the responder provides (or doesn't provide any) UI hints that match what it would choose
-
Zash
Ought to have been called "default", but oh well
-
Lance
err, UI hints that _do not match_ what it would choose
-
lovetox
i think the problem is that i trys to fill 2 jobs
-
lovetox
first provide a UI hint
-
lovetox
2. for this rare usecase where i just want to send "execute"
-
lovetox
i wonder how a xmpp lib fullfills both things
-
lovetox
because the xep says, execute defaults to "next"
-
lovetox
but obviously a xmpp lib should not fill the var with "next" otherwise the UI doesnt know that there was no default action and no UI hint should be given
-
lovetox
either way, after working this out now, i treat it only as UI hint client side
-
lovetox
and i dont default it to "next", because not set means no hint should be given