abcdw, to DOOM
@abcdw@fosstodon.org avatar
publicvoit, to programming
@publicvoit@graz.social avatar

What happens, when you join two paths in a language when the second one is an absolute one?

join("foo", "/bar")
returns "foo/bar" or "/bar"?

The wonderful @meisterluk wrote a great article about that you might want to read: https://lukas-prokop.at/articles/2024-05-03-filepath-join-behavior

I can not tell what version I'd actually prefer. There are situations where both versions would be "proper".

#C++

winterschon, to infosec
@winterschon@hachyderm.io avatar

we're all aware of the xz issue, but systemd and CVEs are intertwined. linux distros choose insecurity + instability by using systemd.

it's brought to you by:

  • a dev who despises POSIX
  • a dev who eschews security, ethics, and foundations of UNIX
  • a dev explicitly aligned to microsoft propaganda
  • a dev who is anti-FOSS
  • a dev fiscally compensation by the closed-source juggernaut

never forget: https://pwnies.com/systemd-bugs/

dcz, to history
@dcz@fosstodon.org avatar

What's the use case for access time in ?

In my entire career I don't think I needed it once.

What was so important that people were ready to pay the penalty of writing on every read?

What is the of that anyway?

happyborg, to linux
@happyborg@fosstodon.org avatar

Are "hard links" important or a nice to have in a filesystem?

I'm trying to assess possible feature compromises for a / based that can be mounted on multiple machines, so any views on the usefulness of hard links with examples would be appreciated.

One such compromise here is merging of changes made from different devices, that will be much harder with hard linking.

How important are hard links to you and why?

happyborg, to rust
@happyborg@fosstodon.org avatar

Anyone familiar with Syncer, a virtual disk written in Rust?

It's a massive virtual disk with interface that can be mounted locally using .

Written in , the architecture and backend mean it could be adapted to a decentralised backend, something I looked into in the past and an revisiting.

I'm wondering if anyone else is interested in this potential, and if anyone knows the author or second contributor.


https://github.com/pedrocr/syncer

grahamperrin, to android
@grahamperrin@bsd.cafe avatar

The Land Before Linux: The Unix desktops • The Register

<https://www.theregister.com/2024/01/27/opinion_column/> @sjvn

❝Today, thanks to Android and ChromeOS, Linux is an important end-user operating system. But, before Linux, there were important Unix desktops, although most of them never made it. …❞

#analysis #Android #Apple #benevolent #cats #Canonical #ChromeOS #consensus #containers #Dell #desktop #dictator #dogs #DragonflyBSD #expert #Flatpak #Foundation #FreeBSD #GhostBSD #GNU #GPL #group #jails #licence #license #Linus #Linux #Mac #Mach #macOS #market #Microsoft #NeXT #NeXTSTEP #opinion #POSIX #share #Slackware #Snap #standards #success #Sun #technology #Torvalds #UNIX #Windows #work #year

rnkn, to random

Would you prefer a command line tool written in or ?

david_megginson, to tech
@david_megginson@mstdn.ca avatar

Maybe-contentious claim: for technically-oriented people, no user interface has ever surpassed the Unix shell.

I remember "discovering" it in 1987, 9 years after I'd started writing code in FORTRAN and BASIC. The old-timers showed me how I could do things in minutes that took weeks on other systems, like generate a full sorted concordance of a text in a single pipeline of shell commands.

(If I were ever forced to use a Mac, that's where I'd spend a lot of my time.)

mms, to random
@mms@emacs.ch avatar

Is anyone doing in shell? If so, I’d love to follow the journey!

mort, to cpp
@mort@fosstodon.org avatar

When writing C++, I consistently find myself wanting to use std::string_view, because I want to take a view into a string. Then, as time goes on, I eventually want to pass that string to something which eventually has to interact with a #C (usually ) API. At that point, I need a 0-terminated string. string_view isn't zero terminated, so I revert back to using a const char * instead of a string_view.

Why oh why isn't there a std::c_string_view which contains a zero-terminated string

juandesant, to til
@juandesant@astrodon.social avatar

Today I learned how to split a variable with multiple lines for a Bash/ZSH script. I was using the previously mentioned mdb-query package, and I have a variable named tables with the different tables, separated by returns. When I fried to do for table in $tables; do echo $table; done, it did not split the lines.

I got the right output with

while IFS= read -r table; do $table; done &lt;&lt;&lt; $tables

The spacing is important!

From https://superuser.com/a/284226/199266

kornel, to random
@kornel@mastodon.social avatar

