Real programmers use C-x butterfly
- 0 Posts
- 18 Comments
Yes, but you know what I did? nothing, I just have the program exclusively accept lowercase
doom.wad
This means it became annoying for the user. The problem shifted and now it’s the end-user the one with the responsibility to read the manual and do the work. A lot of people just get a
DOOM.WAD
, put it there and are surprised it doesn’t work.And there are many many programs that are doing the same thing in many similar situations. In fact, in the Linux world, most software pushes this to the end user. So this is just as much of a problem for users as it is for programmers.
At the end of the day, the question should not be: is it more complexity for the user or for the programmer? …the question should be: what’s the end cause making it complex? is there a way it can be made simpler?
This is the same for every problem. Often user-friendliness is a tradeoff, most user-friendly software I’ve used keeps so much complexity within that it becomes annoyingly slow and inefficient. I’d rather use the terminal for file management than wait for the GUI file browser to finish loading my huge remote storage directories.
But then you are not getting rid of the complexity, you are just forcing programs to become more complex/inefficient.
I experienced this with the doom libretro core, which is meant to be portable and have minimal dependencies… so if I need it to automatically find
DOOM.WAD
/doom.wad
/Doom.WAD
/etc in a directory I would either have to add a globbing library as dependency to handle this case and have it fetch[Dd][Oo][Oo][Mm].[Ww][Aa][Dd]
, manually check for each possible case, or list the entire directory (I hope you don’t have a library of a million wads!) and compare each file (afterupper
/lower
) just to find the one with the right name. And that could be a real pain for embedded devices with low I/O or if there’s a remote storage layer behind.
I’m with you, and not just from a “human” perspective. Also when writing small programs meant to be relatively lean/simple it can be a problem when the user expects it to find a particular file regardless of its case (will it be
DOOM.WAD
ordoom.wad
?Doom.wad
?Doom.WAD
? … guess it’ll have to be[Dd][Oo][Oo][Mm].[Ww][Aa][Dd]
and import some globbing library as extra dependency… that, or list the whole directory regardless its size andlower
/upper
every single filename until you find a matching one…)
Ferkto Linux•Valve’s plan to bring SteamOS to more devices is a promising sign if you want to stop gaming on Windows4·4 months agoI agree that we shouldn’t worry (at least for the moment), but I think the main reason is the lack of locks, both when it comes to hardware (no locked bootloader) and software (getting root access is trivial, so you can uninstall whatever components you might not like and with updates not being mandatory you can keep it under your control).
With SteamOS, you already have an ecosystem, which is Steam. There is (at least for now) a clear distinction between Hardware manufacturer and software provider.
Currently, the only officially sanctioned version of SteamOS is the one that is shipped with Steam Deck (even though that might change soon), which is hardware sold by Valve (ie, the same company making the software). Meanwhile, most people using Android don’t use Pixel / Nexus devices and thus their hardware is not being sold by Google.
So I’d say this depends entirely on how do the new manufacturers wanna go about it when it comes to offering their own custom versions of SteamOS. At the moment this is ok because Valve has been acting as a “benevolent dictator” and they have essentially had a monopoly on SteamOS 3 devices until now. Once that monopoly breaks (and if Valve actually allows third parties to ship their own customizations) we’ll have to see what kind of control will their partners want to assert over it.
Ferkto Opensource•SingleFile: Web Extension for saving a faithful copy of a complete web page in a single HTML file3·4 months agoAwesome!
I assume it’s storing the images and assets in base64 format, so it might get quite big. I always wished there was a standard way to package a website in a single compressed file. Sort of like an epub / ODF kind of format that keeps the website layout. But this is the next best thing.
And if looking for Rust alternatives, there’s
dua
.Particularly user friendly when called in interactive mode with
dua i
, you can navigate the tree immediately as it populates and calculates space progressively.
That’s horrible for muscle memory, every time I switch desk/keyboard I have to re-learn the position of the home/end/delete/PgUp/PgDn keys.
I got used to
Ctrl-a
/Ctrl-e
and it became second nature, my hands don’t have to fish for extra keys, to the point that it becomes annoying when a program does not support that. Some mapCtrl-a
to “Select all” so, for input fields where the selection is one line, I’d ratherCtrl-a
thenleft
/right
to go to the beginning/end than fish forhome
/end
, wherever they are.
Alt-delete
deletes the whole word before cursorAlt-d
deletes the whole word after cursorCtrl-k
deletes (kill) everything after the cursor
Whatever is deleted is stored in the “killring” and can be pasted(yanked) back with
Ctrl-y
(like someone else already mentioned), consecutive uses ofAlt-delete
/Alt-d
add to the killring.Alt-b
/Alt-f
moves one word backwards / forwardsAlt-t
swaps (translocates) the current word with the previous oneCtrl-_
undo last edit operation
All those bindings are the same as in emacs.
Also, normally
Ctrl-d
inserts the end-of-file character, and typically can be used to close an active shell session or when you have some other interpreter open in the terminal for interactive input.
That quote was in the context of simply separating values with newlines (and the list also included “your language’s
split
orlines
function”).Technically you don’t even need
awk
/sed
/fzf
, just a loop in bash doingread
would allow you to parse the input one line at a time.while read line; do echo $line # or whatever other operation done < whateverfile
Also, those manpages are a lot less complex than the documentation for C# or Nushell (or bash itself), although maybe working with C#/nushell/bash is “easy when you’re already intuitively familiar with them”. I think the point was precisely the fact that doing that is easy in many different contexts because it’s a relatively simple way to separate values.
For the record, you mention “the limitations of the number of inodes in Unix-like systems”, but this is not a limit in Unix, but a limit in filesystem formats (which also extends to Windows and other systems).
So it depends more on what the filesystem is rather than the OS. A FAT32 partition can only hold 65,535 files (2^16), but both ext4 and NTFS can have up to 4,294,967,295 (2^32). If using Btrfs then it jumps to 18,446,744,073,709,551,615 (2^64).
Yes… “metadata” is becoming an overused term. Not all data is metadata.
My first thought when I read the title was about those
.nfo
files used by Kodi/Jellyfin and other media centers to keep information relative to the media files.
Ironically, I think it’s the younger ones the ones pushing for discord the most. Some projects opened a discord because it actually made it more attractive to young people.
The question is how to make an open source alternative more attractive.
True, SGID would affect the group it runs as, while SUID affects the user.
You could set up things so that a group has permissions to do what you want, instead of the root user. But then this also depends on the usecase, I’m not sure if having root group permissions would be enough in all cases.
What do you mean by “not require sudo privileges”?
Do you mean not require root permissions? that depends on what are you trying to do. You’ll need to make changes in your system to allow normal users to have permissions for it, and in many cases that’s not possible (or very safe).
If what you mean is that you don’t want to need to type"sudo" every time, but still be able to have the commands run with root permissions, then there’s multiple ways to do this:
-
Add an alias such as
alias command='sudo command'
. If you don’t want to type the password, you can change the sudores file so that your user doesn’t need to enter a password when running sudo for that command (someone else in the comments already explained how to do that, using an entry withNOPASSWD: /usr/bin/command
in the sudoers config). -
alternatively: set the SUID bit of the executable you want to run, so that every time the file is executed (by anyone) it will always execute as the user who owns the file (so if the owner is root, the file will always be executed as root)… this is not something I’d recommend though, since it can lead to security vulnerabilities.
-
If the original footage is so bad that “nonsense that people assume is part of the actual show” “could plausibly be there”, then the problem is not with the AI… it wouldn’t be the first time I’m confused by the artifacts in a low quality video.
What C does depends on the platform, the CPU, etc.
If the result actually differs due to compilers deviating in different architectures, then what we can say is that the language/code is not as portable. But I don’t think this implies there’s no denotational semantics.
And if the end result doesn’t really differ (despite actually executing different instructions in different architectures) then… well, aren’t all compilers for all languages (including Rust) meant to use different instructions in different architectures as appropriate to give the same result?
who’s to say what are the denotational semantics? Right? What is a ‘function’ in C? Well most C compilers translate it to an Assembly subroutine, but what if our target does not support labels, or subroutines?
Maybe I’m misunderstanding here, but my impression was that attempting to interpret the meaning of “what a function is in C” by looking at what instructions the compiler translates that to is more in line with an operational interpretation (you’d end up looking at sequential steps the machine executes one after the other), not a denotational one.
For a denotational interpretation of the meaning of that expression, shouldn’t you look at the inputs/outputs of the “factorial” operation to understand its mathematical meaning? The denotational semantics should be the same in all cases if they are all denotationally equivalent (ie. referentially transparent), even if they might not be operationally equivalent.
Since the day community tags were introduced on Steam I have been systematically adding tags like FOSS / Open Source / etc. to the FOSS games hoping to one day see one of them actually work as filter tags on the store, yet they never ever did. And yet tags like “Snooker” with only 11 games can be used as filter…
At this point I’m almost convinced that Valve has purposely blocklisted those terms from the allowed tags (it’s known that they do have a blocklist). So I’ve resigned myself to depend on the curator system, to find which FOSS games are on Steam from within the store page: https://store.steampowered.com/curator/38475471-Libre-Open-Source-Games (and they are more than 11…)