LalSalaamComrade

Yup, that’s me, President of the agAdbefdsds…what, where am I?

  • 58 Posts
  • 581 Comments
Joined 1 year ago
cake
Cake day: October 3rd, 2023

help-circle
  • This worked for me - I think %p fixed the issue of incorrect representation, as well as input. I also tried unsigned long int, which works in place of uintptr_t, but I’m assuming that it isn’t portable.

    Resolved code snippet
    /* Allows the user to view regions of computer memory */
    
    #include <ctype.h>
    #include <stdint.h>
    #include <stdio.h>
    
    typedef unsigned char BYTE;
    
    int
    main (void)
    {
      uintptr_t addr;
      int i, n;
      BYTE *ptr;
    
      printf ("Address of main function: %p\n", (void *) &main);
      printf ("Address of addr variable: %p\n", (void *) &addr);
      printf ("\nEnter a (hex) address: ");
      scanf ("%p", &addr);
      printf ("Enter number of bytes to view: ");
      scanf ("%d", &n);
    
      printf ("\n");
      printf (" Address               Bytes             Characters\n");
      printf (" ------- ------------------------------- ----------\n");
    
      ptr = (BYTE *) addr;
      for (; n > 0; n -= 10)
        {
          printf ("%8X  ", (uintptr_t) ptr);
          for (i = 0; i < 10 && i < n; i++)
            printf ("%.2X ", *(ptr + i));
          for (; i < 10; i++)
            printf ("   ");
          printf (" ");
          for (i = 0; i < 10 && i < n; i++)
            {
              BYTE ch = *(ptr + i);
              if (!isprint (ch))
                ch = '.';
              printf ("%c", ch);
            }
          printf ("\n");
          ptr += 10;
        }
    
      return 0;
    }
    



  • Since there’s no answer from Guix users over here, well, I use Guix as my main distro. The language choice is superior to Nix’s half-Haskell DSL. However, the bigger issue with Guix is the lack of maintainers. NodeJS hasn’t been updated since the last five year and Zig lacks a lot of packages. Another big issue is the centralized GNU server, which can fail at any moment. Their servers are all located in either the USA, or Europe, and for Asia, downloading NARs with such slow speed is a pain in the ass.











  • You have to download docker first, then enable virtualization support from the BIOS. Also don’t forget to add the required “groups” to your current user. Then run the docker command (privilege escalation would be necessary, so use with sudo or doas):

    $ docker run -it -e LEMMY_DOMAIN='lemmydomain.com' -p "8080:8080" ghcr.io/rystaf/mlmym:latest
    

    But this is a web application, not a native client. Why do you want this? There’s probably someone out there running mlmym for your instance.









  • LalSalaamComrade@lemmy.mltoMemes@lemmy.mlOS Installation
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    13 days ago

    After you get decently experienced with Linux, you’re tempted to move to a “difficult-to-setup” distro for fun and more flexibility. Nothing wrong with normie distros, but these advanced distros are really good - you can strip down “bloat”, pick your own init system, your own login daemon as well as your own job scheduler.