@manpacket@functional.cafe avatar

manpacket

@manpacket@functional.cafe

A #rustlang programmer with interests in functional programming, category theory and advanced type sorcery

This profile is from a federated server and may be incomplete. Browse more on the original instance.

manpacket, to rust
@manpacket@functional.cafe avatar

Have you ever been stumped by rejecting all your attempts to implement an Iterator trait on a collection directly with values returned by a reference? This is still not possible in 1.80, but the error message should be clearer about it after https://github.com/rust-lang/rust/pull/125407

New diagnostic also covers attempts to add a new lifetime to an associated type if a trait doesn't have one.

juliobiason, to random
@juliobiason@functional.cafe avatar

I have a laptop with Windows (10) just to play games.

Today MS dropped a full screen message saying Windows 10 is not going to be updated, people need to switch to Windows 11 and my computer is not compatible with Windows 11.

Basically, I need to buy new hardware to keep using Windows (just to play games).

If that isn't a huge "buy a Steamdeck" ad, I don't know what it is.

manpacket,
@manpacket@functional.cafe avatar

@juliobiason if games you play work on steam deck - they will probably work on Linux with proton as well. No need to buy anything new.

ekuber, to rust
@ekuber@hachyderm.io avatar

" development is going too fast (because they are stabilizing features I don't care about) and going too slow (because they are not stabilizing features I care about!"

There are only so many contributors, hours in a day, days in a year to get to everything now, and some features are reliant on other, less flashy work that needs to happen before they can be even attempted.

But people are putting in a lot of work, the codebase changes so quickly that it is hard to keep up.

manpacket,
@manpacket@functional.cafe avatar

@ekuber I maintain a tool that uses rustc to do some useful things and I have to apply some workarounds to deal with rustc not providing some of the information. Workarounds lead to behavior confusing to users so I decided to make a fix upstream. I ended up submitting about 5 pull requests - some fixing related bugs and closing existing tickets and one with change I actually care about that depends on the rest. Bugfixes got merged, change I care about was approved more than a month ago but still sits in FCP stage.

manpacket,
@manpacket@functional.cafe avatar

@ekuber but yea, checkboxes are very slow...

rain, to random
@rain@hachyderm.io avatar

I think automatically configuring features based on what's supported locally is just a really bad idea.

One of my first major contributions to Mozilla back in 2008-2009 was ripping out all the code that automatically configured the set of features enabled in Firefox, turning it into errors instead. This meant that everyone knew exactly the set of configure features enabled for a build of Firefox.

https://mas.to/@scvalex/112185125504853603

manpacket,
@manpacket@functional.cafe avatar

@rain heh. Yet there are rust crates with low msrv that cant be compiled with random recent nightly specifically because they detect the fact that they run on nightly and enable features that are either already stable or been renamed. Or even no longer a thing. The problem is still alive in a modern .

zkamvar, to ubuntu
@zkamvar@hachyderm.io avatar

I updated to #Ubuntu 22.04 yesterday and got a little notification that my #apt Firefox was being switched to #snap. Weird flex, but okay.

Today, when I tried to open my local #Rust documentation with rustup doc --book, I got a page that said that the access to the file was denied.

It turns out that #snap prevents firefox opening files in hidden folders and the best workaround is to create a symbolic link to a non-hidden folder. WTH?

https://askubuntu.com/a/1453605/853075

manpacket,
@manpacket@functional.cafe avatar

@zkamvar fwiw Mozilla now provides a repo with native Firefox if you want. My 22.04 is still snap-free.

khalidabuhakmeh, to rust
@khalidabuhakmeh@mastodon.social avatar

Learning to use lazy_static in and found that helps visualize what type you're dealing with when working with pointers and references. Check out the inlay hints. They're great!

Inlay hints changing types

manpacket,
@manpacket@functional.cafe avatar

@khalidabuhakmeh lazy_static is deprecated in favor of once_cell. Bits of once_cell already got into std lib.

gd, to rust
@gd@ruby.social avatar

😎

manpacket,
@manpacket@functional.cafe avatar

@gd there's plenty of bad ones - as soon as you start doing strange stuff.

https://www.reddit.com/r/rust/comments/1aq5yc2/help_with_error_message_from_rustc/

manpacket,
@manpacket@functional.cafe avatar

