This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fn render(condition: bool) -> wjet::Tree { | |
| let bar = false; | |
| wml! { | |
| <Block> { | |
| let foo = false; | |
| let name = "World"; | |
| if (!condition) { | |
| <Block { foo: condition, baz: 7 }> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I am the Miaou user with id 1268 and name "nick" on https://miaou.dystroy.org |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use master number. | |
| define dice as blueprint: | |
| define sides as number. | |
| define new as action (use number as sides): | |
| set dice sides to sides. | |
| define roll as action: | |
| share result of round number (sides: result of random number (min: 0, max: sides)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use wjet; | |
| pub struct UserInterface { | |
| } | |
| impl UserInterface { | |
| fn new() -> UserInterface { | |
| return UserInterface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use master dice. | |
| use master game. | |
| use goblin. | |
| define d12 as dice, set to result of new dice (sides: 12). | |
| define mob as goblin, set to result of new goblin (hp: 10, mp: 5). | |
| roll d12. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use list. | |
| use object. | |
| use spell. | |
| define update_equip_state as action ( | |
| use actor as self, | |
| use list as armor_list, | |
| use list as cuirass_list, | |
| use list as spell_list | |
| ), set to -> nothing: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use game. | |
| use math. | |
| define dice as blueprint (use number as sides) of game'item, set to: | |
| define roll as action (use number as times, share number), set to: | |
| define value as number, set to 0. | |
| repeat times: | |
| set value to value + do math'round (do math'random (0, sides)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Me at 9:33 AM | |
| Honestly, though, this should be a huge red flag that you have to jump through a dozen hoops just to properly type redux... It works well, but it's way more complicated than any state management needs to be. | |
| I can write code in C/C++/Rust, I can work with binary data, I can render advanced imagery over Web/OpenGL, but I can't wrap my head around redux spaghetti. No fucking thanks, lol | |
| Someone Else at 10:08 AM | |
| so how would you manage a large redux state? | |
| Me at 10:08 AM | |
| not with redux | |
| If you start to really look at their API, you could write your own store using less code that fits your own needs and is less complicated. Or, you could use a much more sane library like MobX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface StandardAttributes { | |
| texture: ImageData; | |
| } | |
| interface StandardInputs { | |
| i_Points: Float32Array; | |
| i_Sample: Float32Array; | |
| } | |
| interface StandardUniforms { |