HackerTrans
TopNewTrendsCommentsPastAskShowJobs

awwsmm

no profile record

Submissions

Code as Art

awwsmm.com
64 points·by awwsmm·há 2 anos·30 comments

[untitled]

1 points·by awwsmm·há 2 anos·0 comments

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

awwsmm.com
4 points·by awwsmm·há 2 anos·1 comments

Make Invalid States Unrepresentable

awwsmm.com
29 points·by awwsmm·há 2 anos·52 comments

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

github.com
82 points·by awwsmm·há 2 anos·38 comments

What This Senior Developer Learned from His First Big Rust Project

awwsmm.com
2 points·by awwsmm·há 3 anos·1 comments

comments

awwsmm
·há 2 anos·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
·há 2 anos·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
·há 2 anos·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
·há 2 anos·discuss
I found an even older source. Same guy, though

https://www.cs.rice.edu/~javaplt/411/23-spring/NewReadings/f...
awwsmm
·há 2 anos·discuss
That's another flaw in that model, definitely.
awwsmm
·há 2 anos·discuss
Thanks for sharing this, I was remiss in not including it.
awwsmm
·há 2 anos·discuss
"In 1700, I was -290 years old."
awwsmm
·há 2 anos·discuss
Nice work! Now solve the other problem at the end of the article
awwsmm
·há 2 anos·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
·há 2 anos·discuss
Having programmed in both for years, I respectfully disagree.
awwsmm
·há 2 anos·discuss
It has been a huge pain trying to get SDL2 to play nicely with Android / iOS. Would winit / wgpu make this easier?
awwsmm
·há 2 anos·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
·há 3 anos·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.