Better HN
topnewbestaskshowjobs
Log inSign up

awwsmm

77 karma · joined Jun 19, 2023 (3y ago) · 21 submissions

Submissions

comment 2y ago · link · parent

"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."

2.

Code as Art(awwsmm.com ↗)

64 points · by awwsmm · 2y ago · 30 comments

comment 2y ago · link · parent

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!

4.

What Are Const Generics and How Are They Used in Rust?(awwsmm.com ↗)

4 points · by awwsmm · 2y ago · 1 comment

comment 2y ago · link · parent

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

comment 2y ago · link · parent

I found an even older source. Same guy, though

https://www.cs.rice.edu/~javaplt/411/23-spring/NewReadings/f...

comment 2y ago · link · parent

That's another flaw in that model, definitely.

comment 2y ago · link · parent

Thanks for sharing this, I was remiss in not including it.

comment 2y ago · link · parent

"In 1700, I was -290 years old."

comment 2y ago · link · parent

Nice work! Now solve the other problem at the end of the article

comment 2y ago · link · parent

"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.

12.

Make Invalid States Unrepresentable(awwsmm.com ↗)

29 points · by awwsmm · 2y ago · 52 comments

comment 2y ago · link · parent

Having programmed in both for years, I respectfully disagree.

comment 2y ago · link · parent

It has been a huge pain trying to get SDL2 to play nicely with Android / iOS. Would winit / wgpu make this easier?

comment 2y ago · link · parent

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.

16.

Show HN: A minimal working Rust / SDL2 / WASM browser game(github.com ↗)

82 points · by awwsmm · 2y ago · 38 comments

comment 2y ago · link · parent

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.

18.

What This Senior Developer Learned from His First Big Rust Project(awwsmm.com ↗)

2 points · by awwsmm · 2y ago · 1 comment