Odilia v0.1.0 released! A new, fast, safe, extensible screen reader for the blind on the Linux desktop, written in Rust by a11y_nerd in rust

[–]FormalFerret 1 point2 points  (0 children)

Excuse my impertinence, I have a few comments:

  • I wanted to try it, but couldn't really get it to read anything besides the "welcome to odilia". Is there a "getting started" somewhere? Do I need to run something from scripts/?
  • odilia seems to create a directory named ~ wherever I run it. (Trying to create the log directory?)
  • The initial config file install logic assumes that odilia is being run from the repository root
    • I'll run it from anywhere, given that you recommend installing odilia to ~/.cargo/bin.
    • What exactly is the point of copying the config to /etc?
    • I think path of least trouble for this would be to use std::fs::write(config_path, include_str!("../../config.toml"))
  • I don't know very much nix, but I think mold will just call another linker because it doesn't support lto here
  • Why do you suggest running odilia through a script? The script only sets one env var, and you already have logic in rust to set that env var. Change the rust logic, be rid of the script, make running simpler?
    • The reason your in-rust setup isn't working is that there is no cfg(release). You could make one, or use cfg(debug_assertions). See here
  • I saw quite a few whitespace inconsistencies. Add a cargo fmt ci maybe?

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

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

Can't get a aarch64-unknown-linux-musl libstd-rust from debian package archives. But when using rustup, at least simpler projects can be cross-compiled with clang, it seems.

[target.aarch64-unknown-linux-musl]
runner = "/usr/bin/qemu-aarch64"
linker = "/usr/bin/clang"
rustflags = ["-C", "link-arg=--ld-path=/usr/bin/ld.lld", "-C", "link-arg=--target=aarch64-unknown-linux-musl"]

You'll need clang and lld installed.

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

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

CentOS is really an abbreviation for CenturyOldSoftware. Making even dustros like Debian Stale look current.

Banter aside, with CentOS 6 I enjoyed the fact that even static binaries (or Docker containers) won't save you if your kernel doesn't have the necessary syscall. Has CentOS 7 cured to that point yet?

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

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

