#dev 2021-10-04

2021-10-04 UTC
[timothy_chambe], SamWilson[m], samwilson, Guest2366, maxwelljoslyn[d], [fluffy], alex11 and hendursaga joined the channel
#
capjamesg[d]
I thought I had figured out recrawling for IndieWeb Search but I haven't quite done so yet...
#
capjamesg[d]
Right now, I collect all feeds on a site and save them to a feeds.json file.
#
capjamesg[d]
Example: {"jamesg.blog": [{"url": "https://jamesg.blog/feed.xml", "mime_type": "application/atom+xml", "etag": "NOETAG", "discovered": "2021-10-01"}]}
#
capjamesg[d]
I have two issues. First, updating. Every time I want to update this JSON file, I need to read it, amend the site's feeds list, and then save the file again. Second, this code is multithreaded. What happens if two threads need to read / write at the same time?
#
capjamesg[d]
I would love to do this without a database because that is more overhead to set up.
#
capjamesg[d]
I suppose I could technically have a microservice whose sole job is just to save / retrieve feeds that is backed by a database?
#
capjamesg[d]
Any better alternatives would be greatly appreciated! I have been scratching my head about this for days.
[KevinMarks] and hendursa1 joined the channel
#
nekr0z
capjamesg[d] you need blocking on the file write (or perhaps read/write, depending on your app's architecture) if the app is mutli-threaded, I doubt there's another way. A separate microservice is a valid idea, but it basically achieves the same thing. Would have been the same with a database, though ;)
#
sknebel
capjamesg[d]: if it's multi*threaded* you can keep a lock in the app on which process owns what file now?
#
sknebel
if its multiple processes, more thought needed
#
sknebel
sorry, "which thread owns what file"
tetov-irc joined the channel
#
capjamesg[d]
Thanks for your help everyone!
#
capjamesg[d]
I am going to just use a database, probably MySQL.
#
capjamesg[d]
It will be a lot easier and scalable than looking through a JSON file that could get massive 😄
#
capjamesg[d]
I had no idea you could keep a lock on what process owns a file. That could be super useful sknebel++ / nekr0z++
#
Loqi
nekr0z has 2 karma in this channel over the last year (3 in all channels)
#
capjamesg[d]
sknebel++
#
Loqi
sknebel has 7 karma in this channel over the last year (29 in all channels)
Seirdy, akevinhuang, [Grant_Hutchins], Ramon[d] and joshproehl joined the channel
hendursa1 joined the channel
#
[tantek]
Is anyone displaying one of these “skeleton screens” when their site is loading?
#
[tantek]
Is it worth defining “skeleton screen” as an anti-pattern to avoid? https://twitter.com/scottjehl/status/1445024832035463171
#
@scottjehl
Skeleton screens were an interesting idea, but I feel like they've shown to be less a design pattern, more an anti-pattern. I wonder how often they resolve to layouts they resemble. Are these old site layouts? Probably rather see a spinner than a random gray-box page layout step https://pbs.twimg.com/media/FA2-DDeXEAsqP6b.png
(twitter.com/_/status/1445024832035463171)
[chrisbergr] joined the channel
#
jeremycherfas
I have a problem loading a module in Python. I know the module is at `~/opt/anaconda3/pkgs/` My project is at `~/notebooks/test/` I tried `.opt.anaconda3.pkgs import geojsonio` and `..opt.anaconda3.pkgs import geojsonio` and got two different errors. is there a Python euqivalent of `~`? Should I be spelling out `user`?
#
nekr0z
<[tantek]> "Is anyone displaying one of..." <- If the site takes *that* long to load, skeleton screen is not the biggest issue at hand, IMO.
#
capjamesg[d]
I haven't seen any IndieWeb examples. I know a few big sites do it though. I'm not sure if it's worth defining it as an antipattern for personal sites.
#
sknebel
jeremycherfas: python imports aren't folder based, so that's not gonna work in any variant
#
jeremycherfas
I've been reading stuff about importing from packages and modules with a path, and those seemed to be the suggestions.
#
capjamesg[d]
What errors did you get?
#
jeremycherfas
But I am probably misunderrstanding.
#
sknebel
if you use the anaconda python, it should find it with the package name
#
capjamesg[d]
Can you remove the . and say from opt.anaconda3.pkgs import geojsonio
#
jeremycherfas
No module named '__main__.opt'; '__main__' is not a package
#
sknebel
capjamesg[d]: even if that works somehow please don't suggest methods like that :/
#
jeremycherfas
Without the . `ModuleNotFoundError: No module named 'opt'`
#
sknebel
are you using the anaconda python?
#
capjamesg[d]
sknebel Very true.
#
capjamesg[d]
Disregard my suggestion.
#
sknebel
does just "import geojsonio" work?
#
jeremycherfas
I hope so. I am using Jupyter from Anaconda. And I installed geojsonio using `conda install`
#
jeremycherfas
No. `ModuleNotFoundError: No module named 'geojsonio'`
#
sknebel
import sys
#
sknebel
sys.path
#
jeremycherfas
But if I search for geojsonio it is in `opt/anaconda/pkgs`
#
sknebel
also sys.executable
#
jeremycherfas
`from sys.path import geojsonio` gives `ModuleNotFoundError: No module named 'sys.path'; 'sys' is not a package`
#
sknebel
no, not import from
#
sknebel
exactly those commands
#
sknebel
sys.path is where it searches stuff
#
sknebel
sys.executable is what python it uses
#
sknebel
(I don't use conda, so not 100% sure how it does things)
hendursaga joined the channel
#
jeremycherfas
Ahah. So sys.path is showing that all the paths are to the specific anaconda environment that I set up. Let me check site-packages for that.
chenghiz_ joined the channel
#
sknebel
ah you have one of these project-specific environments through anaconda, then you probably need to run conda install in there
#
jeremycherfas
geojsonio is not there! Thank sknebel++
#
Loqi
sknebel has 8 karma in this channel over the last year (30 in all channels)
#
jeremycherfas
Now, I wonder how I install it into that location, given that Anaconda Navigator does not find geojsonio as a package it can install.
#
sknebel
I think you can run shell commands through the notebook, or on the terminal activate the environment and then run it there
#
jeremycherfas
goes off to find out how to tell conda where to put things.
#
sknebel
(I think you can do "!conda install geojson" in the notebook if I remember jupyther syntax right)
stephenajulu and kogepan joined the channel
#
Loqi
Ok, I'll tell them that when I see them next
#
capjamesg[d]
!tell [tantek] I have made a public query that shows a breakdown of feeds found in crawls: https://indieweb-search.jamesg.blog/stats
#
capjamesg[d]
This is more of a heads up than anything else because the data is not backdated. It will only show new feeds encountered by the index / those found in recrawls.
#
capjamesg[d]
In a few weeks, the numbers should be much higher 🙂
#
capjamesg[d]
feed / websub are reserved names, not the actual MIME type found.
mackeveli_, diegov, vikanezrimaya and unrelentingtech1 joined the channel
#
nekr0z
capjamesg[d]++
#
Loqi
capjamesg[d] has 10 karma in this channel over the last year (20 in all channels)
#
nekr0z
capjamesg[d]++
#
capjamesg[d]
Why thank you!
#
nekr0z
Doesn't seem to work from the Matrix bridge. Anyway, just wanted to show appreciation of the indieweb-search effort.
mambang[m] joined the channel
#
capjamesg[d]
Thanks. I have finally thought of a way to make reindexing happen without me. I just need to make sure it works in the field.
#
Loqi
[capjamesg] indieweb-search: Source code for the IndieWeb search engine.
#
Loqi
[capjamesg] indieweb-search: Source code for the IndieWeb search engine.
unrelentingtech1, nekr0z and plindner[m] joined the channel
#
GWG
What can we talk about that isn't the outage that I have no emotional reaction to?
#
Loqi
GWG: [tantek] left you a message 1 day, 11 hours ago: I rewrote the h-feed discovery section a bit, hopefully to make it clearer and provide more explicit steps (rather than a long sentence). LMK what you think: https://microformats.org/wiki/h-feed#Discovery
#
GWG
I thought I did let him know what I thought
npd[m] and cadeyrn[d] joined the channel
#
[tantek]
agreed on skeleton screens. thanks for the quick gut-check folks!
#
[tantek]
aaronpk, do your notes not display mentions? pretty sure I sent you one 🙂 https://aaronparecki.com/2021/10/04/9/my-blog
#
Loqi
[Aaron Parecki] you know what's *not* down right now? my blog ⬇ https://aaronparecki.com/
#
aaronpk
well that's ironic
#
@aaronpk
you know what's *not* down right now? my blog ⬇ https://aaronparecki.com/
(twitter.com/_/status/1445072111098220551)
#
aaronpk
weird that some ofthem are coming through
#
[tantek]
I mean I sent you a direct one from my site to yours obviously 😉
#
aaronpk
you know what, all the twitter webmentions aren't showing up either. it's only the activitypub replies
#
aaronpk
webmention.io has it...
#
aaronpk
ok yea something is wrong with my webmention receiving! I wonder what changed
#
aaronpk
ohhh it's the stupid ssl thing
#
aaronpk
as of sep 30 my website hasn't been able to fetch data from webmention.io
#
aaronpk
i knew there was gonna be some unintended side effect i hadn't considered when i tried that quick fix
#
aaronpk
oh wait, other way around, webmention.io is failing to post the webmentions to my website's web hook
#
[tantek]
lol aaronpk hoisted by your own centralized service 😂
#
aaronpk
apparently webmention.io bundles its own root cert list and that hadn't been updated in a while either
#
[tantek]
keeps refreshing aaronpk's note permalink to see the webmentions
#
aaronpk
making progress...
#
aaronpk
gonna have to re-send a bunch of these webhooks
#
aaronpk
good thing i know the person who runs webmention.io
#
GWG
aaronpk: Send yourself a sternly worded message?
#
[tantek]
imagines aaronpk hacking up a UI to "Resend me all webmentions since __ / __ / __ "
#
aaronpk
heh ui
#
aaronpk
optimistic
#
[tantek]
I mean you did build a dashboard!
#
[tantek]
aside: for those of you interested in the open/public opportunities to participate in W3C's annual TPAC, registration is now open! https://www.w3.org/2021/10/TPAC/
#
[tantek]
(dropping it into dev because W3C is very much a dev-centric thing)
kogepan joined the channel
#
aaronpk
woohoo all backfilled from sep 30
#
GWG
aaronpk: Do you have one of those Staples That Was Easy buttons?
#
[tantek]
aaronpk, cool, looks like my mention showed up but not my like! https://aaronparecki.com/2021/10/04/9/my-blog
#
Loqi
[Aaron Parecki] you know what's *not* down right now? my blog ⬇ https://aaronparecki.com/
#
Loqi
[Tantek Çelik] likes aaronpk’s note (@)
#
aaronpk
i don't see a webmention from that url in my logs
#
[tantek]
I suppose the lag from the POSSE like on Twitter is expected though
#
aaronpk
yep i think bridgy hasn't caught up yet
akevinhuang2, Seirdy0, Seirdy, Jeremy, [tw2113_Slack_] and edburns[d] joined the channel
#
capjamesg[d]
petermolnar How easy / secure is it to run your own email?
#
petermolnar
That is a deep and complex question: if you go with something that holds your hand, it's not too hard and secure enough, but there's no guarantee that the wonderful silo emails won't send you to spam.
#
petermolnar
if you start from scratch and by hand, it could take a while.
#
petermolnar
there's postfix + opendkim + opendmarc + dovecot + spamassassin + postgrey + clamav for all by yourself
#
Allie
ran their own email for many years
#
Allie
it's relatively painless unless you want to email people hosted by microsoft
[snarfed] joined the channel
#
[snarfed]
that way lie dragons
#
[tantek]
"relatively painless" 😂
#
petermolnar
... or gmail with a fresh IP, or yahoo on random occasions, or mail.ru for whatever reason.
#
aaronpk
or finding a web host that will even let you run a mail server
#
petermolnar
looks at his homeserver doing so
#
petermolnar
is getting a "business" internet connection an option for that?
#
aaronpk
dunno about over there but in my experience the major US ISPs are all either blocked by other servers or block outgoing mail themselves
#
[snarfed]
aaronpk++ yup
#
Loqi
aaronpk has 33 karma in this channel over the last year (106 in all channels)
#
petermolnar
I have a Virgin Media Business at home; before that, Zen(.co.uk), both worked flawlessly
#
[snarfed]
if you want to learn deep obscure *nix sysadmin and internet protocol stuff (DKIM, DMARC, SPF, ugh), definitely host your own email!
#
[snarfed]
...buuuuut if you want to own your email for privacy, data sovereignty etc reasons, consider something like https://thehelm.com/ instead
#
petermolnar
wait, there was something new as well, not just helm
#
petermolnar
yep, go with this one
#
aaronpk
those two don't look like comparable services... one is a box you buy, the other is software you install on something
#
aaronpk
but also doesn't running that helm box at home still have all the problems of finding a home ISP that isn't blocked and will let you send email?
#
[snarfed]
aaronpk they run end to end encrypted relay servers with clean IPs, etc for all network protocols
#
[snarfed]
really deeply and well thought through
#
aaronpk
oh so that box connects to their cloud service?
#
[snarfed]
just for some external communication and encrypted backups
gRegor joined the channel
#
[snarfed]
unrelated, capjamesg inspired me to put together the regexp queries for feed types in Indie Map. counts by link rel + type are https://snarfed.org/indiemap_link_rel_type_counts.csv.txt , complete list of sites by rel + type is https://snarfed.org/indiemap_link_rel_type_per_site.csv.txt
tetov-irc joined the channel
#
[snarfed]
SQL queries:
#
[tantek]
snarfed++ this is super!
#
Loqi
snarfed has 31 karma in this channel over the last year (58 in all channels)
#
[snarfed]
upshot is, 20% of indiemap sites have rel=feed type=text/html, which is likely h-feed
#
[snarfed]
50% have rel=alternate type=application/rss+xml
#
[snarfed]
caveat is, this is only looking at home pages, 2104 of them
#
[snarfed]
thanks tantek!
#
[fluffy]
What about atom?
#
[tantek]
looked like ~6.5%