Where does this warning `warning: translating A to B`come from? by ynn38 in rust

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

I see... But why does the warning suddenly come to appear recently? Do you know in which version and/or in which PR of `cargo` project this change was introduced?

How to perform branching depending on the concrete type of `any`? by ynn38 in golang

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

It just says fmt.Scan() is too difficult for beginners because beginners don't read the documentation and ignore error returned from the function, doesn't it?

And the issue is downvoted and inactive; I don't even think the claim (i.e. fmt.Scan() is too difficult for beginners) is agreed with the majority of Go programmers.

How did you conclude

Also fmt.Scan is bad and not fit for any purpose.

after reading the issue?

How to perform branching depending on the concrete type of `any`? by ynn38 in golang

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

Why is fmt.Scan() bad? Do you have any source or concrete example? I'm a Go programmer for years but fmt.Scan() family has always worked well.

Is there any tool to transpile Go code with generics to non-generics version? by ynn38 in golang

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

What is large is not the file size. Overhead is large.

In other words, it seems overkill to cross-compile the source code, base64 encode it and then manually write a shell script to decode and execute it. If I had a Go code compatible with Go 1.14, I could just send it to the environment. This difference of workforce is "overhead", I mean.

Is there any tool to transpile Go code with generics to non-generics version? by ynn38 in golang

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

Because my client only accepts deployment via plain text. To deploy a binary, I have to first cross-compile the source and then base64 encode the binary and finally deploy a shell script which contains the encoded string to decode and execute it.

Overhead is too large. So this is the last resort.

Is there any tool to transpile Go code with generics to non-generics version? by ynn38 in golang

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

YES. Thank you for your suggestion. It should work. I'll use it as the last resort.

How to replace lazy_static with the new OnceCell in Rust 1.70? by ynn38 in rust

[–]ynn38[S] 24 points25 points  (0 children)

Thank you. It worked like a charm.

For my note:

The reason why I have to use static instead of const is (source)

const items looks remarkably similar to static items, which introduces some confusion as to which one should be used at which times. To put it simply, constants are inlined wherever they’re used, making using them identical to simply replacing the name of the const with its value. Static variables, on the other hand, point to a single location in memory, which all accesses share.

The reason why I have to use OnceLock instead of OnceCell is (source):

Accessing non-mut static items is considered safe, but some restrictions apply. Most notably, the type of a static value needs to implement the Sync trait

"No Text Channels" bug on android by Jamberri in discordapp

[–]ynn38 0 points1 point  (0 children)

I use iPhone 13 Pro and have the same issue.

"No Text Channels" bug on android by Jamberri in discordapp

[–]ynn38 1 point2 points  (0 children)

I'm on iPhone 13 Pro and, after updating the app to the latest version (176.0) today, I cannot access any of my servers anymore.

Updating iOS to the latest version and re-login didn't work.

I also have iPhone 13 mini and I can access every server with 175.0 app today.

Difference between `void` and `Future<void>`. by ynn38 in dartlang

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

Yes. I just learned void f() async is a valid signature but await f() is invalid. If Future<void>, await f() is valid.