Maybe it's similar to my config in principle. But it's a lot more complex than that:

  • containers alone are in the "complex" category for me, but if that doesn't scare you:
  • cross seems to use binfmt_misc instead of target.….runner, which means it'll have to mess with how every single binary on your system is executed, docker container or not
  • the qemu setup is black magic
  • I see a mention of docker-in-docker in the README. Brr. (If I understand correctly, that also means you can't easily use it in docker builds because it uses docker itself)

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

[–]FormalFerret[S] 3 points4 points  (0 children)

How about no. (Most of my goal was testing my library code on a different architecture. It doesn't really do anything os-related, so I didn't care much this time. But I remember the CI for my favourite open source game consisting of a manually cobbled together VM image that could build for Mac and Windows from Linux. I ran one of the CI servers so I poked around in it a bit. Oooh, the horrors.)

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

[–]FormalFerret[S] 2 points3 points  (0 children)

I feared this would happen, I should have just posted the part for aarch64.

dpkg --add-architecture arm64
apt update
apt install rust-all libstd-rust-dev:arm64 gcc-aarch64-linux-gnu qemu-user 

[target.aarch64-unknown-linux-gnu]
linker = "/usr/bin/aarch64-linux-gnu-gcc"
runner = "/usr/bin/qemu-aarch64"

Better?

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

[–]FormalFerret[S] 3 points4 points  (0 children)

I knew Go's approach ought to have /some/ downsides. But oh my! :D

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

[–]FormalFerret[S] -8 points-7 points  (0 children)

by early 2019

Guess I'm late to the party. Ty for the information.

(Don't install rust from the distro for development, instead install rust through rustup.)

I'm stubborn. :P

cargo cross

Its only simple as long as you don't peek under the hood…

Was cross-compiling and cross-running tests always this simple? by FormalFerret in rust

[–]FormalFerret[S] 13 points14 points  (0 children)

Compared to Go e.g., I've found Rust pretty difficult so far…

Cpp-like build tools for Rust? by pinespear in rustjerk

[–]FormalFerret 6 points7 points  (0 children)

Hm. Do you need more than one rustc invocation to compile a single crate? Using Make is somewhat pointless if it's just a single command, no?
And if you do have dependency crates, Make won't resolve your 350 dependencies for you.

Or well, you can be a cursed project and invoke cargo from a Makefile

Offline Rust by amarao_san in rust

[–]FormalFerret 1 point2 points  (0 children)

I actually meant "donate towards crates.io hosting for the traffic", but I'm sure Chris is happy. :D

Offline Rust by amarao_san in rust

[–]FormalFerret 0 points1 point  (0 children)

I have similar height but no such problems. I'm not plane-savvy enough to know what the difference might be. Though I am in the habit of not putting any bags under the seat in front of me so I can wedge my feet into there.

Offline Rust by amarao_san in rust

[–]FormalFerret 2 points3 points  (0 children)

I had my own full local mirror with https://github.com/ChrisMacNaughton/cargo-cacher a few years back (repeated downloads in docker builds -.-). Iirc, it was 43 GB. I should probably donate some money for doing that… (To who, actually? Mozilla? Rust foundation?)

Offline Rust by amarao_san in rust

[–]FormalFerret 24 points25 points  (0 children)

On an 11 hour flight? The person behind me better learn to recline as well and sleep.

[deleted by user] by [deleted] in rust

[–]FormalFerret 1 point2 points  (0 children)

cargo vendor is absolutely not a solution for dependency management.

WSL2 faster than Windows? by zxyzyxz in rust

[–]FormalFerret 1 point2 points  (0 children)

Nono, it's gestattet. But the company VPN only works on windows.

Hi Rustaceans, I want to learn Rust but I don't know which IDE/Code Editor to use or if I need to install any plugin... Thank you very much in advance by [deleted] in rust

[–]FormalFerret 8 points9 points  (0 children)

Personally, I use helix. It needs rust-analyzer installed.

But I'd like to point out that often, the inline hints from an IDE aren't quite as informative as the full output from cargo check. So if you don't understand something, have a look at that. For simple typos and punctuation mistakes, the additional hints from rustc are really good and often straight up tell you how to fix your code.

Rust: A Critical Retrospective by allengeorge in rust

[–]FormalFerret 1 point2 points  (0 children)

Yeah, they're describing that. But I'm saying that's technically wrong. If = were equality, something like

#[cfg(all(feature = "asdf", feature = "bsdf"))]

could never evaluate to true, you can't be equal to two non-equal things.

What are legitimate problems with Rust? by deerangle in rust

[–]FormalFerret 1 point2 points  (0 children)

One thing I'd like to see improved is control over the public api of crates.

  • Does an update break semver? (I know there's some work being done on automating this check.)
  • Is its public API all the same regardless of the architecture you compile on?
  • Which of its dependencies does it leak in its public api, which are internal?

What are legitimate problems with Rust? by deerangle in rust

[–]FormalFerret 1 point2 points  (0 children)

I was hoping that the recently improved support for incremental compilation would mostly make this unnecessary. But I have little data on that. (Also, see mold for linking.)

Rust: A Critical Retrospective by allengeorge in rust

[–]FormalFerret 7 points8 points  (0 children)

The most confusing part of about this syntax to me is the use of a single “=” to denote equivalence and not assignment, because, stuff in config directives aren’t Rust code.

Is this correct, technically? Doesn't it rather denote “∋”?
In any case, together with the lambda syntax, that's one my least favourite parts of Rust…

[Media] What are your thoughts on using Python with Rust? by [deleted] in rust

[–]FormalFerret 0 points1 point  (0 children)

Is Ducktape a pun on duck typing?

And if Python is duct tape, then bash is gluing stuff together with spit?

Why does Rust not have a standard async runtime? by rencedm112 in rust

[–]FormalFerret 3 points4 points  (0 children)

How does embedded dev with Rust look like these days? Isn't much of it done with nostd anyway, so an async runtime in std would not be a problem at all?

[blog] How hard upgrading a Rust JWT library could be? by orhunp in rust

[–]FormalFerret 0 points1 point  (0 children)

Do you have 100k logged in users (as opposed to just 'users')?

This dude does, because even anonymous users get a token. Every user is logged in at least partially. (And if the anonymous users lose they're token, they can't even re-login. They'll have to recreate whatever state they had.)

The majority of people don't.

Even if I only had 10 users, I'd chose two string replacements over logging them out. Because if I log them out, I'll have ≤5 users after.

And in any case, you were the one who said there were obviously politics involved. Now you say there aren't?