@ekuber @gd that's a good point. I'm trying to report any ICEs I encounter and after doing Haskell I have higher tolerance to cryptic error message. Link I posted is something I found randomly maybe 30 minutes before this post. I just checked - this specific error message is not reported. will make a ticket shortly.

lapcatsoftware, to random
@lapcatsoftware@mastodon.social avatar

The only difference between Apple locking down iPhones and John Deere locking down tractors is that farmers don’t look for ways to convince themselves that the lockdown is for their own good.

manpacket,
@manpacket@functional.cafe avatar

@alper @lapcatsoftware @tante are those grifters significantly more successful on Android where I can install random stuff?

pyrex, to random

For what it's worth: if you're a person who struggles with cooking, I recommend a few specific recipes:

  • Chili: This is just canned tomatoes, canned beans, any spices you like, and any meat. You can brown the meat or not. (which means "heating up a pot, pouring in about a large spoonful of oil, putting the meat in, and stirring occasionally") Cook on low heat for an hour or so and you're good!

  • Soup: It's the same as chili, but you use water, potatoes, and possibly Better than Bouillon instead of tomatoes and canned beans.

  • Spaghetti: It's the same as chili, except you use canned tomato sauce and tomatoes. Making noodles in a separate pot just requires following the instructions on the box.

  • Roast: Actually, there are a few ways to do this one, depending on whether you want to use an oven or a pot, and depending on whether you have a meat thermometer. Most roast recipes are really easy!

These are all meals that make large portions and can be done in one pot, so the cleanup is easy. They involve very little prep.

The effect of cooking more is that you are not supporting the gig economy and you are probably eating a larger amount of more nutritious food.

Oh, and be sure to salt generously!

manpacket,
@manpacket@functional.cafe avatar

@pyrex Mapo Tofu is surprisingly easy to make if you get ready made mapo tofu base from an Asian grocery or online. Minced beef/pork, tofu, a bit of cornstarch and about 20 minutes of time.

kornel, to random
@kornel@mastodon.social avatar

iOS is showing me Uber Eats ads on my home screen. I don’t have their app.
If this is some kind of a beacon trick, I hope Flipper Zero can broadcast goatse shortcuts.

manpacket,
@manpacket@functional.cafe avatar

@kornel it is probably from apple maps. But goatse idea worth investigating as well.

pyrex, to random

My review of Paxlovid:

  • No side effects except a permanent, extremely strong grapefruit aftertaste. Cannot overemphasize how strong it is and how consistent it is. When I went to bed I tasted it and when I woke up I still tasted it. It's been five hours and I still taste it.
  • Recommended you get other fruits to consume while you're on it if you're not a big fan of grapefruit by itself.
manpacket,
@manpacket@functional.cafe avatar

@pyrex sounds like durian.

kornel, (edited ) to random
@kornel@mastodon.social avatar

Dear contributors:

do
not
reformat
the
code.

It takes a second to run the formatter, but it requires hours to review the massive patch to ensure there aren't any bad changes hiding among all the spaces and brackets moved around.

manpacket,
@manpacket@functional.cafe avatar

@kornel @0xSim In case of Rust projects not having formatting enforced by rustfmt is a huge blocker for me to contribute. My editor is configured to format on save so I don't have to do it by hand. I made several contributions to nix crate. Having to mess with my editor settings and reverting the formatting by hand before merging is not fun.

kate, to rust
@kate@fosstodon.org avatar

