Threads for jjasghar

    1. 2

      Here’s the VimConf 2024 presentation of this too: https://youtu.be/bopbmRyHQog?si=yibb6NEEXoH24PyE

        1. 1

          This is begging for a github-action that runs on a cron so you could go to https://.github.io/feed and get your own daily rss feed.

          1. 6

            This is just what I do for my browser homepage: http://www.williballenthin.com/homepage/

            GH Actions builds and deploys it every hour, so I get a selection of feed entries (RSS, GH releases, Mastodon posts) without having to check the socials directly.

            1. 1

              Hm, yes, I was thinking about this, but have no experience in GH actions, can you direct me to some relevant resources/examples?

            2. 4

              I found a vim plugin that did most of this, and then improved it to do more & better … I should get back into it and figure out a good way to do the misused phrases…

              1. 3

                My simple version of this (and my attempt to learn some vimscript) was this: https://github.com/jjasghar/vim-wrong-words-oss.

                Admittedly the first plugin you found is so much more complete then my little highlighter.

              2. 2

                Most, if not all of us, know what FOSDEM is, but if you don’t, it’s one of the most important conferences you can go to in your technical career.

                As an old mentor of mine said, “It’s boot camp for nerds; everyone smells, it’s chaos, but you’ll come out with some of the best and closest friends you’ll ever have after it.”

                FOSDEM is a right of passage, speaking at it doubly so.

                1. 2

                  best of all, it is free to attend (minus hotel/food/transport) obviously

                2. 12

                  Yay! No more exit() we can just type exit!

                  1. 7

                    In case it’s helpful to you, the python REPL will exit on ctrl+d (i.e. EOF), just like many shells.

                    1. 5

                      Unless you’re on Windows, where you need to hit ctrl+z then enter.

                    2. 4

                      Finally! I HATED THAT ERROR MESSAGE

                    3. 6

                      Cool! There is another way as well in recent versions of weechat: The new weechat api relay protocol allows you to connect a local weechat client to another weechat instance running somewhere else. You could thus run weechat-headless in Kubernetes, and connect to it with a local client, as long as the clients share the same version.

                      1. 1

                        Do you have a tutorial/link to how to set that up? I think i’d like to give that a shot on an extra box I have.

                        1. 2

                          Just to follow up here Simon, thank you again, it got me to a deployable .pkg which is more then i could ask for. Thank you again for your help.

                          1. 3

                            I’ve used this tutorial for pyinstaller in that past: https://realpython.com/pyinstaller-python/

                            I’m quite satisfied with PyInstaller and successfully distributed apps on Windows with it.

                            1. 1

                              Ah nice! Thank you. This in just one .py file though right? I’m looking for a whole package to convert into a .exe or .app.

                              1. 1

                                It starts from the entrypoint and somehow scans everything imported and packages it automatically.

                                1. 1

                                  Oh nice, i just found this too: https://www.youtube.com/watch?v=S_Bus_FNjpg, this seems like a full talk on pyinstaller.

                            2. 2

                              I think there’s an aspect of “I can’t run SQLite without a server” out there. If you are running a simple flask app, or django, “serverless” app on a free tier, you can’t use SQLite. You’ve spent the time to develop your code against it, ready to publish it (in production) and now you have to figure something else out. (and it will probably cost you real money)

                              1. 2

                                most cloud providers have a free tier for a VPS

                              2. 8

                                Protip: name the venv venv-projectname, in case you get distracted and wander into a different python project while your virtualenv is still active.

                                1. 20

                                  or use direnv, which will unload the venv as soon as you leave the project directory

                                  1. 4

                                    You don’t need to rename your venv, just rename the prompt.

                                    1. 6

                                      The relevant option to python -m venv:

                                      --prompt PROMPT Provides an alternative prompt prefix for this environment.

                                    2. 2

                                      that’s a really good idea!

                                      1. 1

                                        good god, that’s so brilliantly simple. Why have I never tried this? Thank you 🫡

                                      2. 38

                                        I’m impressed they put a 3-way diff on the page :)

                                        1. 51

                                          Isn’t Redis already completed as a software project? It seems like an open source community could maintain a fork of Redis from before this license change, and easily maintain it by doing almost nothing for decades to come.

                                          What’s the value-add to the software project itself provided by Redis Labs?

                                          1. 11

                                            I came to the same conclusion. Native TLS support was the last big ticket item, so I can’t really see what new functionality is required now.

                                            1. 8
                                              1. 7

                                                It’s the old story that “enterprises” need a throat to choke when something goes wrong. Even if its “feature” is complete from a technology side, companies still need to know they have access to the company behind it. (especially with how deep Redis is in some ecosystems.)

                                                Someone will fork it, OpenTofu and OpenBao happened, Open(whatever Redis can be nicknamed) can’t be too far off.

                                                  1. 8

                                                    When Garnet was announced just a couple of days ago, I saw comments on HN about how they were definitely going to stick with Redis because they didn’t trust Microsoft to keep Garnet open.

                                                    1. 4

                                                      Truely amazing how a handful of hours can change the landscape of our industry.

                                                    2. 2

                                                      Dragonfly is not OSS, so it’s kinda ironic to bring it up now.

                                                    3. 2

                                                      Aren’t these sort of places likely to be using an “enterprise” or “supported” linux anyway (for the same reasons), and thus just get the packaged Redis that is included in the distro repo?

                                                  2. 7

                                                    I hope there won’t be a lot of muddy waters with the choice of the name. In the end this is probably a good thing, a lot of open source projects get taken over completely by companies and in the end it’s a big gamble. Look at centos and mysql for example…

                                                    1. 10

                                                      Maxim Dounin is based in Russia, I don’t think he cares about trademarks or the like. He knows his audience from what can be deduced from this situation.

                                                      1. 2

                                                        What happened with centos and mysql?

                                                        1. 6

                                                          big companies want more money.

                                                        2. 1

                                                          Smells like a Hudson/Jenkins situation.

                                                          1. 18

                                                            So it seems, freenginx is Maxim Dounin that stuck around, after the F5 acquisition, and angie was the Devs that left just as the acquisition happened.

                                                            1. 9

                                                              Any idea why Dounin didn’t join the angie fork?

                                                              1. 18

                                                                From this reply by Maxim:

                                                                Why yet another fork? I mean why just not “angie”, for instance?

                                                                The “angie” fork shares the same problem as nginx run by F5: it’s run by a for-profit corporate entity. Even if it’s good enough now, things might change unexpectedly, like it happened with F5.

                                                          2. 2

                                                            Not gonna lie it was my first time running a Dev Room (AI and ML) and it was exhausting.

                                                            There were issues left and right, and I was genuinely surprised we got some talks actually happened.

                                                            People warned me, and yes the saying “FOSDEM is gonna FOSDEM” is truth.

                                                            1. 12

                                                              I hate to be “that guy” but running an email server now-a-days is insanely hard not to be tagged as spam.

                                                              1. 25

                                                                Then I will be the guy who says that I’ve been running mine for many years with minimal effort. Not sure why the different experience, I do the basics (TLS, SPF, DKIM) but it was fine even before I was doing all that. My outgoing mail is immaculate though. Low volume personal stuff, no newsletters or anything else that recipients would consider unsolicited.

                                                                1. 13

                                                                  +1. I’ve been running Mailinabox.email on a cheap local VPS for 5 years now for my personal email. It’s been absolutely fine, 0 issues with spam or deliverability, despite everyone saying it’s not nowadays. Not sure if I just got lucky with a clean IP or others are exaggerating / repeating others.

                                                                  1. 0

                                                                    You got lucky, or else you’re good at detecting and avoiding moron advice.

                                                                    Of which there is a lot. You can’t run email at home by folliowing other people’s advice blindly, you have to understand your configuration files, and your configuration has to be correct, not just close. “OK my DKIM is not quite right but gmail should not care” leads to failure, “I don’t get this DKIM shit, it’s too complicated” leads to failure.

                                                                    1. 2

                                                                      and your configuration has to be correct, not just close. “OK my DKIM is not quite right but gmail should not care” leads to failure, “I don’t get this DKIM shit, it’s too complicated” leads to failure.

                                                                      There are free online services you can use that tell you whether your config is correct and even whether you are on any blacklists or whether you’ve configured an open relay, etc. It takes almost zero effort to check those and see what you might have configured incorrectly.

                                                                      1. 1

                                                                        There are indeed online services, youtube is well known. That wasn’t the question.

                                                                        The question was: Given that the way he tried to do it failed, how quickly should he have done it in another way to escape that accusation that he tried to hide anything? Not “what’s the fastest” but “what’s fast enough to escape accusation”?

                                                                        FYI, in that 200-page report the investigators said a week was fast enough for them.

                                                                  2. 5

                                                                    Unfortunately, the “works for me”-bros don’t change anything about the reality that it’s very difficult to have reliable email delivery these days. It happens to work for you because you were lucky with IP ranges, reputation, blacklists, etc. You won the lottery - good for you. But it’s no longer like this for everyone. And emails getting lost just isn’t something everyone can afford - we are talking about answers to recruiters, clients, family and loved ones, etc. You don’t want these messages to go missing - especially in a way you cannot detect. A single lost message can alter the course of your life.

                                                                    1. 3

                                                                      It happens to work for you because you were lucky with IP ranges, reputation, blacklists, etc. You won the lottery - good for you.

                                                                      No, not necessarily. You can send your email through an existing email service and take advantage of their IP ranges and reputation. As an example, my opensmtpd server sends all my domain’s email via Fastmail’s servers, so I don’t have to worry about any of that.

                                                                      I did set up TLS, SPF, DKIM, DMARC and reverse DNS. And just in case, I also checked whether my server’s IP address was on any blacklists. I think my former server’s IP address was in one of them, but IIRC it wasn’t hard to ask for removal.

                                                                      I also haven’t experienced any deliverability issues (in many years of usage).

                                                                      In my experience, when you dig into most people’s complaints about email deliverability issues you’ll find that they didn’t set up at least one of the standards I mentioned above (or reverse DNS).

                                                                      1. 1

                                                                        As someone who likes self-hosting but has been deterred from running a mail server by stories like those in this thread, running your own mail server but also relying on a third-party service seems like the worst of both worlds.

                                                                        1. 4

                                                                          running your own mail server but also relying on a third-party service seems like the worst of both worlds.

                                                                          I don’t see why. Fastmail’s servers have been 100% reliable and trouble-free and if I had any issues, it would be almost trivial to switch to another third-party server or even send my email through my own server, since I already have everything set up correctly (except for the new part of the config). It’d just be a couple of simple changes.

                                                                          Maybe you’re wondering what are the advantages of running your own server. For me, there are a few:

                                                                          • It’s trivial to backup my emails (whereas with GMail, good luck backing up millions of emails – yes, I’m subscribed to a few very high-traffic mailing lists. In the end, it’s doable, but it was a never-ending source of problems and unreliability).
                                                                          • Everything is very fast (whereas with GMail, the interface was horribly slow).
                                                                          • My spam detector actually learns when I classify things as ham or spam (whereas with GMail it never did, it always classified the same emails as ham even though I marked them as spam dozens of times, and vice-versa – absolutely infuriating if you can’t unsubscribe and don’t want to create dozens of manual filters).
                                                                          • No lock-in, so I don’t have to worry about Google locking my account and losing access to decades-worth of personal emails with no recourse (I’ve heard many horror stories).

                                                                          The major downside for me (apart from the initial setup) is maintenance: basically, just ensuring my server is up-to-date, which usually only requires a few minutes per week (and I was already doing that anyway). I do major OS updates twice per year and only once did it require fixing my config due to config syntax changes in opensmtpd (which was easy enough to fix).

                                                                      2. 2

                                                                        I find it simpler to keep home my MTA running smoothly than e.g. the web site I’m working on today during working hours.

                                                                        1. 1

                                                                          I’ve run my own email server for over twenty years now. It was about two years ago I had to change IP addresses (hosting provider made some internal changes, I received a new IP in a new /24 block), which was upsetting at the time, since it had been … a decade or more since my last mail server IP change.

                                                                          But it was fine—I don’t recall there being any issues with the new IP address. Now, that could be due to my domain having a good reputation or the IPs not having a bad reputation, I don’t know.

                                                                          Edited to add: I use Postfix, and have for almost 20 years now. Again, no problems with it.

                                                                        2. 2

                                                                          I do the basics (TLS, SPF, DKIM) but it was fine even before I was doing all that.

                                                                          Mine wasn’t. TLS + SPF wasn’t enough, I routinely ended up in people’s spam folder, sometimes when replying to them. To be fair I only noticed this on GMail, but their market share is difficult to ignore. And from time to time Hotmail blacklisted my entire IP block.

                                                                          My outgoing mail is immaculate though. Low volume personal stuff, no newsletters or anything else that recipients would consider unsolicited.

                                                                          So was mine, and I got my IPv4 15 years ago.


                                                                          Now if you can convince all your contacts to get off the giant oligopoly that spies on them, yeah, you’ll probably be fine.

                                                                          1. 6

                                                                            I’ve been self hosting since before gmail launched and not had problems with them. I occasionally had to use my personal account to email gmail users in my last job because gmail decided mail sent from my official @microsoft.com (which, obviously, runs on M365) was spam, but never had to do the converse.

                                                                            I think gmail is just nondeterministic and will sometimes decide things are spam. I suspect it does this deliberately to see if people move things out of the spam folder to give a strong not-spam score. It didn’t seem worse self hosting than using a big provider, but if you self host you feel like you should be able to do so,etching about it.

                                                                            1. 4

                                                                              To be honest my biggest obstacle to running my own mail server is the sheer hassle of configuring it. The first time I did so took me almost a week. The second time took me a good day. The third time I just moved over to my provider’s turnkey email solution. I had TLS (self signed, I started before Let’s Encrypt) and SPF, but no DKIM, no DMARC, and no reverse DNS, and I really didn’t look forward to implementing them all.

                                                                              I have a simple use case:

                                                                              • All email sent to my domain name should go to my inbox…
                                                                              • …except perhaps spam, but I’m okay running the spam filter later on my mail user agent.
                                                                              • I can retrieve my emails with IMAP (or maybe that newer fancier alternative).
                                                                              • No open relay. Only the mail I send is routed, I authenticate myself with whatever standard credential.

                                                                              Now I want a setup that does this with one install command and about this much configuration:

                                                                              domain_name = loup-vaillant.fr
                                                                              user = loup
                                                                              password = P4ssw0rd$
                                                                              SPF = <stuff>
                                                                              DKIM = <stuff>
                                                                              DMARC = <stuff>
                                                                              TLS_certificate = /etc/my_certificate
                                                                              

                                                                              I can survive if it takes 3 times as much work, but beyond that I’ll consider writing myself an alternative. Though I’ll probably start with the web server, configuring nginx is just as painful as configuring Apache, and I have yet to convince it to turn on content negotiation (for multilingual support).

                                                                              1. 2

                                                                                I have a similar theory that they sometimes send people down alternative routes on google maps, just to see what the traffic is like and how long the route actually takes.

                                                                                1. 1

                                                                                  Gmail has bugs sometimes. They deploy new code very often.

                                                                                  I know that one affected mail from one of my then-customers, and I know it was a bug, and it was fixed a little later. Later on the same day, or the next day, I don’t remember.

                                                                              2. 1

                                                                                In my experience, you can do everything right: low volume and follow all the latest SMTP communication standards and your email will still be marked as spam. The only thing that consistently worked for me was changing which outgoing IP I used. In that case I have to conclude it’s a matter of winning the IP lottery in the end.

                                                                                Since you have had consistent long term success, can you share what hosting platform or AS you are using for your outgoing SMTP server? That would help me reach your level of deliverability success.

                                                                                1. 4

                                                                                  This is simply not true and I wish this myth would die.

                                                                                  There are a handful of things you need to take care of and none of those things are insanely hard.

                                                                                  1. 3

                                                                                    If you route your email through a blessed smarthost your mail won’t be marked as spam. If you’re exceptional at configuring your SMTP server you can make it so that the smarthost is only used when communicating with the most hostile email hosts (Google, Microsoft).

                                                                                    1. 3

                                                                                      Ooh, that’s an interesting prospect, actually. Rent an email relay from google to use for emailing google users, one from microsoft to use for emailing microsoft users, etc. Now you’re not giving anybody any email data you wouldn’t have anyway. Drawback is, um, expensive. And you do reveal your name/payment information.

                                                                                      1. 2

                                                                                        There are smarthosts that have a fairly generous free tier, and can deliver fine to google/microsoft. For personal, low-volume email, that’s a perfect fit, imo.

                                                                                        1. 1

                                                                                          The point is that that reveals information to the relay host. If I use google to relay messages to google, that doesn’t reveal anything to them—they already know I’m sending messages to them.

                                                                                          1. 2

                                                                                            I was reflecting on the expensive part. For my case, the info leak is an acceptable compromise for not having to give money to google or microsoft.

                                                                                        2. 1

                                                                                          Exactly. You could have probably figured this out on your own but for the sake of discussion: to make it cheaper, you can open a free gmail and Hotmail account and rewrite the from header and mail from envelope to those respective addresses when you route through the freely provided smarthosts for the respective platforms. This is a decent compromise when you’re the only identity using the mail server.

                                                                                          You can “configure” this stuff fairly painlessly using a filter script with postfix and the sender_dependent_relayhost_maps option so it’s all automatic.

                                                                                        3. 2

                                                                                          If you route your email through a blessed smarthost your mail won’t be marked as spam.

                                                                                          So, if you give in to the racket you won’t be excluded…

                                                                                          There’s a problems with such deals though: their terms tend to change, and all we can do is pray they do not change further.

                                                                                        4. 3

                                                                                          I’m defo not an exper in mailservers yet I managed to run one for like a decade. I can’t speak of absolute truths, just my experience. At some point I even misconfigured mine to be an open relay. I did got flagged but I also didn’t have much trouble to get off spam lists once I fixed the issue. It took a bit of time but that’s about it.

                                                                                        5. 1

                                                                                          I love the Automate the Boring Stuff book and noticed that he had some “challenges” on his website.

                                                                                          If you need a brain teaser or feel like you need some python exercise, this is a great place to get a few to work through.

                                                                                          Follow up: do people know any other “lists of challenges” like this? I guess LeetCode type of sites would be it, but this feels more like “Advent of Code” than something as heavyweight as a site like LeetCode.

                                                                                            1. 2

                                                                                              Love your aggregation homepage :D

                                                                                              I regret taking mine down a few years ago :/

                                                                                              1. 1

                                                                                                Any chance we can see that code? I’d love to emulate it for my own usage.

                                                                                                1. 2

                                                                                                  git clone ssh://emvee.rocks:23231/feeds.git

                                                                                                  1. 2

                                                                                                    Fyi, I ran with this and got it working with GitHub Actions and published to my repository: https://github.com/jjasghar/rss_feed

                                                                                                    https://jjasghar.github.io/rss_feed/ – I’m hoping to turn it into a “newspaper” style rss feed that updates at midnight and gives me the “headlines”

                                                                                                    My “reeder” is overwhelming now, and I’m just looking for the last 24 hours news on this page.

                                                                                                    Thank you for this starting point!

                                                                                                2. 3

                                                                                                  I found this link on Reddit, in /r/django about a video overview: https://youtu.be/lPl5Q5gv9G8?feature=shared