• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Advice Needed: Simple and Reliable notifications

      I have a long standing problem that probably has several good solutions, I just haven't been able to figure them out. So here I am, asking you. I'm selfhosting some services, a mix of selfbuilt...

      I have a long standing problem that probably has several good solutions, I just haven't been able to figure them out. So here I am, asking you.

      I'm selfhosting some services, a mix of selfbuilt and open source software. But some things I don't want to selfhost. Notably backups and alerts/notifications. For backups I have a solution which works well in every regard except one - I don't always get alerted when things fail, because the way I send myself those alerts is failing more than the actual backups.

      Currently I'm using python and gmails smtp interface to send myself email, but gmail disables my smtp access from time to time, and it's really easy not to notice not getting an email. I've tried sending the email regardless of whether the backup failed or not, but I've noticed several times that I still don't notice if the they stop coming.

      Now on to my requirements/wishlist.

      1. I'm already using s3 glacier at aws for the backups, so preferrably something in the aws space.
      2. I would like to get an popup/toast on my phone when a message is being sent. And the ability to review messages later.
      3. I would like as few moving parts as possible.
      4. I don't want to write my own client.
      5. I want it to be cheap, and if there's a cost I prefer to pay it at a place where I'm already paying, meaning aws (or possibly proton).
      6. I want a stable service.
      7. I prefer to manage as little as possible of the infrastructure.
      8. I'd like a simple programmable interface that can't easily fail. E.g. http based.
      9. It's no problem if messages are not received instantly, I could easily tolerate delays up to 24 hours.

      As you may have noticed I'm pretty much expecting there to be something in aws that I can use, but aws documentation is so abstract, that I often don't understand what the point of something is or how I'm supposed to use it.

      3 votes
    2. Best solution to extract PDF data?

      Hi folks-- To those more knowledgeable than I am: What would be the best local solution to extract numerical data from a batch of PDF file reports? The values I want are interspersed among word...

      Hi folks--

      To those more knowledgeable than I am:

      What would be the best local solution to extract numerical data from a batch of PDF file reports? The values I want are interspersed among word processor formatted tables and irrelevant text. The text and table formatting are (nearly) identical across reports. The data I want vary across reports. The PDFs are not of images...I can select and copy text without OCR. I have thousands to process, and the data themselves are confidential (I have clearance) and cannot be shared. I can use Windows or Linux but no MacOS.

      I am technically inclined, so I bashed my head against regular expressions just enough to use notepad++ to find and delete most of the irrelevant stuff and make a CSV, but it's a hacky, imprecise method and not nearly automated enough for batches. For reference, I don't code for a living or even as a hobby, but I use R and bash, am familiar with IDEs, and can follow pseudocode well enough to edit and use scripts.

      Any thoughts? Thanks in advance!

      19 votes
    3. Cmake strategies or alternatives for building (different) code for different platforms

      Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So...

      Okay, so this is getting really long, I'll put the ask up front: I have a strategy, I think it is reasonable. Now is a point where I can easily change things, and it won't be so easily later. So I'm looking to see if anyone has trod this road before and can recommend any of:

      1. a different build system that will be easier to manage for this use case
      2. a different strategy for using cmake that will be easier to manage
      3. any gotchas I should be aware of, even if you don't have better solutions.

      Background

      I have a project I'm working on where the ultimate deliverable will be a hardware device with 3-4 different microcontrollers coordinating with each other and interacting with a PC-ish platform. This is a clean rewrite of a C++ codebase. Due to the microcontroller (and some of the PC APIs) being C++, the language of choice for most of it is likely to remain C/C++.

      I'm succeeded in setting up a build system for embedded code. The old code was arduino, so it relies a lot on those libraries, but I've managed to set up enough custom cmake to get off of the ardunio tools altogether, even if I am borrowing their libraries and some of the "smarts" built into the system about setting build flags, etc. So far, I have a dockerized toolchain (cmake + make + gcc-arm-none-eabi) that can successfully build ARM binaries for the target platform.

      The thing that I'm up against now is that I'd like to have a robust off-target unit testing infrastructure. My ideal case is that everything in the embedded system will be broken down into libraries that have clear interfaces, then to use unit tests with mocks to get high coverage of test cases. I'll still need some HIL tests, but because those are harder to set up and run, I want to use those for integration and validation.

      In terms of OSes available, we're mostly working on Windows systems using WSL for linux. I'd like things to be as linux-based as possible to support CI on github, etc.

      Goals and Cmake limitations

      I started out using cmake because I hate it least of the tools I've used, and I am at least pretty far up the learning curve with it. But a limitation I'm hitting is that you can't do a mixed compile with two different toolchains in one build. The reasons why cmake has this limitation seem reasonable to me, even if it is annoying. You can easily change the toolchain that your code is built with, but that seems to be largely targeted at cross-compiling the same binaries for different systems. What I want to do is:

      • build my code libraries with embedded settings for linking to the embedded binaries and build those embedded binaries (the end product)
      • build my code libraries with linux-ish tools and link them against unit tests to have a nice CI test process
      • (eventually) also be able to build windows binaries for the PC components -- when I get to that point, I'd like to get away from the MSVC compilers, but will use them if I have to

      Current strategy

      My current plan is to configure a library build like this (pseudocode):

      add_library(mylib sources)
      if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED)
      <embedded config>
      elseif (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX)
      <linux config, if any>
      endif()
      
      #unit tests are built for each library
      if (BUILD_TYPE STREQUAL BUILD_TYPE_LINUX)
      add_executable(mylib_test sources test_sources)
      target_link_libraries(mylib gtest etc.)
      endif()
      

      For the rollup binaries, I make the whole target conditional

      if (BUILD_TYPE STREQUAL BUILD_TYPE_EMBEDDED)
      add_executable(myembedap sources)
      target_link_libraries(mylib)
      endif()
      

      Then the build script (outside cmake) is something like

      cd build/embedded
      cmake <path to src> <set embedded toolchain> -DBUILD_TYPE=embedded
      make
      cd ../../build/linux
      cmake <path to src> -DBUILD_TYPE=linux
      make
      

      Things I like about this strategy:

      • It's relatively simple to do all the builds or just one of the builds (that control would go in the shell script)
      • I have one source tree for the whole build
      • It lets configuration be near code
      • It lets tests be near code.
      • I think it's extensible to cover the PC component builds in the future

      Things that worry me:

      • It feels like a hack
      • Support for off-target tests feels like it should be solved problem and I'm worried I'm missing something

      Thanks for reading. If you made it this far, you have my gratitude. Here's a video with funny out of office messages that I enjoyed.

      3 votes
    4. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      14 votes
    5. Are Feeds - like RSS or Atom feeds - Really Worth It For A Personal Blog?

      I stopped blogging several years ago. Over the last few years, I've been writing plenty of private essays. However, very recently I have been considering starting to publish my writing and, well,...

      I stopped blogging several years ago. Over the last few years, I've been writing plenty of private essays. However, very recently I have been considering starting to publish my writing and, well, start blogging again publicly. I have no desire to waste time on templates, look-and-feel, visual stuff, etc. I just want to write a bog-standard html file, and then publish it...I do value leveraging html elements that help with meta data (e.g. microformats, etc.), but don't care about how things look - and these elements that i value are all invisible to most users anyway. I would be fine with just crafting html by hand, deploying it via sftp or some boring deployment pipleine, and that's it. But, then, I started thinking: what about having an RSS/Atom feed? I used to consume content via an rss reader, but have not done so in years. But, I don't want to manually craft that feed file; nope, sorry. But, I've heard a comment or two from acquaintances that rss/atom feeds and syndication are really something that people - like my potential audience - might really desire. So, I should really consider having one. This means that either I have to craft several things manually (from the blog post itself, the list of archived posts, the feed file, etc.), or use a static site generator that will handle all this for me, etc. I don't want to get trapped down a rabbit hole where I am spending so much on the tooling, the scaffolding, twiddling with templates, or the publish process itself. I just want the minimal for writing and publishing, I want it to live on my domain name, and that's it. Am I crazy or extremely lazy for not wanting to generate an RSS/Atom feed file?

      So, here's my ask of you all nice people: are feeds like RSS/Atom feeds even worth it? If so, does anyone have recommendations for a manual process where i can craft the blog post's html by hand, but somehow leverage a portion of a static site generator (or some minimal tool) to only automate the creation of the RSS/Atom feed file? Thanks in advfance for any constructive feedback!

      P.S. - One thing that re-ignited my desire both to write more in public, and keep it alive with minimal fuss was my re-reading of Jeff Huang's excellent "This Page is Designed to Last" post: https://jeffhuang.com/designed_to_last/

      18 votes
    6. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      17 votes
    7. Real-time speech-to-speech translation

      Has anyone used a free, offline, open-source, real-time speech-to-speech translation app on under-powered devices (i.e., older smart phones)? There are a few libraries that written that...

      Has anyone used a free, offline, open-source, real-time speech-to-speech translation app on under-powered devices (i.e., older smart phones)? There are a few libraries that written that purportedly can do or help with local speech-to-speech:

      I'm looking for a simple app that can listen for English, translate into Korean (and other languages), then perform speech synthesis on the translation. Although real-time would be great, a short delay would work.

      RTranslator is awkward (couldn't get it to perform speech-to-speech using a single phone). 3PO sprouts errors like dandelions and requires an online connection.

      Any suggestions?

      6 votes
    8. What was your first programming language, what languages do you know now, and what tips do you have for those trying to learn any of those?

      What was your first programming language, what other languages (if any) do you know now, and what tips do you have for those trying to learn any of those? Whether those tips are for beginners or...

      What was your first programming language, what other languages (if any) do you know now, and what tips do you have for those trying to learn any of those? Whether those tips are for beginners or even advanced, to do with APIs, or if you've got a good library to share.

      53 votes
    9. Formatting Maven Errors

      Maven conveniently puts all errors at the end of a build. However, the error messages are not formatted. The errors messages are presented as once giant line via word wrap. I'm on a windows box,...

      Maven conveniently puts all errors at the end of a build.

      However, the error messages are not formatted. The errors messages are presented as once giant line via word wrap.

      I'm on a windows box, using Git Bash to run maven.

      I could futz around and make a macro in Notepad++ for formatting the error messages into a more readable format.

      Before I go that route I was wondering if maven had any handy settings or if there is some handy utility that will do that for me.

      3 votes
    10. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      11 votes
    11. Ladybird chooses Swift as its successor language to C++

      I've copied the full tweet below (it's from August, I missed this news somehow): We've been evaluating a number of C++ successor languages for @ladybirdbrowser , and the one best suited to our...

      I've copied the full tweet below (it's from August, I missed this news somehow):

      We've been evaluating a number of C++ successor languages for @ladybirdbrowser , and the one best suited to our needs appears to be @SwiftLang 🪶

      Over the last few months, I've asked a bunch of folks to pick some little part of our project and try rewriting it in the different languages we were evaluating. The feedback was very clear: everyone preferred Swift!

      Why do we like Swift?

      First off, Swift has both memory & data race safety (as of v6). It's also a modern language with solid ergonomics.

      Something that matters to us a lot is OO. Web specs & browser internals tend to be highly object-oriented, and life is easier when you can model specs closely in your code. Swift has first-class OO support, in many ways even nicer than C++.

      The Swift team is also investing heavily in C++ interop, which means there's a real path to incremental adoption, not just gigantic rewrites.

      Strong ties to Apple?

      Swift has historically been strongly tied to Apple and their platforms, but in the last year, there's been a push for "swiftlang" to become more independent. (It's now in a separate GitHub org, no longer in "apple", for example).

      Support for non-Apple platforms is also improving, as is the support for other, LSP-based development environments.

      What happens next?

      We aren't able to start using it just yet, as the current release of Swift ships with a version of Clang that's too old to grok our existing C++ codebase. But when Swift 6 comes out of beta this fall, we will begin using it!

      No language is perfect, and there are a lot of things here that we don't know yet. I'm not aware of anyone doing browser engine stuff in Swift before, so we'll probably end up with feedback for the Swift team as well.

      I'm super excited about this! We must steer Ladybird towards memory safety, and the first step is selecting a successor language that we can begin adopting very soon. 🤓🐞


      Nitter link:

      https://nitter.poast.org/awesomekling/status/1822236888188498031

      Original post:

      https://x.com/awesomekling/status/1822236888188498031


      Some of Kling's replies in that thread are also pretty interesting:

      My general thoughts on Rust:
      - Excellent for short-lived programs that transform input A to output B
      - Clunky for long-lived programs that maintain large complex object graphs
      - Really impressive ecosystem
      - Toxic community

      In the end it came down to Swift vs Rust, and Swift is strictly better in OO support and C++ interop.


      The September monthly report for Ladybird released the day after I posted this. It provides basically the same information:

      This Month in Ladybird September 2024

      The section about Swift:

      Successor language search progress

      Over the past year, our core contributors have been exploring potential safe languages to complement or succeed C++. We evaluated several options, including Rust, Swift, Fil-C, and others. While some languages offered compelling features, many fell short in either C++ interoperability or providing the level of memory safety we needed.

      After extensive testing and discussion, Swift emerged as the top choice among our core developers, thanks to the new Swift 6 interoperability features and its growing cross-platform support. As a result, we’ve decided to adopt Swift as our C++ successor language.

      That said, this will be an incremental shift. The existing C++ codebase is deeply embedded in the project, and a complete rewrite would be impractical. Instead, we’ll be gradually introducing new components in Swift, carefully integrating them with our existing C++ code over time. Look forward to a dedicated blog post on the topic soon.

      32 votes
    12. Best way to voice call and screenshare with audio on Linux?

      One thing I really enjoy is being able to share my screen with family and friends to watch movies together or share gameplay. On Windows, you can do this trivially with Discord. On Mac, you can do...

      One thing I really enjoy is being able to share my screen with family and friends to watch movies together or share gameplay. On Windows, you can do this trivially with Discord. On Mac, you can do this on Discord if you install some software they recommend. On Linux, I believe it's impossible with Discord unless you use a third party front end, which I'd rather not do. Zoom has screenshare with sound, but I don't know what the Linux support is like, and it's capped at 40 minutes unless you pay.

      Are there other messaging services that have voice call and audio screenshare support on Linux, no unofficial front end necessary, that's also available on Windows and Mac? It's ok if it requires some setup. Ideally it would be a group chat as opposed to streamed publicly on a site like Twitch.

      11 votes
    13. Relative installed shady browser extension

      [Possibly solved, please look at comments] Hey, so recently a family member accidentally downloaded a shady browser extension called: "Easy Print" on Firefox. 30k downloads, no ratings, weird...

      [Possibly solved, please look at comments]

      Hey,

      so recently a family member accidentally downloaded a shady browser extension called: "Easy Print" on Firefox. 30k downloads, no ratings, weird "offical" website and installed accidentally trying to buy tickets. I assume it showed something along the lines of: "Buy ticket now" and they just clicked on it (being overall inexperieced with security). Only extension installed was uBlock until then.

      I won't post a link just in case, but you can easily find it by googling: "Easy Print Firefox" or "Easy Print App" for their website.

      What makes this weirder is that they change the default search engine to Yahoo, which for me was always a red flag for a hijacked browser.

      I uninstalled it, but am concerned that they installed something like a keylogger along with it.

      Can anyone help me what this is and, especially, how I can properly teach them the basics of internet safety? Not the first time their PC/browser was filled with unwanted stuff...

      Thank you and best regards!

      15 votes
    14. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      14 votes
    15. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      14 votes
    16. What programming/technical projects have you been working on?

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's...

      This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

      12 votes
    17. Books or other good content on software design?

      Wondering if anyone has any good books or other content to recommend on software design. I feel like when I start out on a new project I always get stuck in a rut of trying to design something...

      Wondering if anyone has any good books or other content to recommend on software design. I feel like when I start out on a new project I always get stuck in a rut of trying to design something good, then end up with an awful design anyways. On the other hand, I've been around professors and more experienced software engineers who seem to effortlessly come up with simple, powerful architectures and interfaces.

      While I know that reading a book or two won't get me the experience I need to improve, it does seem like that might be a good jump-start. Anyone have any suggestions for me? Thanks!

      9 votes