deleted_by_author

  • Loading...
  • manpacket,
    @manpacket@functional.cafe avatar

    @kate @mo8it @fasterthanlime argh solves google problems well but not much else. One of the goals is to have minimal binary size overhead. I tried to use it at some point.

    janriemer, to ai

    Aaaaaannnd we have another example of creating bullshit code. 💩

    This time it tries to create a "simple" function that checks if a string is an acronym:

    https://www.youtube.com/watch?v=Fvy2nXcw3zc&t=224s (YT, because timestamp)

    The AI generated code absolutely does not care about at all, so it panics, when you give it a unicode character that happens to not have their char boundary at byte index 1.

    1/2

    manpacket,
    @manpacket@functional.cafe avatar

    @janriemer You can avoid allocations with something like this:

    fn is_acronym(words: &[impl AsRef<str>], s: &str) -> bool {
    std::iter::zip(words.iter().map(|w| w.as_ref().chars().next()), s.chars())
    .all(|l| l.0 == Some(l.1))
    }

    fasterthanlime, to random
    @fasterthanlime@hachyderm.io avatar

    ✨ pro-tip: the APT command to install neovim 0.9.x on Debian bookworm is:

    nix profile install nixpkgs#neovim

    manpacket,
    @manpacket@functional.cafe avatar

    @fasterthanlime @nrab you can take a look into home-manager. In my case not only it installs neovim, it also installs a bunch of plugins, language servers, etc and creates configuration for them all.

    manpacket,
    @manpacket@functional.cafe avatar

    @fasterthanlime @nrab it works as a standalone thing as well. At least the documentation describes how to do it.

    dismantl, to random

    deleted_by_author

  • Loading...
  • manpacket,
    @manpacket@functional.cafe avatar

    @dismantl while there are some "here be dragons" parts in Rust - it's nowhere near as gloomy as author describes

    Adorable_Sergal, to rust
    @Adorable_Sergal@hachyderm.io avatar

    is the Twitter of programming languages

    manpacket,
    @manpacket@functional.cafe avatar

    @Adorable_Sergal is that good or bad?

    soller, to random
    @soller@fosstodon.org avatar

    deleted_by_author

  • Loading...
  • manpacket,
    @manpacket@functional.cafe avatar

    @soller reading thread and comments on the PR - really reminds me recent events with serde in Rust.

    khalidabuhakmeh, to random
    @khalidabuhakmeh@mastodon.social avatar

    I’m running a experiment. Please boost for reach.

    When I say VS Code, what is the first word that comes to mind?

    Please reply, but don’t peek at other people’s responses until you’ve done yours.

    manpacket,
    @manpacket@functional.cafe avatar

    @khalidabuhakmeh looks fancy but I want my vim shortcuts and plugins. Also slow compared to vim.

    tommythorn, to rust
    @tommythorn@chaos.social avatar

    It's not really the compilation speed that is the problem, it's the sheer bloat of [most] applications:

    $ cargo install nu
    ...
    Finished release [optimized] target(s) in 34m 17s

    on a stock 8 GiB Raspberry Pi4B

    That's ridiculous. It's pulling in more than 150 crates. Nu isn't even the worst example, but one I just ran into.

    manpacket,
    @manpacket@functional.cafe avatar

    @mo8it @kornel @tommythorn

    in case of nu shell bloat is very concrete - it depends on multiple versions of multiple sizeable crates:

    % cargo hackerman dupes
    arrayvec: 0.5.2 0.7.4
    bitflags: 2.3.3 1.3.2
    bstr: 0.2.17 1.6.0
    hashbrown: 0.13.2 0.14.0 0.12.3
    indexmap: 1.9.3 2.0.0
    linux-raw-sys: 0.1.4 0.3.8 0.4.3
    phf: 0.11.2 0.10.1
    phf_codegen: 0.11.2 0.10.0
    phf_generator: 0.10.0 0.11.2
    phf_shared: 0.10.0 0.11.2
    quick-xml: 0.28.2 0.30.0
    regex-automata: 0.1.10 0.3.0
    rustix: 0.38.3 0.36.15 0.37.23
    syn: 2.0.23 1.0.109
    terminal_size: 0.2.6 0.1.17
    vte: 0.11.1 0.10.1

    Updating local dependencies without checking if it makes sense usually results in that.

    manpacket,
    @manpacket@functional.cafe avatar

    @mo8it @kornel @tommythorn then you can go with cargo-bloat to see what exactly takes space

    gregorni, to rust
    @gregorni@fosstodon.org avatar

    The Rust is, of course, written in .

    How do you compile it?

    manpacket,
    @manpacket@functional.cafe avatar

    @gregorni using previous compiler which you compile withone before that, all the way down. Original compiler was written in OCaml unless I'm mistaken.

    Term you are looking for is bootstrapping.

    This link might contain something some interesting info: https://guix.gnu.org/en/blog/2023/the-full-source-bootstrap-building-from-source-all-the-way-down/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • InstantRegret
  • mdbf
  • osvaldo12
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • cubers
  • slotface
  • khanakhh
  • kavyap
  • DreamBathrooms
  • anitta
  • Durango
  • everett
  • ethstaker
  • cisconetworking
  • provamag3
  • Leos
  • modclub
  • ngwrru68w68
  • tacticalgear
  • tester
  • megavids
  • normalnudes
  • lostlight
  • All magazines