“Argument list too long” is such an archaic error.
Sorry, your computer can’t run this program, because somewhere there’s a buffer limited to one millionth of your RAM size.

mxk, to Bash
@mxk@hachyderm.io avatar

Since I needed to point to it again for work reasons:
If you are writing shell scripts and you think that they are portable, you probably should know this webpage:
https://www.in-ulm.de/~mascheck/various/shells/

mima, to random

Introducing Momiji: a Gopher interface for Fediseer!

gopher://geidontei.chaotic.ninja/1/usr/mima/momiji/

Since the official web GUI of requires JavaScript (seriously what's up with that, is this a Lemmy thing lol :P), I thought I'd write something that uses Fediseer's API, and the interface wouldn't need JavaScript to be loaded from the website and can be viewed by any plaintext-friendly client. So I settled with ! ​:alice_wine:​

Currently you can only lookup some basic information per instance, and see all domains which they have endorsed, censured, hesitated, and guaranteed (and vice-versa) in a pure plain text format. I might write an interface for the whitelisted, suspicious, censured, and hesitated lists of instances too, but I'm not promising anything. :P As it stands, this simple Gopher CGI fits my needs for now. ​:kokoro_yes:​

Logging in with your key is not supported (probably a bad idea anyway due to Gopher typically being unencrypted ​:satsuki_sadge:​), so you won't be able to see some domain lists of instances that have restricted the viewing of endorsements/censures/hesitations they give, or modify anything in Fediseer.

It's all written in script, with the dcgi currently written with 's gophermap format in mind. You can see the source code (which you can treat as being in the public domain) in the URL I've given. Warning: It's pure shell script cancer! ​:kyou:​

@fediseer

bahmanm, to til
@bahmanm@mastodon.social avatar

When in doubt about compliance of a command, just use FTW.

Example: Asking date to produce nanoseconds doesn't work on w/o coreutils installed.

So I simply switched to perl -MTime::HiRes and, well, problem was solved!

reconbot, to random
@reconbot@toot.cafe avatar

I had a long conversation with @requiem and he helped me be OK with admitting this to myself and others.

I think #POSIX sucks and we could do better if we moved on from it.

Linux_Is_Best, to Bash
@Linux_Is_Best@mastodon.social avatar

Did anyone know that posix does not like:

mkdir -p -m 755 /opt

I didn't know that. I learned something new today. Unless this validator is flawed (see URL) https://www.shellcheck.net

I needed to break it up to validate.

Create /opt directory if it doesn't exist

mkdir -p /opt

Set permissions for /opt

chmod 755 /opt

hywan, to test
@hywan@fosstodon.org avatar

Testing sudo-rs and improving sudo along the way, https://ferrous-systems.com/blog/testing-sudo-rs/.

sudo-rs is a re-implementation of sudo in Rust. While testing sudo-rs, they have found several inconsistencies in the specification, and found 2 bugs in the original sudo implementation.

This test suite can run on both implementations.

Link to sudo-rs: https://github.com/memorysafety/sudo-rs.

retropolis, to Podcast Portuguese
@retropolis@bitbang.social avatar
ovid, to random
@ovid@fosstodon.org avatar

For those who use git and are tired of remembering the difference between POSIX regular expressions and Perl regular expressions:

git config --global grep.patternType perl

Toasterson, to random
@Toasterson@chaos.social avatar

Everybody: POSIX is to complicated we need Docker!

Later: Docker is to complicated we need WASM!

Now: WASM has not enough power we need ^H^H WASIX

https://wasmer.io/posts/announcing-wasix

Good old things go away last.

scy, to linux
@scy@chaos.social avatar

Oh wow, TIL: When you do input redirection from a file in , e.g.

python whatever.py < foo.csv

the running command can actually stat() the stdin file descriptor and get the size of the input file! I would’ve expected that it’s more like “well, it’s your stdin, you can’t get the size for that, it’s a stream”.

And, to be fair, if you don’t directly associate the file to the command, it breaks. For example,

cat < foo.csv | python whatever.py

won’t supply a size.

scy, (edited ) to linux
@scy@chaos.social avatar

fun fact:

“source” is a . The actual name of the command is “.”. That’s right, a single dot.

Many people expect . to be some kind of a shortcut for “source”, and yes, they’re equivalent in , but “source” is not guaranteed to exist in other shells. dash doesn’t have it, for example.

So, if you want to write your shell scripts as compatible as possible, use “.”, not “source”.

jbzfn, to random
@jbzfn@mastodon.social avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines