Good vs. Evil

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
49.
51 Hope it goes well for you
It did, in the end! I was up til about 2:30am and didn't get everything quite finished, but got the important stuff done.

50. I did some baking last night... burnt half the brownies...
Oh no! :( the brownies I made actually went down really well - even non-vegans seemed to enjoy them!

48 welp, today my ferret died, that was fun.
Aw dude I'm sorry to hear that :( Even with age, its still sad.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
49. Woo! I have a stinking cold :( But I got a bit more done last night - after my furore of advanced crafting recently, I'm focussing over the next few sessions on shoring up my infrastructure, setting up autocrafting and resources, things like that.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
49. Nice :) I know what I'm doing with my next few play sessions. These plans include building literally dozens of sets of armour, hobgoblin deicide, and summoning Death themselves.
 

GamerwithnoGame

Over-Achiever
Jan 29, 2015
2,808
1,507
224
49. Nice! :) I've been looking into it some more, and delving into some pretty deep necromancy is DEFINITELY on the cards. And some hobgoblin abuse. I need the Death's hood, robe and footwear, and I need Gulg's Gurdle.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,799
248
51 for school I need to write a bit about some technologies, experiment with one (and document this as proof) and write down my experience with it, together with its down and upsides.

As the web is the thing I am most interested in I decided to experiment with WASM and probably write a bit about service workers and/or web-vr.

However, if you know what WASM is you know that the only way to make use of it is by using Rust, C or C++. Neither of those are languages I used before. Also, I need something to make use of the WASM.

Because of this I decided to go with Rust and the yew framework so I can make an entire website using WASM. The question now becomes, what to make with it?

It should be small and ideally take advantage of what WASM is good at.

Oh: and for those that are interested. I haven't done much with it yet but I already like yew. It is based on React but seems to make use of some nice capabilities that Rust has that JS is lacking.
Lets say I have a button and I want my component to do something whenever I click it.
In React I would need to:
Make a new function, containing the code that needs to happen whenever I click on the button.
In the constructor of my component I need to add a line to bind the component to the function. (if you forget this you get a runtime error. Not a compile time error)
In the button I need to bind the onClick event and this function.
Optionally: Add code to the shouldUpdate function that compares the state before and after a state change to detect if the component needs to re-render.

Compare this to yew where I just need to:
Add a new entry to the message Enum from my component.
Add a case inside the update function to deal with this message. (something Rust makes very easy)
Either have the update function return true or false depending if I want to rerender my component.
Bind the event to the message

This means that deciding if I need to rerender my component is now forced upon me and is made easy. (No more comparing previous and current state) and the only runtime error I can get now is forgetting to bind the event to the message and even that gives a warning at compile time if a message is otherwise unused.

Compare this with React where if you use JS there are basically no compile time errors and even with typescript forgetting to bind the component to the function does not give you a compile time error. Also, forgetting to bind your new function and the event will never give a warning about unused code.
 

duckfan77

Popular Member
Mar 18, 2013
80
683
118
50 WASM needs to be written in Rust, C, or C++? I was unaware. As far as I knew, it was essentially another form of bytecode that would be natively ran by browsers, saving runtime compilation that happens with JS. In theory, shouldn't most languages be compilable into it?