Earlier quoted context omitted.
Damn you sound exactly like me...when I work for my own projects they usually die off quickly once I figure out how to do it (without actually implementing it but I'm pretty sure it can be implemented in this or that way). But if it comes from a friend, or a colleague then I'm super focused on it until it's done. It's almost as if I do projects to show off to other people or I like to serve other people.
Yeah, showing off or feeling helpful. That explains it almost perfectly.
How Dwarf Fortress is built
351–360 of 407 posts
Re: How Dwarf Fortress is built
#352Earlier quoted context omitted.
>Enough alcohol will kill a cat That's what intrigues me, Not played the game but this must because there were a list of things which could get the cat killed right? Then how come this is an unexpected bug?
The bug was the volume ingested when the cat cleaned it's self, was incorrectly calculated to be a whole standard drink.
Re: How Dwarf Fortress is built
#353Earlier quoted context omitted.
Another good rule for OOP: Objects are fine, object graphs are a killer. Graphs are what get you into "all I wanted was a banana" territory. Objects should either be atomic, agrigated by simpler structures like maps and arrays, or if you absolutely must have objects pointing to objects, be sure that they form a tree and not a graph such that each object need only know about the things below them which can be encapsul…
I guess the exception would be when you’re modeling a graph.
You still don't necessarily need to model the graph at the object level though. You could model your graph as a set of pairs, ie edges. If performance was more of a concern you could do it as a map where each object was a key and the values were a list of the connected objects. You could also separate out the value from the graph behavior and have a GraphNode object that wraps each value object.
The bigger point though is when you have networks of objects that are relying on each other to perform functions, that's where the problem is, and where you start to rely on mocks and stubs for testing, which really should be considered a smell in its own right. Your better off making the interface between objects values rather than having hard references between objects as described in this talk: https://www.destroyallsoftware.com/talks/boundaries. Once the interfaces between your objects are values instead of references you're free to connect your objects together in any way you need and are not stuck with the fixed graph as originally designed.
Re: How Dwarf Fortress is built
#354Earlier quoted context omitted.
I read about a cat who used to visit a pub and learned to lick beer from under taps. The cat got banned from the pub for its own good but I don't believe it was anywhere close to poisoning.
Do you have a source for this?
Re: How Dwarf Fortress is built
#355Earlier quoted context omitted.
Verily, the dwarf would pick up a cat to take it to the slaughterhouse, the cat would adopt the nearest dwarf (the one carrying it) and then the dwarf would slaughter the cat. And get sad because his pet died. And then eventually start tantruming and a tantrum spiral would begin.
> And then eventually start tantruming It's so crazy when you try to make dwarves feel great all the time and then the simulation comes up with some completely insane causal chain that messes up everything. I once tried to isolate a miasma problem with a wall. Which works fine, unless the dwarf tasked with building the wall decides he needs a break, sleeps on the floor and then gets grumpy because he just slept on a…
Re: How Dwarf Fortress is built
#356Earlier quoted context omitted.
Check React again and check more often otherwise you look like you don't know what you're talking about. Seriously. Functional components with hooks are the proper and modern way to do React: https://www.robinwieruch.de/react-class-component-deprecated The most popular widely used GUI framework in the world is eschewing OOP. Ever wonder why? I responded to another person here with a wall of text that should correct h…
Please enlighthem us how React is even able to work when we take away DOM and JavaScript OOP capabilities out of it. I am quite curious how the browser is going to display anything. You think that you know much more than me, enjoy a peaceful life thinking that way, if it makes you happy.
If you want to render into DOM, you’ll need to use another library, ReactDOM (notably not a dependency of React).
However, rendering to DOM is not the only way to use React. Ink[0], for example, allows to create command-line program interfaces out of React functional components and JSX. It depends on React, but not ReactDOM.
Whether React internals rely on OOP and to what extent I don’t know, but I can attest that after embracing functional components in a somewhat complex app I’m working on I haven’t written a single class.
[0] http://term.ink/
Re: How Dwarf Fortress is built
#357Earlier quoted context omitted.
Check React again and check more often otherwise you look like you don't know what you're talking about. Seriously. Functional components with hooks are the proper and modern way to do React: https://www.robinwieruch.de/react-class-component-deprecated The most popular widely used GUI framework in the world is eschewing OOP. Ever wonder why? I responded to another person here with a wall of text that should correct h…
Please enlighthem us how React is even able to work when we take away DOM and JavaScript OOP capabilities out of it. I am quite curious how the browser is going to display anything. You think that you know much more than me, enjoy a peaceful life thinking that way, if it makes you happy.
Re: How Dwarf Fortress is built
#358Earlier quoted context omitted.
Yeah, assuming you are using something like C.
Are you by chance thinking of MVC? MVU is more towards functional rather than imperative programming.
Re: How Dwarf Fortress is built
#359Re: How Dwarf Fortress is built
#360Earlier quoted context omitted.
Please enlighthem us how React is even able to work when we take away DOM and JavaScript OOP capabilities out of it. I am quite curious how the browser is going to display anything. You think that you know much more than me, enjoy a peaceful life thinking that way, if it makes you happy.
[deleted]
Beware, with great power comes great responsibility.