• Activity
  • Votes
  • Comments
  • New
  • All activity
    1. Experienced programmers who picked up Rust, which learning resources did you find to be excellent?

      I am currently going through the official Rust book and have gone through some of the Rustlings exercises. Both resources have been excellent so far. What resources have you enjoyed? Additionally,...

      I am currently going through the official Rust book and have gone through some of the Rustlings exercises. Both resources have been excellent so far.

      What resources have you enjoyed?

      Additionally, is there anything about Rust that particularly caught you out when transitioning from other languages?

      20 votes
    2. How will Mullvad removing port forwarding affect Unraid?

      How does Mullvad removing port forwarding affect an Unraid setup using deluge-vpn container? I don’t access my server from outside my network and just use a basic binhex deluge-vpn docker setup....

      How does Mullvad removing port forwarding affect an Unraid setup using deluge-vpn container?

      I don’t access my server from outside my network and just use a basic binhex deluge-vpn docker setup. Any issues I’ll have here?

      Currently out of town and won’t be back until after this change happens tomorrow. Curious what to expect when I'm back home.

      4 votes
    3. Android Mozilla browsers with access to about:config

      Hi Android Mozilla browsers with access to about:config. Examples are... Firefox Beta and Firefox Nightly Back in the day there were lots of config tweaks for PC Firefox. But there's not much...

      Hi
      Android Mozilla browsers with access to about:config.
      Examples are...
      Firefox Beta
      and
      Firefox Nightly

      Back in the day there were lots of config tweaks for PC Firefox.
      But there's not much config information about Android Firefox.

      I found these two posts on Reddit.
      https://www.reddit.com/r/firefox/comments/11shvus/fixing_performance_problems_in_firefox_on_android/

      https://www.reddit.com/r/browsers/comments/1278zp5/improving_performance_in_firefox_android_part_ii/

      Does anybody here have other about:config suggestions?

      11 votes
    4. Newbie here looking for advice on how to get into Programming/CS by building a project

      Been lurking for a week on tildes now and I am really glad this place exists. The crow here is exactly what I have been missing on Reddit for a while now. Having said that, the whole Reddit...

      Been lurking for a week on tildes now and I am really glad this place exists. The crow here is exactly what I have been missing on Reddit for a while now.

      Having said that, the whole Reddit situation has some-what motivated me to get the balls rolling on an idea that I have had for a while and I am looking for advice on the same.

      I have often heard this phrase "Learn programming by building" but whenever I dive in to the resources, I fall flat due to the information overload and the general abstractness that the field has (I appreciate abstractness but here it demotivates me) and I have never found a proper resource that I could follow to actually build something instead of just blindly following tutorials and playing with them.

      So, my question is how do I translate "learn by building a project" into a practical framework.

      I know of 100 days of swift and I really like that approach however I don't think I want to start with swift or build an iOS app right now.

      24 votes
    5. Creating an Android app - Help refer a book or guide?

      For most of my life, I've been a hobbyist programmer. From Qbasic to Python and JavaScript. I've always wanted to create an Android app, really just for me, just to do it. It's a bucket list...

      For most of my life, I've been a hobbyist programmer. From Qbasic to Python and JavaScript. I've always wanted to create an Android app, really just for me, just to do it. It's a bucket list thing.

      Can you give me a book or a website guide that is up to date and complete but not 100,000 pages long that could help me get it done? A book would be preferred! I just want to cross this off my list!

      13 votes
    6. What is the most advanced or creative program you can create using the LOX programming language?

      Lox is a toy programming language that is designed in Java and C at craftinginterpreters.com. My challenge to you is: given the constraints of the Lox language, what are some creative or advanced...

      Lox is a toy programming language that is designed in Java and C at craftinginterpreters.com.

      My challenge to you is: given the constraints of the Lox language, what are some creative or advanced programs you can create?

      This page provides a rundown of the design of Lox.

      To kick it off, here's a simple function that estimates the value of pi:

      fun estimatePi(rounds) {
      	var pi = 0;
      	var alt = 1;
      	for (var i = 0; i < rounds; i = i + 1) {
      		pi = pi + alt * 4/(2 * i + 1);
      		alt = -alt;
      	}
      	return pi;
      }
      
      print "The value of pi is:";
      print getPi(100000);
      
      3 votes
    7. Local DNS resolution for server?

      I have to preface this question with a disclaimer that I am an eager learner of Linux and servers in general, but I'm still a beginner and often run into roadblocks. Current setup: Raspberry Pi 3...

      I have to preface this question with a disclaimer that I am an eager learner of Linux and servers in general, but I'm still a beginner and often run into roadblocks.

      Current setup:


      • Raspberry Pi 3 with Adguard Home acting as primary DNS
      • unRAID server with Adguard Home acting as secondary DNS
      • About a dozen other containers running on same server
      • DHCP is handled by my router

      Goal:


      • provide local DNS names for the containers running in unRAID so I don't have to enter IP:Port (e.g, calibre.local) which also has the side benefit saving the various username/password combos into Bitwarden with an actual domain attached to it instead of 14 occurrences of 192.168.x.x

      Additional info:


      I had PiHole running on the Pi before as the primary and only DNS previously. And I seem to recall you could put IP:Port as a custom DNS and have it resolve. AGH does have a feature for DNS Rewrites but it does not allow for port numbers, IPs only. I switched to AGH because it seems to be more effective at blocking ads, which is likely more a function of the provided DNS blocklists out of the box as opposed to what I was doing in Pihole. I would prefer to stick with AGH for adblocking/DNS if possible.

      I looked into just modifying host files on the main computers I touch these apps from, but again, can't include port. What is a good solution for this? Preferably something approachable for a newb like me.

      11 votes
    8. What are your favorite Postgres features?

      You could use any SQL database to create a few tables, insert some data, and do queries, while ignoring anything vendor-specific. But Postgres has a lot of other features and many extensions. What...

      You could use any SQL database to create a few tables, insert some data, and do queries, while ignoring anything vendor-specific. But Postgres has a lot of other features and many extensions. What do you recommend checking out beyond the basics?

      I've used a lot of databases, but it's been many years, so I assume things have changed quite a bit. I skimmed a few PostgreSQL release notes and learned that there's now a MERGE statement that looks pretty handy. (It's standard SQL.) And from Neon's list of supported extensions, the plv8 extension caught my eye. It would let me write stored procedures in JavaScript. Does anyone use that? Do you use stored procedures at all?

      I wonder what Tildes uses?

      (To keep discussion organized, please write about one feature per top-level comment.)

      17 votes
    9. Best word processor for Ubuntu?

      Hey folks, looking for recommendations. What's your go to word processor on Ubuntu? (EDIT: For regular writing, not a text editor for coding.) I haven't been the biggest fan of Libre office tbh...

      Hey folks, looking for recommendations. What's your go to word processor on Ubuntu? (EDIT: For regular writing, not a text editor for coding.) I haven't been the biggest fan of Libre office tbh (please don't hate me...) There were just several bugs in Writer that made it unusable for me. I'm curious about alternatives. I read that WPS office is on ubuntu, but I've always found it to run kind of slow (however, my experience was on Windows.).

      I don't need a lot of fancy utilities, but would enjoy something a little more beautiful than notepad++ :) My biggest concern is just that it's a stable software. I'm OK with glitches or UI bugs, just nothing that's going to crash and burn and corrupt my work. (I mention this because there are several newer word processors made by single developers, and I'm a little weary to use them because I don't genuinely know how stable the software is.) I'm also not a fan of software that saves in some special format where you rely on that software to open it (or have to go through hoops to convert it.)

      Any recommends?

      EDIT: I'm new to Ubuntu, in case it makes a difference.

      31 votes
    10. Best, favorite, and/or interestingly-different resources to learn (or re-learn) Git?

      Pretty much, the title. I have been coding professionally for over 2 decades, been using Git for almost as long ... and to this day, it still feels alien and uncomfortable to use. I keep feeling...

      Pretty much, the title.

      I have been coding professionally for over 2 decades, been using Git for almost as long ... and to this day, it still feels alien and uncomfortable to use. I keep feeling like I am relearning it all over again. I would really like to find some kind of different resource that helps me to make Git "stick" in my brain, and become more intuitive. Maybe that's just not possible, but I keep hoping.

      Meanwhile, my roommate is just starting her journey into programming, and her class just started teaching Git ... and I'm eavesdropping a bit, and they're teaching it okay, but I'm sure there are better tutorials out there for a newcomer.

      I am aware of -- and currently reading my way through -- both this recent tildes post and the various tutorials mentioned in it. But I am looking for other recommendations, as well ... and I bet I'm not the only one.

      Thanx in advance.

      19 votes
    11. Organizing self-hosted classical music collection

      I'm currently using Navidrome to self-host my music collection, while using DSub to listen on-the-go. This works very well for most genres, except for the bulk of my music which is classical...

      I'm currently using Navidrome to self-host my music collection, while using DSub to listen on-the-go.

      This works very well for most genres, except for the bulk of my music which is classical music. This presents its own host of problems pertaining to cataloguing and using metadata, since there are often multiple recordings of the same musical composition, recorded by multiple conductors with different orchestras and/or soloists. There may also be different instrumental arrangements of the same musical piece. Merely sorting by "Artist" is therefore quite unsatisfactory in this scenario.

      Some streaming services have come up with quite satisfying solutions in my experience (notably Apple Music Classical and Idagio), but I am not sure how to go about listening to my own self-hosted classical music.

      Is anybody here on Tildes familiar with this organizational problem? I would be very eager to hear how you have tackled this. Is there any self-hosted software more suitable to cataloguing musical collections with extensive metadata?

      13 votes
    12. Do C programmers usually create and curate a personal library for their own use?

      I've been using mostly C at my current job for about half a year now, and I find myself reusing some little function that I've written for another code base in current projects. I'm relatively new...

      I've been using mostly C at my current job for about half a year now, and I find myself reusing some little function that I've written for another code base in current projects. I'm relatively new to this, so I'm wondering if it makes sense to have a repertoire of general purpose utility functions and whatnot for future use.

      I mean, the language's pretty established and whatever I think of must have been written by somebody else already, so is there even a need for what I'm talking about? Are there well-known open source libraries that resemble what I am talking about? Should I just include them instead of writing my own?

      Sorry if this is a bit vague. General purpose as in string manipulation, debug output, buffer operations, implementations of data types not in C, etc., just to name a few examples.

      32 votes
    13. How to clean up the space taken by old Snap and flatpak files

      When Snap and\or flatpak install or update packages they do not always do so cleanly Snap for example can keep up to 3 previous versions on updating and if you are struggling for space then this...

      When Snap and\or flatpak install or update packages they do not always do so cleanly

      Snap for example can keep up to 3 previous versions on updating and if you are struggling for space then this can be a Bad Thingtm

      These couple of pages show a good reliable way to tidy up and get back some disk space
      Snap

      Flatpak

      Please note, I am not the author. The articles are on a website called debugpoint.com and does not carry a credit

      4 votes
    14. Fixing overscan on an uncooperative TV-monitor

      This is mainly so I can find this again and not have to rediscover this for the third time after I forget. I can't find this exact solution anywhere else so I figured I should put it somewhere. I...

      This is mainly so I can find this again and not have to rediscover this for the third time after I forget. I can't find this exact solution anywhere else so I figured I should put it somewhere.

      I have a terrible Insignia tv that locks the overscan option so you can't even turn it off, and linux mint for whatever reason doesn't recognize it as a TV so I can't use their automatic TV adjustments. This is just for x11 afaik.

      So in the end, I used the underscan to defeat the overscan and it works great:

      xrandr to get the output name the TV is using, then

      xrandr --output <name-of-tv-output> --set underscan on --set "underscan hborder" <0-128> --set "underscan vborder" <0-128>

      to enable underscan and tweak the border values which squash the edges of the screen, undoing the effects of the overscan.

      for me the optimal values are 128h 40v but you can just experiment by typing the command into the console before you make it permanent.

      8 votes
    15. What's a simple, cheap way to run a database-backed website as a hobbyist?

      I use Github and Netlify to run some simple websites for free. It works well. However, I've been thinking of experimenting with a database-backed website for fun and Netlify doesn't have any...

      I use Github and Netlify to run some simple websites for free. It works well. However, I've been thinking of experimenting with a database-backed website for fun and Netlify doesn't have any persistence.

      What's a good way to do this that scales to zero when nobody's using it? I want to be able to forget about it entirely for months or years at a time. When someone visits, it should start up and run on demand without costing me $20 a month on standby.

      Back in the day, I used Google App Engine for this. I learned a lot of datastore tricks to get around its poor latency, but I'm lazy and don't want to do that anymore. I'm pretty sure I want a SQL database and full text search. Either sqlite or Postgres would do, but I doubt there's a cheap enough way to run Postgres.

      Litestream looks interesting and so does LiteFS, except that it's pre-1.0 and I don't know what changes fly.io will make that I have to keep up with. If I used Litestream, I'd have to figure out how to run it and where to store the replication logs.

      Edit: one nice-to-have is being able to easily dump the database and run it locally or on another cloud provider. (I don't anticipate it getting so big that it's impractical.)

      47 votes
    16. Fortnightly Programming Q&A Thread

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads. Don't forget to format your code using the triple...

      General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.

      Don't forget to format your code using the triple backticks or tildes:

      Here is my schema:
      
      ```sql
      CREATE TABLE article_to_warehouse (
        article_id   INTEGER
      , warehouse_id INTEGER
      )
      ;
      ```
      
      How do I add a `UNIQUE` constraint?
      
      11 votes
    17. 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?

      46 votes
    18. Dealing with databases, inserts, updates, etc. in Python

      Current Library: built in sqlite Current db: sqlite (but will have access to Snowflake soon for option 1 below) Wondering if anyone here has some advise or a good place to learn about dealing with...

      Current Library: built in sqlite
      Current db: sqlite (but will have access to Snowflake soon for option 1 below)

      Wondering if anyone here has some advise or a good place to learn about dealing with databases with Python. I know SQL fairly well for pulling data and simple updates, but running into potential performance issues the way I've been doing it. Here are 2 examples.

      1. Dealing with Pandas dataframes. I'm doing some reconciliation between a couple of different datasources. I do not have a primary key to work with. I have some very specific matching criteria to determine a match (5 columns specifically - customer, date, contract, product, quantity). The matching process is all built within Python. Is there a good way to do the database commits with updates/inserts en masse vs. line by line? I've looked into upsert (or inserts with clause to update with existing data), but pretty much all examples I've seen rely on primary keys (which I don't have since the data has 5 columns I'm matching on).

      2. Dealing with JSON files which have multiple layers of related data. My database is built in such a way that I have a table for header information, line level detail, then third level with specific references assigned to the line level detail. As with a lot of transactional type databases there can be multiple references per line, multiple lines per header. I'm currently looping through the JSON file starting with the header information to create the primary key, then going to the line level detail to create a primary key for the line, but also include the foreign key for the header and also with the reference data. Before inserting I'm doing a lookup to see if the data already exists and then updating if it does or inserting a new record if it doesn't. This works fine, but is slow taking several seconds for maybe 100 inserts in total. While not a big deal since it's for a low volume of sales. I'd rather learn best practice and do this properly with commits/transactions vs inserting an updating each record individually within the ability to rollback should an error occur.

      11 votes
    19. Is there a good microprocessor with 24-bit addressing?

      The original IBM 360 had a 24-bit address space. https://en.wikipedia.org/wiki/IBM_System/360 Microprocessors of the golden age of home computing (Apple ][, TRS-80, Commodore 64, CP/M machines...

      The original IBM 360 had a 24-bit address space.

      https://en.wikipedia.org/wiki/IBM_System/360

      Microprocessors of the golden age of home computing (Apple ][, TRS-80, Commodore 64, CP/M machines based on the 8080 and Z80) usually had a 16-bit address space, the 8086/8088 was a bit of an exception because it had a segmentation scheme to access 1 MB. (People thought it was awkward but I liked programming it in assembly language and Turbo Pascal) I remember the PDP-11 minicomputer having a 16-bit address space for user programs as well, the machine as a whole could be a lot bigger but an individual logged into it had access to a virtual "home computer" that ran BASIC and all.

      24-bit was a natural evolution and by the late 1980s you started to see 24-bit chips like the 80286 (PC AT) the 65C816 (Apple IIgs, Ninteno SNES), the eZ80 and such. Even the bigger AVR8 processors (I love AVR8 assembly) can have more than 64kb of program memory (flash, read-only in operation) so they use 24-bit addresses for program memory.

      In my mind we never saw a product of this generation that really took advantage of the address space, the 80286 in particular was called "brain damaged" by Bill Gates and operating systems struggled to exploit it. My take is that most of the chips of that generation were flawed in one way or another and were pretty quickly washed away by 32-bit machines when they became affordable in the early 1990s.

      For an example of the difficulties, there is this project to make a retrocomputer that is a bit better than anything we had in the 1980s,

      https://www.youtube.com/watch?v=0oYcu43N-lw

      they are using the 65C816 but not taking advantage of the 24-bit nature. Instead there is a simple bank switching scheme which I think they thought would be easier to program and probably faster. The 65C816 just doesn't have enough registers and addressing modes for it to be really easy to work with far pointers.

      So my question is, if I am a hobbyist who wants to revive the 24-bit generation and I want to have easy access to a 16MB address space, is there some CPU better that doesn't suck? I'd be happy with a CPU that doesn't have virtual memory or other facilities for an advanced operating system (write everything in "real mode") but something that supports an OS would be interesting too. Any ideas?

      7 votes
    20. COM+ alternatives in 2023?

      We are small company and have utilized COM+ on the server for the last 20 years. Strictly Windows and all LAN based communication. We are rewriting in c#. What are some alternatives that I can...

      We are small company and have utilized COM+ on the server for the last 20 years. Strictly Windows and all LAN based communication. We are rewriting in c#. What are some alternatives that I can look in to that may be better in terms of speed or management for COM+?

      7 votes
    21. Looking for resources about AI development

      Hello, I'm looking for resources on how to develop AI, aimed at people who already have experience with programming. They don't have to be free, I would just like to aggregate different type of...

      Hello,
      I'm looking for resources on how to develop AI, aimed at people who already have experience with programming.

      They don't have to be free, I would just like to aggregate different type of resources to pick from.

      Thanks!

      14 votes