HackerTrans
TopNewTrendsCommentsPastAskShowJobs

awwsmm

no profile record

Submissions

Code as Art

awwsmm.com
64 points·by awwsmm·2 tahun yang lalu·30 comments

[untitled]

1 points·by awwsmm·2 tahun yang lalu·0 comments

What Are Const Generics and How Are They Used in Rust?

awwsmm.com
4 points·by awwsmm·2 tahun yang lalu·1 comments

Make Invalid States Unrepresentable

awwsmm.com
29 points·by awwsmm·2 tahun yang lalu·52 comments

Show HN: A minimal working Rust / SDL2 / WASM browser game

github.com
82 points·by awwsmm·2 tahun yang lalu·38 comments

What This Senior Developer Learned from His First Big Rust Project

awwsmm.com
2 points·by awwsmm·3 tahun yang lalu·1 comments

comments

awwsmm
·2 tahun yang lalu·discuss
"The human desire to be creative and express one's individuality does not end where a keyboard begins... code can be used as a medium to create art, but it can also be art itself."
awwsmm
·2 tahun yang lalu·discuss
I spent some time over the weekend digging into examples in the Bevy game engine and came across a new-to-me concept: const generics! So I learned what they are, and how they can be used in Rust, and wrote up my findings on my blog. Let me know what you think!
awwsmm
·2 tahun yang lalu·discuss
A ZIP code is a U.S. postal code with a well-specified format. Global postal codes, however, are a different story...

https://en.wikipedia.org/wiki/List_of_postal_codes
awwsmm
·2 tahun yang lalu·discuss
I found an even older source. Same guy, though

https://www.cs.rice.edu/~javaplt/411/23-spring/NewReadings/f...
awwsmm
·2 tahun yang lalu·discuss
That's another flaw in that model, definitely.
awwsmm
·2 tahun yang lalu·discuss
Thanks for sharing this, I was remiss in not including it.
awwsmm
·2 tahun yang lalu·discuss
"In 1700, I was -290 years old."
awwsmm
·2 tahun yang lalu·discuss
Nice work! Now solve the other problem at the end of the article
awwsmm
·2 tahun yang lalu·discuss
"Programming to an interface" is another great topic for a blog post.

But yes, you're correct that there are many different ways to model this. Which one is best for your particular use case depends on the details of the problem you're trying to solve.
awwsmm
·2 tahun yang lalu·discuss
Having programmed in both for years, I respectfully disagree.
awwsmm
·2 tahun yang lalu·discuss
It has been a huge pain trying to get SDL2 to play nicely with Android / iOS. Would winit / wgpu make this easier?
awwsmm
·2 tahun yang lalu·discuss
I'm only just beginning to scratch the surface with gamedev in Rust, but JS and Rust are quite different languages. Rust is compiled, with strong typing. But once you get the mechanics of compiling to WASM figured out (as I have in this repo), it's pretty pleasant to work with.
awwsmm
·3 tahun yang lalu·discuss
Hi all! I'm a senior dev who mostly writes Scala, but is learning Rust. Over the holidays, I decided to take on a larger Rust project to hone my skills. This blog post explains what I learned, and how I plan on writing better Rust code in the future.