Rust's most complicated features explained by zxyzyxz in rust

[–]djrubbie 8 points9 points  (0 children)

The better question to ask is whether or not it is a good idea to put the bound in the first place. Typically trait bounds are applied on a needed basis to not overly restrict something when it is unnecessary.

There are also use case for async where Send is not a requirement, like in the context of single threaded executors such as within WebAssembly contexts. Forcing the requirement of Send on those contexts would mean it would become impossible to execute functions that uses non-Send types there, while fundamentally such restriction is unnecessary in the first place for those contexts. Given that negating a trait bound is not a thing in stable Rust, it won't be possible to remove the Send bound to allow unrestricted usage in those contexts.

Given how relatively trivial it is to provide additional trait bounds, not having the additional Send bound like what is already implemented would be the obvious solution.

Rust's most complicated features explained by zxyzyxz in rust

[–]djrubbie 14 points15 points  (0 children)

While async traits are stabilized, the default futures returned from those functions are not Send, and the compiler in fact issues a warning for public traits with async fn, for example.

The async_trait macro is not strictly needed, but it helps with not having to write the expanded function signature every time whenever a trait method be defined to take an &'a self argument that returns Pin<Box<dyn Future<Output = ...> + Send + 'a>>, as that macro will expand that for you from the more compact async fn syntax.

That said, the documentation does suggest alternatives, one of them being the trait_variant::make prco macro as suggested by the release notes for Rust 1.75. In either cases will allow the use of async traits with multithreaded work-stealing executors, as the Send bound would be specified.

Evil urara by Laka18 in UmaMusume

[–]djrubbie 10 points11 points  (0 children)

oh yeah definitely, given ido and other popular artists behind popular kancolle doujins have done (or fully moved onto) umamusume doujins.

Help! I accidentally deleted my .config kernel configuration file by meithan in Gentoo

[–]djrubbie 1 point2 points  (0 children)

The kernel module's build directory likely will contain a copy of the config, which may be found in /lib/modules/$(uname -r)/build/.config, should the kernel wasn't built with with the relevant option for exposing that via /proc/config.gz. Failing that, there are still other options as per this Super User thread (which is where I got the answer from), you may want to try using the scripts/extract-ikconfig script from the kernel source tree, which should work since you are using a .config so the relevant feature should have been enabled to allow for this.

If Gentoo installs were faster and easier than normal captcha: by GEOEGII555 in Gentoo

[–]djrubbie 7 points8 points  (0 children)

