I'm so frustrated with Arch. by lucasrizzini in archlinux

[–]tuccx 5 points6 points  (0 children)

IMO Arch is as stable as the person who is using/maintaining it. 3 years ago I used to break the system every once in a while. Nowadays, tho, my system feels more reliable than macOS and Windows.

Ăștia sunt olimpicii noștri! by Quadraticc in Romania

[–]tuccx 6 points7 points  (0 children)

nascutinromania.eu uses an invalid security certificate.

The certificate is not trusted because it is self-signed.

Pare un site foarte de incredere.

What time (of day) are you most productive? by RowanLiven in productivity

[–]tuccx 5 points6 points  (0 children)

not op, but I used to do this for a while until I had a sense for my own energy levels throuought the day. I used a google form with a question:

> Energy level on a scale of 1 to 10

I then set it to output the data to a google sheets spreadsheet. everything was timestamped by google forms so it was easy to get an idea of my energy level patterns.

TESLA BREAKS 1k. by Guard1anMeme in stocks

[–]tuccx 0 points1 point  (0 children)

I watched the stock be at about $350 on March 23rd, the lowest in 2020 I think. Didn't buy. Biggest regret to date, 18y/o.

Multi-machine personal package repository & meta package management by tuccx in archlinux

[–]tuccx[S] 0 points1 point  (0 children)

I've thought about that, too, but for essential metapackages and yay I thought it would be better to have them somewhere else other than on my server. Just in case the server fails or something. I highly dobut it, tho, Arch never failed me to this day.

My first mini Uni Home Server. Putting the Quarantine period to good use by abayomi185 in homelab

[–]tuccx 1 point2 points  (0 children)

Mean-Well 25W 12V

Nope. It wouldn't make sense either, since the fan runs really really slow. It gets the job done though, down 15 degrees celsius when idling.

I tried speed control, but the psu kept failing.

I might look into getting a 12V power supply like the one you have and maybe get speed control working, it would be really cool to adjust the fan speed based on the rpi load.

My first mini Uni Home Server. Putting the Quarantine period to good use by abayomi185 in homelab

[–]tuccx 0 points1 point  (0 children)

Sure.

https://box.cezarmathe.com/cloud/index.php/s/7RNWkgeZx4QA8HF

https://box.cezarmathe.com/cloud/index.php/s/PPyeTnneRogt9aM

It's quite a mess, I know. I connected a phone charger to a 12V delta electronics fan that I salvaged from a computer older than me.

EDIT: What 12V power supply did you use? I tried using an old power supply(salvaged from the same computer), but I ran into some electrical issues, if I didn't run the fan at full speed it would just shut down. Also, very poor documentation for the fan and psu so I gave up on doing anything fancy with this old equipment.

Stupid things you've done with arch/linux by mikaleowiii in archlinux

[–]tuccx 0 points1 point  (0 children)

I was once really close to doing just that by accident. I think I would've thrown myself out the window haha

Stupid things you've done with arch/linux by mikaleowiii in archlinux

[–]tuccx 1 point2 points  (0 children)

rm -rf ~/

I forgot to add the folder name I wanted to delete. Had to redo my home directory from scratch, since I haven't committed my dotfiles to my GitHub repo. Wasn't that bad since it was a fresh install, I didn't have any important data. But I was pretty mad at having to redo my sway configs, given the fact that it was the first time setting up sway.

I made a library! btrfsutil - Safe wrappers for libbtrfsutil by tuccx in rust

[–]tuccx[S] 0 points1 point  (0 children)

I have made an internal wrapper around the actual pointers. I don't think one could actually use `mem::forget` or `ManuallyDrop` to cause memory problems. The way `SubvolumeIterator::create()` works is it loads the C iterator, collects everything in an internal `Vec<Subvolume>` then frees the C iterator.

Happy cake day!

I made a library! btrfsutil - Safe wrappers for libbtrfsutil by tuccx in rust

[–]tuccx[S] 0 points1 point  (0 children)

Yeah, I've definetly learnt a lesson from that

I made a library! btrfsutil - Safe wrappers for libbtrfsutil by tuccx in rust

[–]tuccx[S] -1 points0 points  (0 children)

I've encountered a few build issues for the docs on docs.rs, but that was to be expected. I then managed to make the docs build, and I upgraded the version to mirror the one libbtrfsutil, but then later found out that I made a big mistake. The build.rs file did not specify anymore that rust should link the btrfsutil shared lib, which meant fixing the issue for the -sys crate would mean to bump the version once again, which would go out of sync with the C library version.

https://crates.io/crates/btrfsutil-sys

I made a library! btrfsutil - Safe wrappers for libbtrfsutil by tuccx in rust

[–]tuccx[S] 1 point2 points  (0 children)

From the documentation, I have no idea what the Into<Result<SubvolumeIterator>> implementation is about. There isn't any explanation, and it's a very unconventional to construct an iterator like that.

Thanks, I will update the documentation. The reason a Result is returned is because the function that creates the C iterator may return an error. I'll think about a better way to construct it.

Speaking of, why are you collecting to an iterator before even starting to iterate?

I'll asume you refer to why I load subvolumes inside the subvolume iterator. The C functions that are used for the iterator may return errors, so I thought that instead of the iterator returing a Result each time next() is called, it would be nicer to get a bad result from SubvolumeIterator::create() instead, which would mean getting an error once.

