• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Any migraneurs here? How are you doing?

      One of the communities on reddit that I greatly benefited from was /r/migraine. It was helpful to have a space to talk about common symptoms, experiences, and the various treatment options out...

      One of the communities on reddit that I greatly benefited from was /r/migraine. It was helpful to have a space to talk about common symptoms, experiences, and the various treatment options out there. Wondering if anyone here also experiences migraines & might be interested in a support-ish type discussion thread? I'll post a bit about my personal experience in a separate comment.

      (Also -- this is my first post here, so please feel free to let me know if I've tagged this incorrectly or made some other newbie mistake. Thanks!!)

      25 votes
    2. The ideal backend language to write web apps in 2023?

      I know quite a controversial and opinionated question, one that might easily get blasted with downvotes on a site like StackOverflow or even Reddit! Nevertheless, one which I believe is still...

      I know quite a controversial and opinionated question, one that might easily get blasted with downvotes on a site like StackOverflow or even Reddit! Nevertheless, one which I believe is still relevant to ask and useful one even in 2023.

      The problem with backend web technologies is that we are overwhelmed with choices. Whilst getting spoilt with choices seems like a useful thing sometimes, it might easily be an impediment in decision making too. Based on my experience, there are a bunch of useful stacks and I will work on any of them if you pay me to work as a freelance coder. Each has its own pros and cons but I'm yet to find the ideal one which according to me is something that should be easy to code and deploy while also better performing at the same time.

      • ASP.NET: C# is the language I started coding web apps with in my last company and ASP.NET web forms was quite the rage back then. PHP was also gaining traction in the open source world and the webdev was mostly divided between the Enterprisey .NET aristocrats of Microsoft world and the poor PHP peasants of the FOSS world! One good thing about ASP.NET was performance. Since MS controlled the whole stack, they also put great efforts at making it work faster. The bad thing, of course, was dependence on a closed tech stack and a closed black box that generated JS functionality on its own.
      • PHP: When I resigned from that company and started freelancing, I came to know about open source, linux, XAMPP, etc. That was when I realized that my own attitudes and thinking was more attuned to the FOSS peasant mindset than the wealthy aristocrat's! I didn't earn quite as much in freelancing with WP, Drupal, SuiteCRM, CodeIgniter, etc. but I found great happiness and contentment in being part of the open source process. Till date, PHP remains my favorite language for backend development and most of my web projects involve CodeIgniter or even pure PHP.
      • Python: Flask is what got me interested in Python web development. The sheer minimalism and flexibility of that framework is what I found quite remarkable and quite a rarity in the frameworks world. And jinja2 template system was just fantastic. The other framework called django is more popular I think and I've worked on that too but Flask still remains my favorite. Flask is good in performance dept. too but I think it gets tricky once you start scaling with too many users.
      • Java: I've never really bothered with Java web development except a few tutorial experiments on the Apache TomEE server. The multi-layered approach that Java takes not only has very steep learning curve but unless you're a very gifted programmer, it's practically impossible to beat the performance of interpreted PHP/Flask!
      • NodeJS: Again, not much work here except brief hobby projects like http-live-simulator. The npm packaging system really turned me off initially with so many packages and issues with that system in the earlier days. Nowadays, I've heard that it's much usable but I've never gotten into it.

      And now, we also have the evolving languages like Golang, Rust, etc. taking their baby steps towards web development too! Are any of them worth giving a try? If someone were to ask you for a backend tech stack recommendation while giving equal weightage to performance, developer productivity and ease of deployment, which one will you suggest?

      23 votes
    3. Google Authenticator now supports Google Account synchronization

      After 11 years of life, Google Authenticator has added cloud backups for OTP keys in version 6.0. Google Security Blog: Google Authenticator now supports Google Account synchronization This is...

      After 11 years of life, Google Authenticator has added cloud backups for OTP keys in version 6.0.

      Google Security Blog: Google Authenticator now supports Google Account synchronization

      This is surprising news to me, because historically Authenticator had no way to backup keys by design. Here's a 2017 quote from a Google engineer who maintains Authenticator:

      There is by design NO account backups in any of the apps. [source]

      This design choice always made sense to me, as the point of 2FA is that you've got (1) something you know, and (2) something you have. The second factor should be tied to a physical device. If you lose the physical device, the second factor should be gone, and you'll need to use one of those 10-ish backup codes that we all definitely keep somewhere safe. I'm quite befuddled that Google is reversing this design choice and walking back their previously strong, security-centric design for the sake of user convenience in the case of a lost phone. I used to advise my friends and family to choose Google Authenticator over Authy for this specific reason.

      If you want further reading, here's a PCWorld article with an altogether different tone than Google's announcement: Google Authenticator’s long-awaited cloud 2FA feature carries hidden risk

      11 votes
    4. Watercooling PCs & modding computer cases?

      I tried looking around a bit but couldn't find anyone that was interested in this. For me it had been on my radar for years through various forums, but I only built my first watercooled PC in...

      I tried looking around a bit but couldn't find anyone that was interested in this. For me it had been on my radar for years through various forums, but I only built my first watercooled PC in 2020. For that I designed and manufactured my own case and now I am working on a second one! It's become a fun hobby that's taught me CAD and more about manufacturing in general.

      So I was curious if anyone else is into the same thing here? It's probably a bit more niche than the mechanical keyboard thread I saw!

      3 votes
    5. I have really come to hate the word "zesty"

      It's a small thing I guess, but more and more often I see the word "zesty" being used not in a playful way or descriptive way, but as a form insult to straight guys when someone doesn't like them....

      It's a small thing I guess, but more and more often I see the word "zesty" being used not in a playful way or descriptive way, but as a form insult to straight guys when someone doesn't like them. Like people want to put them down literally by insinuating that they're gay, as if being gay is just the worst thing, and worse, with a sort of wink and a nudge as if no one is picking up on what they mean by it. As a gay guy, it's tiresome and old already. It just pisses me off.

      9 votes
    6. What upcoming games or updates are you excited about?

      What recent announcements caught your interest? Video games or board games, indie or AAA, new release or expansion, fangames or mods, all are welcome! Please also include a link to the trailer or...

      What recent announcements caught your interest? Video games or board games, indie or AAA, new release or expansion, fangames or mods, all are welcome!

      Please also include a link to the trailer or blog post, press release, steam page, etc. so others can check them out as well.

      51 votes
    7. Housing market rate hikes. Media doom and gloom or real hard times ahead?

      Rate hikes. "COVID mortgages" up for renewal at much higher rates. Wondering how badly the current rate environment is affecting people IRL. How much of this do you think (or know) is actual bad...

      Rate hikes. "COVID mortgages" up for renewal at much higher rates.

      Wondering how badly the current rate environment is affecting people IRL. How much of this do you think (or know) is actual bad news vs. just media doom and gloom?

      21 votes
    8. Weight loss - how are you approaching it? How’s your progress?

      I’m interested to see how many others in the tilde community are trying to actively lose weight, what methods you’re using, any big milestones you reached recently and/or your goals! I’ll kick...

      I’m interested to see how many others in the tilde community are trying to actively lose weight, what methods you’re using, any big milestones you reached recently and/or your goals!

      I’ll kick off: I lost 25kg in 2022, have been on a long maintenance break while I restarted running and getting into my exercise groove, and am now starting up again to lose another 15-20kg. Last year I was just calorie counting but became a little obsessive so this time around I’m trying intermittent fasting - I’m short and I don’t have many calories to play with so skipping a meal feels like the most doable!

      I’m a recent joiner after discovering tildes on Reddit (frankly have found that place terrible for my mental health lately, so this API thing bringing about discussions of alternatives has been a godsend!) but one thing I did like on there is the motivation I’d find in knowing I wasn’t the only one on this journey. Perhaps others feel similar! (And if not, if I’ve committed some heinous social faux pas by posting, I can only apologise - this feels like such a nicely curated place that I’m nervous of spoiling it like some great oaf burping during dinner with the queen)

      31 votes
    9. Tildes as a Progressive Web App (PWA)?

      I use Firefox for Android. One thing I love about some web apps are when they designed to be a "installable" Progressive Web App (PWA). It looks like Tildes doesn't support that. Perhaps it's a...

      I use Firefox for Android. One thing I love about some web apps are when they designed to be a "installable" Progressive Web App (PWA). It looks like Tildes doesn't support that. Perhaps it's a silly question, but does anyone by chance know if this can be forced to some degree? (Beyond adding a shortcut to one's desktop.)

      Without an app available yet, that's my next go to normally. (Yep, I said yet. I'm eager to see your first release, @talklittle. 💜)

      And ye

      28 votes
    10. Due to Activity sort constantly bumping older topics to the top, the "Knights of New" are especially important here on Tildes

      So if you want to encourage people to post more content, please take time to occasionally check the New sort. If you leave a comment on new topics you are interested in and want to see more...

      So if you want to encourage people to post more content, please take time to occasionally check the New sort. If you leave a comment on new topics you are interested in and want to see more discussion on, it will help them thrive. No pressure, and please don't just leave a comment for the sake of commenting, but just a gentle reminder to try your best to look out for the newly submitted content, and the people who submit it.

      Happy Tildying everyone. :)

      72 votes
    11. Making infinite scrollable lists for web without a constantly expanding DOM

      A common theme in web development, and the crux of the so-called "Web 2.0" is scrolling through dynamic lists of content. Tildes is such an example: you can scroll through about 50 topics on the...

      A common theme in web development, and the crux of the so-called "Web 2.0" is scrolling through dynamic lists of content. Tildes is such an example: you can scroll through about 50 topics on the front page before you reach a "next" button if you want to keep looking.

      There's a certain beauty in the simplicity of the next/previous page. When done right it's fast, it's easy, and fits neatly into a server-side rendered model. However, it does cause that small bit of friction where you need to hit the next button to go forward -- taking you out of the "flow", so-to-speak. It's slick, but it could be slicker. Perhaps more importantly, it's an interesting problem to solve.

      A step up from the next/previous button is to load the next page of content when you reach the end of the list, inserting it below. If the load is pretty fast, this will hardly interrupt your flow at all! The ever-so-popular reddit enhancement suite does precisely that for reddit: instead of a next button, when you reach the bottom, the next page of items simply plops into place. If the loading isn't fast enough, perhaps instead of loading when they reach the last item, you might choose to load when they hit the fifth from last item, etc.

      To try to keep this post more concrete, and more helpful, here's how this type of pagination would work in practice, in typescript and using the Intersection Observer API but otherwise framework agnostic:

      /**
       * Allows the user to scroll forever through the given list by calling the given loadMore()
       * function whenever the bottom element (by default) becomes visible. This assumes that
       * loadMore is the only thing that modifies the list, and that the list is done being modified
       * once the promise returned from loadMore resolves
       *
       * @param list The element which contains the individual items
       * @param loadMore A function which can be called to insert more items into the list. Can return
       *   a rejected promise to indicate that there are no more items to load
       * @param triggerLoadAt The index of the child in the list which triggers the load. Negative numbers
       *   are interpreted as offsets from the end of the list. 
       */
      function handlePagination(list: Element, loadMore: () => Promise<void>, triggerLoadAt: number = -1) {
          manageIntersection();
          return;
      
          function handleIntersection(ele: Element, handler: () => void): () => void {
              let active = true;
              const observer = new IntersectionObserver((entries) => {
                  if (active && entries[0].isIntersecting) {
                      handler()
                  }
              }, { root: null, threshold: 0.5 });
              observer.observe(ele);
              return () => {
                  if (active) {
                      active = false;
                      observer.disconnect();
                  }
              }
          }
      
          function manageIntersection() {
              const index = triggerLoadAt < 0 ? list.children.length + triggerLoadAt : triggerLoadAt;
              if (index < 0 || index >= list.children.length) {
                  throw new Error(`index=${index} is not valid for a list of ${list.children.length} items`);
              }
      
              const child = list.children[index];
              const removeIntersectionHandler = handleIntersection(child, () => {
                  removeIntersectionHandler();
                  loadMore().then(() => {
                      manageIntersection();
                  }).catch((e) => {});
              });
          }
      }
      

      If you're sane, this probably suffices for you. However, there is still one problem: as you scroll,
      the number of elements on the DOM get longer and longer. This means they necessarily take up
      some amount of memory, and browsers probably have to do some amount of work to keep
      track of them. Thus, in theory, if you were to scroll long enough, the page would get slower and
      slower! How long "long enough" is would depend mostly on how complicated each item is: if each one
      is a unique 20k element svg, it'll get slow pretty quickly.

      The trick to avoid this, and to get a constant overhead, is that when adding new items below, remove the same number of items above! Of course, if the user scrolls back up they'll be expecting those items to be there, but no worries, the handlePagination from before works just as well for loading items before the first item.

      However, this simple change is where a key problem arises: inserting elements below doesn't cause any layout shift, but inserting an item above ought to--right?

      The answer is: it depends on the browser! Back in 2017 chrome realized that it's often convenient to be able to insert items into the dom above the viewport, and implemented scroll anchoring, which basically ensures that if you insert an item 50px tall above the viewport, then scroll 50px down so that there's no visual layout shift. Firefox followed suite in 2019, and edge got support in 2020. But alas, safari both on mac and ios does not support scroll anchoring (though they expressed interest in it since 2017)

      Now, there's two responses to this:

      • Surely Safari support is coming soon, they've posted on that bug as recently as April! Just use simpler pagination for now
      • Pshhhh, just implement scroll anchoring ourself!

      Of course, I've gone and done #2, and it almost perfectly works. Here's the idea:

      • Right before loadMore, find the first item in the list which is inside the viewport. This is the item whose position we don't want to move. Use getBoundingClientRect to find it's top position.
      • Perform the DOM manipulation as desired
      • Use getBoundingClientRect again to find the new top of that item.
      • Insert (or remove) the appropriate amount of blank space at the top of the list to offset the change in client rect (note that if there's scroll anchoring support in the browser this should always be zero, which means this effectively works as progressive enhancement)

      Now, the function to do this is a tad too long for this post. I implemented it in React, however, and combined it with some stronger preloading object (we don't need all the items we've fetched from the API on the DOM, so we can use before, onTheDom, after lists to avoid getting a bunch of api requests just from scrolling down and up within the same small number of items).

      What's interesting is that it still works perfectly on chrome even with scroll-anchoring disabled (via overflow-anchor: none), but on Safari there is still, sometimes, 1 frame where it renders the wrong scroll position before immediately adjusting. Because I implemented it in react, however, my current hypothesis is I have a mistake somewhere which causes the javascript to yield to the renderer before all the manipulations are done, and it only shows up on Safari because of the generally higher framerates there

      If it's interesting to people, I could extract the infinite list component outside of this project: I certainly like it, and in my case I do expect people to want to quickly scroll through hundreds to thousands of items, so the lighter DOM feels worth it (though perhaps it wouldn't if I had known, when starting, how painful getting it to work on Safari would be!).

      What do you think of this type of "true" infinite scrolling for web? Good thing, neutral thing, bad thing? Would you use it, if the component were available? Would you remove it, if you saw someone doing this? Are there other questions about how this was accomplished? Is this an appropriate post for Tildes?

      11 votes
    12. Haunting covers, or something like that

      Hey folks, A few years ago I went in to the basement room where the cool kids hung out while they did video conversions and such. They had a playlist in the background of "Haunting Covers" or...

      Hey folks,

      A few years ago I went in to the basement room where the cool kids hung out while they did video conversions and such. They had a playlist in the background of "Haunting Covers" or something like that. It was a take on all different music, but played in a really chilled, gothic style and by a mix of un/lesser-known artists.

      Does anyone have some recommendations? To give you an idea, one of the more known tracks I heard while I was there was Nirvana's Smells Like Teen Spirit but covered by Tori Amos.

      Thanks.

      10 votes
    13. What are you self-hosting currently?

      I recently discovered Paperless-ngx and have immediately fell in love. I must now decide whether to host it on my VPS (risky with personal documents), on a Pi at home or finally invest in a proper...

      I recently discovered Paperless-ngx and have immediately fell in love. I must now decide whether to host it on my VPS (risky with personal documents), on a Pi at home or finally invest in a proper home server (something cheap but with a bit more power than a Pi4). It can totally be run a Pi, but performance may not be as good.

      Does Tildes have a big self-hosted community? What are you self-hosting currently, and what do you enjoy about it?

      52 votes
    14. Meta label for comments?

      Just popped in my head, with the massive influx of users, there's been a lot more meta discussion happening in regular threads. Perhaps it might be useful to have that as a label on comments. I'd...

      Just popped in my head, with the massive influx of users, there's been a lot more meta discussion happening in regular threads.

      Perhaps it might be useful to have that as a label on comments. I'd almost go so far as to have the label highlighted like Exemplary for new users to help highlight when discussion function and culture of the site.

      6 votes
    15. Film and feelings: Stalker (1979)

      I recently acquired the criterion release of Stalker (1979), a film I have not seen since I was a teenager. I remember liking it back then, but I didn't appreciate how much it would simultaneously...

      I recently acquired the criterion release of Stalker (1979), a film I have not seen since I was a teenager. I remember liking it back then, but I didn't appreciate how much it would simultaneously wash over me as well as work it's way into the back of my mind, like an eel of a tone poem.

      For those who have not seen Stalker, it is a journey of three men into a mysterious and beautiful "Zone" in search of their deepest desires.
      I full throatedly recommend. Gorgeous film.

      While the symbolism has been thoroughly discussed elsewhere on the internet, a less talked about aspect (of this and other films) is how it makes the viewer feel.

      For me personally, the three moments that most affected me on a visceral level all involve people lying down.
      Why, I'm not sure.
      But they are: The scene where The Stalker lays in the tall grass, I felt such a calm bliss as he soaked in the lush green nature of The Zone;
      The scene where The Stalker sleeps on a tiny dry piece of ground in a large flooded canal, I felt a sense of sublime misery. The only thing I could compare it to is when you get suddenly awoken when you haven't had enough sleep, and have to go out into the cold early morning still nodding off, and nothing feels real;
      and third is the lingering shot of the dog sitting guard over the entwined bodies near The Room.
      I felt a profound longing sadness. I imagined that the entwined lovers died together in some relation to their deepest desire.

      I really love films that wash over the viewer in this way like a tide, and I hope that some of you do as well.

      Another film that has a similar aspect is Upstream Color (2013), and while the creative mind behind that film is....perhaps a mentally unwell abuser, I can't dismiss the art he has created. I guess my relationship with his work is complicated.

      How do you Feel about stalker?

      Are there any films that had a similar effect on you as this one did to me?

      Always looking for recommendations!

      19 votes