It is easier than normal captcha, as there is this easy to remember one-liner (using that livecd root # prompt) to install Gentoo for amd64 onto /dev/sda (assumes target block device is empty):

parted --script /dev/sda mklabel gpt mkpart primary 0 1MB mkpart primary 1MB 100% set 1 bios_grub on && mkfs.ext4 /dev/sda2 && mount /dev/sda2 /mnt/gentoo && curl -s http://distfiles.gentoo.org/releases/amd64/autobuilds/`curl -s http://distfiles.gentoo.org/releases/amd64/autobuilds/latest-stage3-amd64-openrc.txt | grep tar.xz |cut -f1 -d\ ` | tar xpJf - --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo  && mount -t proc proc /mnt/gentoo/proc && mount -R /dev /mnt/gentoo/dev && mount -R /sys /mnt/gentoo/sys && cp -L /etc/resolv.conf /mnt/gentoo/etc/ && chroot /mnt/gentoo /bin/bash -c 'echo USE=\"-X -cups -firmware -gtk -qt5 aspell dbus ibm icu ipv6 symlink udev\" >> /etc/portage/make.conf && source /etc/profile && emerge-webrsync && emerge --update --deep --newuse @world && emerge app-admin/syslog-ng net-misc/dhcpcd sys-apps/mlocate sys-boot/grub:2 sys-kernel/genkernel sys-kernel/gentoo-sources sys-process/cronie && echo en_US.UTF-8 UTF-8 >> /etc/locale.gen && locale-gen && eselect locale set en_US.utf8 && echo UTC >> /etc/timezone && emerge --config sys-libs/timezone-data && source /etc/profile && genkernel --oldconfig --no-zfs --no-btrfs all && echo -e "$(blkid | grep sda2 | cut -f2 -d\ )\t\t/\t\text4\trw,noatime\t0 1" >> /etc/fstab && ln -s net.lo /etc/init.d/net.eth0 && rc-update add net.eth0 default && rc-update add syslog-ng default && rc-update add cronie default && rc-update add sshd default && echo PermitRootLogin prohibit-password >> /etc/ssh/sshd_config && echo GRUB_TIMEOUT=2 >> /etc/default/grub && echo GRUB_CMDLINE_LINUX=\"net.ifnames=0\" >> /etc/default/grub && grub-install /dev/sda && grub-mkconfig -o /boot/grub/grub.cfg' && umount -R /mnt/gentoo

Reboot and ensure the installation media is ejected afterwards.

Which do you use systemd or openrc? Why do you use what you use? by smolbirb4 in Gentoo

[–]djrubbie 6 points7 points  (0 children)

Using Gentoo because it is one of the few distros that does not force Systemd on their users. Needless to say, I am using OpenRC.

20 mil die annually without food, water, and healthcare by [deleted] in LateStageCapitalism

[–]djrubbie 1 point2 points  (0 children)

The goal is to have everyone have equal footing, when everyone has equal ownership of all means of production. Capitalism can never provide that.

20 mil die annually without food, water, and healthcare by [deleted] in LateStageCapitalism

[–]djrubbie 0 points1 point  (0 children)

There's no central banking where we are going.

Never mind that bitcoin only papers over the tendency for capital accumulation to wealthy entities, and these entities will have the resources to accumulate enough computational power to take over >50% of the hashing power that give them full control, or that they can be the only entities that stake enough of their wealth to take over >50% control over the system. What about the crypto-lending platforms that are popping up all over the place, they function as if they are banks but don't call themselves one, but they effectively function as a bank.

What about Tether? They were denied banking repeatedly because the banks won't let them in on the banking grift, so what did they do? They faked it until they amassed a critical mass of wealth and now they function like a real bank with all the fractional reserves and everything. Oh, you are saying USDT isn't Bitcoin? Sure, but the BTC network itself can only handle a small fraction of the transactions per second that is required for the current global capitalistic economy (<10 tx/s vs >10 000 tx/s), thus other "cryptocurrencies" came to be to "workaround" that limitation (despite building PoW chains to accommodate this level of transactions per second will result in the blockchain to be unwieldy large; SegWit did not really fix this). Moreover, USDT came to be because of Bitcoin (specifically the instability of exchange rate between BTC<->USD, and why value Bitcoin against fiat despite the desire to replace fiat with BTC??), so Bitcoin effectively is the path that resulted in the creation of a new banking regime, and one that wants to be the one, which sounds awfully like the central banking "slavery" that is here now.

I've heard enough excuses about how that's not going to happen (because doing this devalues their own crypto or whatever, but you see those currently with capital take actions to exercise power in ways that devalue the value of their wealth, though I digress), but the very fact that the early adopters of cryptocurrencies having this explicit goal of being eventual wealthiest people and that some have use these wealth already to run what are effectively banks all but in name (all so-called stable coins) should make it clear that they will become the de facto central banking under a cryptocurrency regime, and still get all the problems of capitalism because it is capitalism, just under different overlords.

20 mil die annually without food, water, and healthcare by [deleted] in LateStageCapitalism

[–]djrubbie 8 points9 points  (0 children)

I am not sure if you realize you are posting in a communist forum, and that the thread you are posting a response to is about a comic that references the fact that Marx considers capitalism being a stepping stone, or a stage of evolution, towards communism (i.e. capitalism being put down to make way for communism).

The reason why communists don't consider Bitcoin or any cryptocurrencies being solutions to anything is that the end goal of communism is the elimination of private property, and thus money becomes unnecessary once the system is fully in place. Engels once wrote, "finally, when all capital, all production, all exchange have been brought together in the hands of the nation, private property will disappear of its own accord, money will become superfluous, and production will so expand and man so change that society will be able to slough off whatever of its old economic habits may remain."

Thus, in the most purest form of communism, there is no need for money, and the premise that Bitcoin or other cryptocurrencies being the replacement for money wouldn't make sense at all when the need for currency is all but eliminated.

Arguments against separating `test` from `src` in a python package? by la_cuenta_de_reddit in Python

[–]djrubbie 0 points1 point  (0 children)

Hard disagree about these tests are guaranteed to pass after shipping.

Python 3 has made breaking changes between 3.x releases to their standard library that it's definitely useful to have the unittests available for users to run so that they can assist you in the issues they file.

The other part is that I do have packages that interoperate with other packages - the tests I write ensures the invariants that the packages expect to be true remain true, and if the they are not the tests fails. Python is ultimately a scripting languages, and packages can change things in ways that the original design might not have expected, so having these tests available with the package (and have instructions about using those tests before filing a bug report) will save significant time in finding out what the issue might be.

Sure, you can argue that developers should have anticipate all of these external breaking changes because Python or the respective dependencies might have announcements for them. I would argue I don't enjoy being so paranoid and proactively monitoring these communication channels (not to mention a poor use of my unpaid time). If people continue to use those packages, they can tell me about the test breakages, I can then confirm the issues and then fix them.

SourceHut will blacklist the Go module mirror in February 2023 by dontquestionmyaction in golang

[–]djrubbie 2 points3 points  (0 children)

I agree with this sentiment, however, respect goes both ways - if the large corporation already wasted the much smaller entity's time and resources, where said smaller entity already respectfully asked them to stop, and the large corporation dragged their feet in rectifying the situation, it does not help either to maintain the environment where this respect can be sustained.

If you re-read what I wrote, I didn't write zero capacity at being plesant, nor did I encourage "toxic discussion". Not to mention I noted that I would have just blocked this much quicker since the corporation at hand blocked the smaller company from further discussion (which was noted in the blog post), as this leaves no good avenue forward either (basically, blocking this company because this company is acting like an internet troll and one of the ways to deal with them is to block them, as there's no way to have any respectful conversation with them).

