Software engineer, functional programming enthusiast.

  • 1 Post
  • 55 Comments
Joined 5 years ago
cake
Cake day: April 27th, 2021

help-circle

  • I recommend Debain, or else Linux Mint which is a derivative of (and fully compatible with Debian Linux) but has more recent software packages available to it.

    Both Tailscale and Jellyfin have instructions on how to install onto Debian which are not too difficult to follow.

    If you intend to use this computer as a server, Debian is probably better, it is lighter-weight and slightly more stable. If you intend to also use this computer as a daily driver, you might try Linux Mint instead, since it includes more of Ubuntu’s more recent software builds in their app store (i.e. package repository), and it is helpful to have more recent builds of the most popular apps. I have heard it is also a bit easier to install games onto Linux Mint than Debian.

    I have a blog post about how to pick a Linux written for people switching from Windows or Mac, if you are interested in a more detailed explanation.


  • Ramin Honary@lemmy.mltoLinux@lemmy.mlThe Terminal Question
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    6 months ago

    I use Xfce and Cinnamon, but I always install Gnome Terminal regardless (you don’t need all of Gnome desktop to use it). The main reason I like Gnome Terminal is that it is very simple, and it lets you save your own terminal themes and switch between them from a context menu. Xfce terminal is nice and simple, but doesn’t have this really handy theme switching feature.

    That said, the terminal emulator I used most often is the Emacs built-in terminal emulator (term-mode), because it integrates flawlessly with other Emacs tools. But its rendering and theming isn’t as nice as Gnome terminal, so I only recommend it if you are an Emacs user.



  • Ramin Honary@lemmy.mltoLinux@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Well, Ubuntu or any company could certainly do something like that. But then this company would simply be competing with Android with an incompatible app platform built on top of Linux. App developers who have a hard enough time developing their apps for both Android and iOS would not want to write their app for yet another incompatible proprietary platform, even if the underlying OS kernel was Linux.

    As others have said, the real advantage to Linux, the real reason to use it, with desktop environments like Gnome or KDE, in spite of their minor flaws, is that the software is owned by all of us. Unlike proprietary software which you are basically renting for a monthly fee, on Linux you actually own your software and your data.


  • Ramin Honary@lemmy.mltoLinux@lemmy.mlWhat are your opinions of Guix?
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 years ago

    So I think Guix (and Nix) is the most technologically advanced package manager in existence, and I hope someday all package managers work like Guix.

    One other very interesting feature about Guix (which I don’t think Nix is doing yet) (which Nix also does) is that they have implemented a fully verifiable bootstrap, meaning every step of building the kernel, including the steps taken to build the C compiler toolchain, are produced by code that is simple enough for a group of humans to check for correctness and safety. Also, every step of the build process exists in the package repository, with no reliance on externally built binaries for anything, not even the C compiler toolchain. They accomplish this with a multi-phase bootstrap process, where a smaller, simpler C compiler is used to build GCC.

    Do I use Guix? Well, no. Simply put, it is not quite to the point where it just works on a lot of the computer hardware that I own. With a bit more work, with a few more developers, and a bit more money invested, Guix could pretty soon become as reliable and useful as Debian or Fedora. But it is not quite there yet. And frankly, I have other more important things to do than worry about debugging problems with the operating system I am using.


  • Is it not possible for Rust to optimize out unused functions as with C?

    No Rust can do dead code elimination. And I just checked, Rust can do indeed do FFI bindings from other languages when you ask the compiler to produce dynamically linking libraries, but I am guessing it has the same problems as Haskell when it produces .so or .dll files. In Haskell, things like “monad transformers” depend pretty heavily on function inlining in order to achieve good performance.

    So I am talking more about how Rust makes use of the type system to make decisions about when to inline functions which is pretty important when it comes to performance. You usually can’t inline across module boundaries unless modules are all statically linked. So as I understand it, if you enable dynamic linking in your Rust program, you might see performance suffer a lot as compared to static linking, and this is why most Rust people (as I understand it) just make everything statically linked by default.


  • So you’re working on your machine learning projects in Zig?

    No, Python and C++, which were the languages chosen by both Google and Facebook for their AI frameworks.

    I just think if a systems programming language like Rust does not provide a good way to facilitate dynamic linking the way C, C++ does, these languages will start running into issues as the size of the compiled binaries become ever larger and larger. I think we might all be a little too comfortable with the huge amount of memory, CPU cycles, and network bandwidth that we have nowadays, and it leads to problems when you want to scale-up a deployment. So I think Zig might make a more viable successor to C or C++ as a systems programming language than Rust does.

    That said, I definitely think Rust and Haskell’s type systems are much better than that of Zig.




  • The main difficulty I have with Rust (what prevents me from using it), is that the maintainers insist on statically compiling everything. This is fine for small programs, and even large monolithic applications that are not expected to change very often.

    But for the machine learning projects I work on, I might want to include a single algorithm from a fairly large library of algorithms. The amount of memory used is not trivial, I am talking about the difference between loading a single algorithm in 50 MB of compiled code for a dynamically loadable library, versus loading the entire 1.5 GB library of algorithms of statically linked code just to use that one algorithm. Then when distributing this code to a few dozen compute nodes, that 50 MB versus 1.5 GB is suddenly a very noticeable difference.

    There are other problems with statically linking everything as well, for example, if you want your application to be written in a high-level language like Python, TypeScript, or Lisp, you might want to have a library of Rust code that you can dynamically load into the Python interpreter and establish foreign function bindings to the Rust APIs. But this is not possible with statically linked code.

    And as I understand, it is a difficult technical problem to solve. Apparently, in order for Rust to optimize a program and guarantee type safety and performance, it needs the type information in the source code. This type information is not normally stored into the dynamically loadable libraries (the .so or .dll files), so if you dynamically load a library into a Rust program its type safety and performance guarantees go out the window. So the Rust compiler developers have chosen to make everything as statically compiled as possible.

    This is why I don’t see Rust replacing C any time soon. A language like Zig might have a better chance than Rust because it can produce dynamically loadable libraries that are fully ABI compatible with the libraries compiled by C compilers.


  • I have a blog article about this. Here is the short version:

    I can tell you how not to choose a distro: what its screenshots look like or what its default desktop environment is. Many begin shopping around for a distro that suits them best, which means visiting a website like DistroWatch.com, looking at the various screen shots, and picking one that looks nice. But any Linux distro can be made to look like any other distro without too much effort, what you see in the screen shots is just the default look. Really, the the screen shots should be the least of your concerns.

    So don’t worry about Xfce, KDE, Gnome, LXDE, LXQt or whatever else right now, you can try all of those in good time. First, just get Linux and, worry about figuring out which apps that you can get that work best for your work flow. Almost none of the apps you use now are available in Linux, the hardest part is figuring out how to replace the apps you use daily right now.

    You should choose the distribution with the best web service, and the best apps.

    • Is the service reliable? Do they have a good team of people making sure the packages are always online, and making sure they are providing timely security updates?

    • Do they have corporate, or non-profit, sources of funding? Do you trust the people who are running it?

    • Do they have the apps you want, are the apps up to date? Do they have things you need, like word processing, presentation software, photo scrap booking, file sharing, video editing, music editing, personal organizers, video conferencing (can you install Zoom, for example?). Can you easily install Flatpaks or AppImages?

    Many of the really big Linux distros all provide completely reliable service, which satisfy the above requirements, but I recommend any of the following four:

    • Mint
    • Fedora
    • Ubuntu
    • Pop!_OS

    Mint and Fedora are community-run with backing from various sponsors, Ubuntu is run by the Canonical corporation, Pop!_OS is developed by the System 76 company (a medium sized US-based business that sells laptops and PCs).


  • As far as I understand, Unity is mostly just a Gtk-based desktop environment similar to Cinnamon, but with the Unity shell and launcher, and the global menu.

    As a long-time Mac user I always liked the global menu, but it was just such a pain to always have to patch Gtk to get it to work, and in the end it isn’t such a huge improvement to my quality of life that I think it is worth the trouble. It is nice that Unity takes care of this for you. That said, and I hate to admit it, but I think Gnome actually is more stable than Unity, mostly because there is so much more financial backing for it, so it is hard for me to recommend using Unity unless you really just love the aesthetics of it.


  • This is not a very good question. If you are concerned about security you need to think about what specifically you are trying to keep safe? Here are some examples of different security scenarios:

    1. Do you want your computer to be safe when it is stolen?
    2. Do you want to run lots of native apps from untrusted sources?
    3. Do you want it to be used by many people and you don’t want them to be able to steal each others secrets?

    Each one of those questions has different means of securing the computer. With question 1, it is not so much a matter of desktop environment, rather it has more to do with using full-disk encryption, setting a boot password in UEFI, and always having your lock screen enabled.

    With question 2, this is a much more difficult task and you would probably be better off running apps in a VM, or carefully crafting your “Security Enhanced” Linux profile – or not using Linux at all, but using FreeBSD which allows you to run apps in jails.

    With question 3, be more careful with filesystem permissions and access control lists, setup your sudoers file properly, and use a desktop environment with better security auditing like Gnome or KDE Plasma.



  • I would go with Mint because it has the largest selection of apps. Of course you can run any Linux program on any Linux distro, but with Mint you are able to just install almost anything without difficulty from a package manager like synaptic, or the built-in Mint Software Manager. That includes game launchers like Steam and Proton. This is, in my opinion, what makes Mint OS truly the most beginner friendly Linux distro.

    Fedora is good too, but you need to grant it access to other sources of apps before you see the wider selection of apps outside of the more limited, strictly FLOSS apps that are available by default on Fedora. And these extra steps of finding trustworthy sources and installing them makes Fedora a bit harder to use, at least for beginners.


  • I wouldn’t worry too much about the package manager, just worry about whether the distro has a good package repository.

    download/updates fast and reliable. Also when watching git repositories for new software alternatives, you e.g. see often packages for good package managers, whereas you need to go some extra mile for “stable” package managers.

    But I would say these are not features of the package manager software, rather they are features of the package repository, that is, the online service that provides the packages. It doesn’t matter if you use Apt, DNF, Pacman, if the package repo is slow, fully of packages that haven’t been built right, the package manager software won’t do much to make it better.

    But like I said, a few package manager are really unique, like Gentoo Emerge, Crux Prt-Get, and Nix and Guix.


  • I wouldn’t worry too much about the package manager, just worry about whether the distro has a good package repository. If it has all the software you want to use, then use it. In my opinion, most package managers (dnf, apt, pacman, xbmp) are basically the same, and you would only notice a big difference if you ever tried to make your own package for your own software.

    That said, a few package managers are very different from all the rest:

    • Crux OS “prt-get”: simple and stupid: just downloads and installs tar archives.
    • Gentoo “emerge”: builds all software from source code when you install it. This provides some guarantees that the source code was not tampered with by the distro maintainers, this is great if you need to review all of the source code that is running on your system, but terrible for most people who don’t want to spend so much computing power on compiling stuff every time you do a software update.
    • Nix and Guix: creates its own blockchain-like database of isolated package dependency chains on your system, allowing you to instantly roll-back to the previous set of installed packages if you ever install something that breaks your system. It also guarantees that the software can be checked bit-for-bit (using SHA hash) traced back to the exact version and dependencies of the source code that built it. Nix and Guix packages also live peacefully side-by-side with any other package manager since all Nix/Guix apps are completely self-contained within its own database. In a way, it is sort of like one big AppImage or Docker container, but you can just keep adding or removing stuff to it as often as you want.
    • Silverblue, SteamOS, VanillaOS, BlendOS, CarbonOS: distributes “immutable images,” so it is impossible modify the operating system at all. Updates will ship an entirely new operating system with all packages built-in. However you are allowed to install software into your home directory, and you can install FlatPacks and AppImages. This provides a great deal of security in exchange for a tiny bit of inconvenience.

    My personal preference: I use ordinary Debian or Ubuntu to install the critical software that needs to be stable and reliable, and I use Guix OS on the side to install the bleeding-edge things that might break a lot.



  • “In what world is Vscode not customizable?”

    When I think of “easy to customize,” I am thinking about Emacs in particular, but really any editor that includes a scripting engine which is used to program the entire editor user interface.

    With editors like VSCode or Geany that I would say are “hard to customize,” you can’t just write a snippet of TypeScript or C++ into a file which you can just run right there in the editor process. You can write extensions in TypeScript, but they have to be properly compiled, linked against the editor libraries, and properly installed with a manifest and everything, in order to write your own code that runs in a way that modifies the editor’s behavior. That or you have to run your TypeScript code as a text filter in an external Node.js process.

    Geany does have Lua and Python scripting engines as extensions, but you have to understand the Geany API pretty well in order to do anything elaborate, it was never really designed for people to be able to script the entire GUI or define their own whole unique workflows.

    With Emacs, or any scriptable text editor, you just write a few lines of code and run it (even without saving a file), and the code actually alters the state of the editor itself. While you could write an entire app, like a Matrix or Mastodon client, as you would like a VSCode or Geany extension, you can also easily write a few lines of code to do any random thing at all. You can write code to suit any workflow imaginable, no matter how ridiculous: code that changes the color theme of the whole editor at certain times of the day, or code that opens certain kinds of files always in 3 separate windows, each window scrolled to a particular section of the file. You can run processes or alter the filesystem or transform entire batches of files in response to any event.

    And you can do all of this without compiling or installing extensions of any kind, and often with no more than a dozen lines of code. There are no limitations. This is what I consider to be “easily customizable.”