Question: What do you want to use it for?

Asked By
Asked At
2018-02-16 15:11:40

Found 15 possible answers.

User Answered At Possible Answer
brianhicks 2018-02-16 15:20:10 I'm *guessing* that if you're doing this you're using it as a bag of key and values. (well those are awful names, but the point is using a union type for the values :slightly_smiling_face: )
type YourThing = YourFancyString String | YourFancySigil
type alias Stuff = Dict String YourThing if you want to have multiple types for the values, then: if that's the case, you should use a Dict instead. (because I think we're in an XY situation)
justgook 2018-02-16 21:28:17 That was just idea.. that I throw away.. Btw is there some tutorial how to use native part.. I have experience in mob web development and would like create Device detection lib (but that requires JavaScript part)
joelq 2018-02-16 21:30:48 The general advice is not to write "native" (now called "kernel") code and instead use ports "native"/"kernel" is a private API that will change a lot in the next release
justgook 2018-02-16 21:32:17 That not big deal.. But I would like share my years of experience I couldn’t create all that stuff as ports..
joelq 2018-02-16 21:34:10 You
justgook 2018-02-16 21:36:44 If I would like for my self I’ll would use ports.. I would like create package
joelq 2018-02-16 21:37:39 If you use native code you won't be allowed to publish to native code breaks some of Elm's safety guarantees and is banned from the official package server
janiczek 2018-02-19 10:44:10 Nice gamedev article:
mordrax 2018-02-19 10:55:27 > If there is a flying_monster_infestation_starts record and no flying_monster_infestation_ends record after it, then the window is not open. On a slightly more serious note, what the author is calling _combinatorial explosion_ seems to be closely related to _emergent behaviour_, of which a fine example would be the drunken cats in dwarf fortress. However here, it is seen in a negative light because the overall goal is to provide a _curated_ experience so each consequence of the world has to be manually coded for whereas emergent behaviour encourages seemingly separate events to combine to create new combinations, unintended by the original coder. Bloody flying_monster_infestations...
janiczek 2018-02-19 11:06:46 I agree :slightly_smiling_face: On a related note, Dwarf Fortress seems to be much more granular. Filip's article is more high-level, seeing bugs like _"Dwarves would like to help but have no way to get from their base, but end up helping you anyway, and it's not explained anywhere in the dialogue -- immersion ruined"_ (they teleported there or something). In Dwarf Fortress (IIRC) each creature has to move physically to get somewhere (no teleports) and so some categories of bugs are eliminated. The emergent behaviour happens in (kinda) safe framework, because the author didn't take shortcuts (automatic mourning black flags on houses without somebody getting the memo of the king killed and hanging the flags there).
joelq 2018-02-21 03:25:22 When dealing with map coordinates, character's positions on the map, and calculating movement, what coordinate system is easiest to use? specifically, I wonder if that would make vector math easier but I wonder if using polar coordinates and 0 at the center would be easier? I've been using an x,y coordinate system with 0,0 at the top-left
mordrax 2018-02-21 03:28:37 i always use (0,0) as the bottom left. then translate into screen position (0, height - y) and translate into character position when doing movement etc… it doesn’t stop you from doing vector maths in local space, it just means you add it to the global space you should differentiate between your global coords and local coords, and screen coords
joelq 2018-02-21 03:32:33 what's the difference between global and local space?
mordrax 2018-02-21 03:33:33 global = map coords with 0,0 at a corner of map. char moves (1, 0) locally (moves to the right) then you apply the two vectors (10, 1) + (1, 0) to arrive at (11, 1) globally so you can say, char is at (10, 1) globally local = char at 0,0
joelq 2018-02-21 03:35:28 ah, so relative to the character! :thinking_face:

Related Questions