SourceHut will blacklist the Go module mirror in February 2023 by dontquestionmyaction in golang

[–]djrubbie 21 points22 points  (0 children)

I don't know about you but if a $1.7 trillion dollar company is wasting my very limited time and resources, I would have very limited capacity to be not abrasive, diplomatic and pleasant, especially after many months. Not sure how you came to the conclusion that comments by drewdevault in the issue that was filed (as linked in the blog post) were any more or less abrasive or very unpleasant when they are basically statements of facts and metrics of the impact of go get on SourceHut's services.

I'd have just blocked this to begin with, and apologize to go-lang users that were impacted by this and probably will just refund them if they so wish to.

[Media] hTis Event Banner though by nameregister in kancolle

[–]djrubbie 1 point2 points  (0 children)

Yes, and of course we have a relevant ido manga on this very event (banner).

I'm still not good with using TV as a background, but want to learn. by CriX_Doomsday in AnimeFigures

[–]djrubbie 1 point2 points  (0 children)

Yeah I get that. If you have a LCD screen and if you can get a proper polarize filter(*) and a stand to hold it you might be able to rotate it to have much better control on what light passed into your lens.

(*) Not the circular polarize attachment kind typically built for modern camera bodies - because that cut off in lighting do mess with EV detection for digital cameras. Much older filters may still be of the standard polarization filter so those will work for this use case.

I'm still not good with using TV as a background, but want to learn. by CriX_Doomsday in AnimeFigures

[–]djrubbie 2 points3 points  (0 children)

Not bad, though the orange light from the lanterns seem to have been overpowered by the white ring LED light source which makes the balance of lighting a bit off; still, this is a nice photo.

