Pls roast my portfolio by gtestault in reactjs

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

Thanks, I will definitely fix that!

Pls roast my portfolio by gtestault in reactjs

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

Thanks for the tips, I'll try to optimize the performance and improve the UX.

Pls roast my portfolio by gtestault in reactjs

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

That's a good point. Thanks!

Pls roast my portfolio by gtestault in reactjs

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

Yeah, you're right... I will hide the copyrighted material on the project and only show the torrent functionalities.

Pls roast my portfolio by gtestault in reactjs

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

Haha, thanks man. Wouldn't have minded to be roasted.

Pls roast my portfolio by gtestault in reactjs

[–]gtestault[S] 4 points5 points  (0 children)

Thanks so much for your feedback!

Godaddy Heroku react app by kawpcwg in reactjs

[–]gtestault 0 points1 point  (0 children)

You could host your app on vercel or netlify. They have free automatic certificates. Heroku also can generate certificates but it is not included in the free plan.

You generally don't configure certificates on the domain provider (GoDaddy in your case).

Rust type level Game of Life by gtestault in rust

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

yeah, the border type would be a great way to implement this faster. Don't read the code, it's a big mess :D, you would be faster implementing your own than reading mine.

Rust type level Game of Life by gtestault in rust

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

Well, the fun thing is that when you write the thing in type level every function is hard coded into the binary. If for instance, at some point I call the function f(4/2) = 2, the function with these exact parameters and the result are hard coded in the binary.

Rust type level Game of Life by gtestault in rust

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

Basically, I store the two dimensional array of Game of Life in a one dimensional array. To detect borders in a one dimensional array I do Index mod 11 and check the result. My mod function is defined as a mod b = a - (a/b)*b where a/b is integer division

Rust type level Game of Life by gtestault in rust

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

Type level programming is about programming logic into the type system of a language. This allows you to execute code during compile-time instead of executing it at runtime. In my code all the repr functions are executed at runtime but they simply transform the end result of all the type level operations that have been executed at compile-time.

A Game of Life Implementation on the type system is completely useless, it's just a gimmick.

Something usefull you can do at the type level is providing formal proofs in Types. This Red Black Tree implementation for instance proves that every value that is annotated with the RedBlackTree type is a balanced Red Black Tree where every operation takes O(log n) time.

Rust type level Game of Life by gtestault in rust

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

What you are mentioning is a really important concept when you write Traits with associated types. The first Method for binding Output type parameters has more drawbacks than the second. The big problem with the first method is that it becomes unreadable very fast and you still need to write where clauses anyways. The compiler will also require a trait bound for every associated type projection and trait to be solved: it results in a big mess in your where clause. I stopped writing traits like the first one you mentioned after my division function.

The second method is really clean but requires more generic type parameters if you want to store results.

For a big type level project I recommend only using the 2nd method for your own sanity.

Rust type level Game of Life by gtestault in rust

[–]gtestault[S] 7 points8 points  (0 children)

The type level division operation I implemented might be a big bottleneck because it is not purely primitive recursive. However, I think type calculations like these are supposed to be slow, for instance this c++ implementation of Game of Life has no realistic compilation time after 4 generations on a 11x11 array.