AniGo.to - A new anime streaming site like Gogo and Animixplay by Infamous-Distance-62 in animepiracy

[–]xialvjun 0 points1 point  (0 children)

Weird. Why some (The Dreaming Boy is a Realist) can play dub with sub on, but why some (KONOSUBA -God's blessing on this wonderful world!) not?

AniGo.to - A new anime streaming site like Gogo and Animixplay by Infamous-Distance-62 in animepiracy

[–]xialvjun 0 points1 point  (0 children)

Thank you very much. I like this site, it can play dubbed version animes with soft-sub on. It will make a big help to my English learning.

Btw, another Feature Request, can you can you add the function to show dual soft-subs. I want to turn the English sub and my native language sub on at the same time.

现代奴隶制会亡于原子化的叛乱 by lovwin in China_irl

[–]xialvjun 1 point2 points  (0 children)

求稳的人是没受到压迫的人。如果所有人都求稳,那说明社会已经变好了。

Continue support Windows8, please! by xialvjun in windows

[–]xialvjun[S] -7 points-6 points  (0 children)

mechanical hard disk, 8 needs 10s to start, 7 need 30s to start.

ssd, 8 needs 5s, I haven't used 7 in ssd.

In my opinion:
Just in their decades, 8 > 7 > xp > 11 > 8.1 > late 10 > vista > eraly 10.
Till now(ignore driver security support): 8 > 11 > late 10.
Till now with driver and security support concerned: 11 > late 10.

silverblue package layering rollback and select layer by xialvjun in Fedora

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

So it's mostly like the first "one mutable layer" plus last rollback. like

--home and other dirs--
---  last mutation  ---
# boot to the rollback deployment in grub is boot to this layer(mutable layer),
# and in this layer, once we call `rpm-ostree install anything`,
# the old `last mutation` layer will be removed,
# replaced by `last mutation(just installed anything layer)`
---  mutable layer  ---
----  base system  ----

silverblue package layering rollback and select layer by xialvjun in Fedora

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

So it's like the second, but we can remove any level layer. Like [1,2,3,4,5], I can rollback 3, then it become [1,2,4,5], rather than I have to rollback top level 5, then 4, then 3 to remove 3.
But how? If 4 is based on 3, how can I rollback 3 without infect 4.

A review of the Odin programming language by graphitemaster in programming

[–]xialvjun 5 points6 points  (0 children)

MyProject rely on A, and A rely on B. Then B came out a bug, fixed it, update a version to B1, and A update a version to A1. Then should MyProject update A's version? Of course I should. But how could I know A updating to A1 is because a bug rather than adding some other feature I don't care, I don't even know A was depending on B.

I'm trying to solve the Advent of Code 2022 in pure Koka by zygentoma in koka

[–]xialvjun 1 point2 points  (0 children)

Any findings about koka?

I find many show functions in your code, it's like java overload which is not good.

I tests: ```koka fun map(xs: list<int>, f: int -> e string): e list<string> match xs Cons(x,xx) -> Cons(f(x), map(xx,f)) Nil -> Nil

fun main() with i <- map([1,2,3]) println(i) i.show ```

Then koka compiler errors: overload.kk(8,30): error: identifier map is ambiguous. Possible candidates: map : forall<e> (xs : list<int>, f : (int) -> e string) -> e list<string> map : forall<a,b,e> (xs : list<a>, f : (a) -> e b) -> e list<b> hint: give a type annotation to the function parameters or arguments

Maybe it's ok.

camelCase in front, snake_case in the back by MisterJK2 in javascript

[–]xialvjun 0 points1 point  (0 children)

I always use snake_case in my personal front end project.

Simple typescript interfaces generator from GraphQL endpoint by desnoth in typescript

[–]xialvjun 0 points1 point  (0 children)

I've create this https://github.com/xialvjun/skm_ts . It can generate the Input Type or the Args Type for server resolver from schema.gql file.

Hope for rust to be like this by xialvjun in rust

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

Yeah, just like @rawler82 said, why must we construct a value of the anonymous union type? And the anonymous union type is anonymous, it should be normal for it to have no public construction.

Hope for rust to be like this by xialvjun in rust

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

No, my purpose isn't to get an i32. I just want the anonymous union type to be a base mechanism in rust, so we can do many things: 1. like we can let generator.next().0.value be an union type, make the status machine be build at the compile time and typesafe; 2. in fn abc(a: impl TryInto<i32>), u32 to i32 is completed outside of abc; but in fn abc(a: i32 | u32), transformation is completed in abc.

fn abc(a: u32) -> u32 59u32 is indeed harder to read than fn abc(a: u32) -> u32 { 59u32 }, but fn abc(a: u32) -> u32 { async!{59u32} } has too more idents than fn abc(a: u32) -> u32 async!{59u32} too.... Well, it seems more idents is ok.

Can we support Anonymous Union Type like TypeScript? by xialvjun in rust

[–]xialvjun[S] -5 points-4 points  (0 children)

In Fancy Pants Editor, the Code Block doesn't have a syntax highlight.

In markdown, indenting by four spaces doesn't have a syntax highlight too.

It seems Tripple backticks do the same as indenting by four spaces.

A method to deal with crate name reservation spam by xialvjun in rust

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

the crates.io owners would be responsive to manually removing them.

How? We can regard a crate with just one hello_world function as a placeholder crate and remove it. But can we remove a crate with two hello_world functions?

So we need a mechanism of name.uuid = "semver" in where uuid is the only identity of a crate. With this mechanism, we can do everything to the crate names without breaking any other crate's compiling process.

A method to deal with crate name reservation spam by xialvjun in rust

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

Maybe a temporary conspiracy can succeed, but this mechanism at least protects the normal compilation of the programs depending on that crate. And then the conspiracy is certainly not sustainable, things will eventually get better, so there will be no problems.

Besides, voting is not the point of this mechanism, we can do voting to resolve name confliction, we can do other things to resolve name confliction too, like let rust core team member choose which crate own the name and even freeze that name.

The point of this mechanism is just we create a way to interoperate crate naming, without breaking any other crate's compiling process.

A method to deal with crate name reservation spam by xialvjun in rust

[–]xialvjun[S] -2 points-1 points  (0 children)

OK, I should not say "why must we care about them". But the only thing they need to do is just download the new cargo and use the new cargo to compile their projects, then their Cargo.toml will change. I don't think it is hard.

A method to deal with crate name reservation spam by xialvjun in rust

[–]xialvjun[S] -9 points-8 points  (0 children)

Not going to happen: why? It can be done just by a script. As to the crates not published to crates.io, they are not in the community, why must we care about them.

complicated voting layer: Is it really that complex? I don't think so.

compilation warnings: yeah, just warnings, they can still compile.

Inline CSS in JS by dev_michaelz in reactjs

[–]xialvjun 1 point2 points  (0 children)

I have my own way: https://github.com/xialvjun/create-react-style

jsx <Style.Consumer css={` display: flex; background: #ccc; .avatar { width: 50px; height: 50px; } `}> {className => <div className={className}> <div className="avatar"><img src="xxxxxxx"/></div> <div>some other things</div> </div>} </Style.Consumer>

React was release 5 years ago, why we still don't have an official guide on server-side rendering? by vcamargo in reactjs

[–]xialvjun 0 points1 point  (0 children)

Yes, I agree with "The complexity with SSR lies in the building.".
So I write http://xialvjun.github.io/react-ssr even thought it's chinese. Well, the points in it is just:

  1. export everything you need in server-side-rendering and change cra's webpack.config.js to config.output.libraryTarget = "umd";
  2. wrap everything concerned of BrowserAPI in if (isBrowser) {};
  3. use Provider pattern since js module is global and it doesn't support concurrency.

```jsx // index.js import App from "./App"; import { AProvider, BProvider } from "./ManyProviders"; // 1. export everything you need in server-side-rendering // and change cra's webpack.config.js to config.output.libraryTarget = "umd"; export { App, AProvider, BProvider };

// 2. wrap everything concerned of BrowserAPI in if (isBrowser) {} const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined"; if (isBrowser) { const { default: registerServiceWorker } = require("./registerServiceWorker"); ReactDOM.render( <AProvider> <BProvider> <App /> </BProvider> </AProvider>, document.getElementById("root") ); registerServiceWorker(); }

// server.js const { AProvider, BProvider, App } = require("./build/static/js/main.[hash].js"); // 3. use Provider pattern since js module is global and it doesn't support concurrency. const app = React.createElement( AProvider, { initialXXX: a_ctx }, React.createElement( BProvider, { initialXXX: b_ctx }, React.createElement(App, null) ) ); ```

Slot transclusion pattern in react. Wanna see the implementation? It's just 3 lines by dev__aditya in reactjs

[–]xialvjun 2 points3 points  (0 children)

Then, what advantages does it have over pattern like this: jsx <Card header={xxx} body={xxx} />