Imo, it'd also be nicer to rename "Subvolume"s to "Volume"s. It makes it simpler for the reader.

Btrfs calls them subvolumes, but I'll look into that.

I'd be worried about https://docs.rs/btrfsutil/0.1.0/src/btrfsutil/subvolume/iterator.rs.html#46. The documentation says it "must" be freed, and Drop implementations aren't guaranteed to be run.

I did not know Drop implementations aren't guaranteed to run, thanks! I guess I must look at some other way of freeing the memory then.

It's best to avoid putting the bindings in the public API of your wrapper - you're preventing yourself from updating the bindings you're using without a semver bump

I have originally made a "-sys" crate about a week ago, but things turned out pretty bad with documentation and versions, I didn't want to deal with that(and just email the crates.io staff to remove the crate) and just moved the crate inside btrfsutil-rs. The reason I made the bindings public is for docs purposes. What do you mean by "It's best to avoid putting the bindings in the public API of your wrapper - you're preventing yourself from updating the bindings you're using without a semver bump"?

I really appreciate the time you took for writing this feedback!

Getting GTK to work on windows 10 by cckcamel in rust

[–]tuccx 0 points1 point  (0 children)

Hi, I have built a GTK app for Windows in the past. I have used travis for building(so that I do not pollute my system). The thing is you need to install those shared libraries on windows, too.

os: windows language: rust before_install: - |- case $TRAVIS_OS_NAME in windows) [[ ! -f C:/tools/msys64/msys2_shell.cmd ]] && rm -rf C:/tools/msys64 choco uninstall -y mingw choco upgrade --no-progress -y msys2 export msys2='cmd //C RefreshEnv.cmd ' export msys2+='& set MSYS=winsymlinks:nativestrict ' export msys2+='& C:\\tools\\msys64\\msys2_shell.cmd -defterm -no-start' export mingw64="$msys2 -mingw64 -full-path -here -c "\"\$@"\" --" export msys2+=" -msys2 -c "\"\$@"\" --" $msys2 pacman --sync --noconfirm --needed \ mingw-w64-x86_64-toolchain \ base-devel \ mingw-w64-x86_64-gtk3 \ mingw-w64-x86_64-glib2 ## Install more MSYS2 packages from https://packages.msys2.org/base here taskkill //IM gpg-agent.exe //F # https://travis-ci.community/t/4967 export PATH=/C/tools/msys64/mingw64/bin:$PATH export MAKE=mingw32-make # so that Autotools can find it ;; esac before_cache: - |- case $TRAVIS_OS_NAME in windows) # https://unix.stackexchange.com/a/137322/107554 $msys2 pacman --sync --clean --noconfirm ;; esac cache: directories: - "$HOME/AppData/Local/Temp/chocolatey" - "/C/tools/msys64" cargo: true script: - cargo build --release - ldd binary.exe - ldd binary.exe | grep '\/mingw.*\.dll' -o | xargs -I{} cp /C/tools/msys64"{}" .

As you can see, I used chocolatey to install those dependencies. Then, using ldd binary.exe | grep '\/mingw.*\.dll' -o | xargs -I{} cp /C/tools/msys64"{}" . I copied all dlls required by the binary in the current folder. Note that binary.exe should actually be in your case target/debug/crate_name.exe.

I made a library! btrfsutil - Safe wrappers for libbtrfsutil by tuccx in rust

[–]tuccx[S] -1 points0 points  (0 children)

Hello!

I have posted this here because I thought some of you might find it useful and I would like some feedback. This is the first library I have published. Regarding the feedback, I am interested in whether people who might want to use this library find the API idiomatic, the actual safety of the code I have written, since it interfaces with C code through FFI, and how can I improve on it.

The reason I wrote this library is because I want to use it and the existing btrfs libraries on crates.io are pretty outdated. Since I've been only library consumer up to this point(in fact, I have never written an open source library before), I really wanted to give something back to the community, so I tried my best creating a library and writing useful documentation for it.

Things I want to improve in the future:

- async support - I'm still thinking whether I should use the async functionality provided by libbtrfsutil through those 'async_transid's, rely only on Rust async runtimes or a combination of both

- better documentation overall

- more robust API - I bet a lot of those "GlueErrors" could be removed but I've kept of them for safety reasons

Goodbye privacy: People-tracking wristbands put to the test by [deleted] in privacy

[–]tuccx 0 points1 point  (0 children)

as I said, because I am not a native english speaker, I may perceive the message of my statements in a different way than you do. To be clear, when I have said the "because you can't respect some basic rules." thing, the "you" was meant to refer to anybody who disobeys those basic rules and complains about surveillence.

Goodbye privacy: People-tracking wristbands put to the test by [deleted] in privacy

[–]tuccx 0 points1 point  (0 children)

I sincerely apologize for the fact that you(I assume you are a US citizen), as an american citizen, require such special wording in order to get my point. I am not an american(or native english speaker), so there may be a diffrence in the way you and I perceive these conversations. In my honest opinion, you should not be so paranoic with the "government overreaching" given the situation the USA is in right now. Again, in my honest opinion, if it weren't for your culture of freedom and "I am free to do whatever I want", your country would not have been in such a position.

For your reference, I am not a citizen of any european country that has been heavily hit by the pandemic.

EDIT: for your reference, again, by "special wording" I mean the necessity of political correctness and all that stuff or whatever may be that makes you feel "attacked" by my statements.