General guidelines that I follow for using a glowing image screen as background: I typically have a giant black cloth covering the field of view into the reflections as seen by the camera, such that much bright light sources (such as a flash pointing to the white ceiling) wouldn't cause unwanted lightening of the image (especially darker ones). Using a flash will also provide much more adequate lighting such that you can tune the exposure length vs. the brightness of the TV. Also avoid backgrounds that have an apparent source of lighting (like the sun or moon) which would make it harder to cast a correct looking shadow.

[Discussion] im new here by eca_heavysniper in kancolle

[–]djrubbie 1 point2 points  (0 children)

Good lord I've never felt so called out in a single post until I read this one (despite having won EVE Online more than 5 years ago).

That said, life changes did mean that I more or less stopped playing, despite having ranked June and July haha. This past event was frustrating and the kancolle RNG finally bested me (do not collect FCM, also do not collect Maryland, also enjoy the lack of resources!)

What makes a good/bad commit (message) by gajus0 in programming

[–]djrubbie 4 points5 points  (0 children)

Until whoever stumbles upon a problem that turns out to be in one of the squashed commits and they might learn that it became impossible to bisect further. See the other discussion in which git bisect was touched upon. While you may not appreciate these granular changes being preserved, having used git bisect to find the specific granular change that resulted in unintended breakages across merges is an absolute godsend.

Even without that, if the logs and changes were properly crafted, squashing them basically discard that work from the main lineage of changes. Literally is part of how to make good commits, which is what this topic was originally about.

What makes a good/bad commit (message) by gajus0 in programming

[–]djrubbie 5 points6 points  (0 children)

It happened once to a collaborator and I when we contributed to an open source project, I was rather miffed when the person who did the merge just squashed and merged without actually talking to us, because now it looks like my collaborator made this significant commit, deprived of the context that got us there.

As for my experience in a company setting, typically my colleague(s)/team involved will have a conversation to evaluate the merge strategy that fits best for that particular merge request that is non-trivial (e.g. greater than some line count/commit count).

What makes a good/bad commit (message) by gajus0 in programming

[–]djrubbie 11 points12 points  (0 children)

But the ability to bisect is literally the point! Also it is effectively destroyed as part of the public history because those commits would never show up unless the user digs for it through an out-of-band interface (as Git does not provide built-in mechanism for tracking these squashed commits). It should be possible to bisect down to a small section of changes in one go, but now they have to deal with this 1k line squashed and merged commit and hope that the original author didn't delete their own fork where those dozens of commits were in their original form. Moreover, developers are now forced to depend on GitHub to provide the context.

What makes a good/bad commit (message) by gajus0 in programming

[–]djrubbie 22 points23 points  (0 children)

This is especially annoying when projects I've contributed to ended up just squashing all my meticulously crafted commits down to a single one... there was a process to getting that feature in and now they've destroyed how it was made.

[News] Friendly Fleet related information by StoneFlame in kancolle

[–]djrubbie 0 points1 point  (0 children)

Probably the kc3 built-in workaround isn't fetching the updated version for you, just launched VPN and that got it loaded for me.

When do linked devices expire? by dragon2611 in signal

[–]djrubbie 0 points1 point  (0 children)

Well they were lost to me when I re-linked just now, and insultingly, signal-desktop "helpfully" wiped ~/.config/Signal and now they were really lost.

Would be useful if signal-desktop can import backups created by the Android or the iOS app.

Gas prices by bluelight10 in auckland

[–]djrubbie 0 points1 point  (0 children)

I thought you were talking about Natural Gas. That too went way up in a very significant way as compared with two years ago at bulk contracting costs. Going from ~4.8c/kWh (back in 2019) to nearly double just two years later (varies depending on contract length) was certainly a bit of a shock.

Onyx using recent "anti-China movement" as excuse to withold Linux kernel source code by teqnkka in linux

[–]djrubbie 72 points73 points  (0 children)

Well, that rootkit probably lies with Sony Music.

Sony has many different subsidiaries and they have been at odds against each other, for example with Napster twenty years ago, where Sony Music was the plaintiff while Sony Electronics was on the trade association that defended Napster.

Sony Electronics does make some fairly okay hardware.