177 karma · joined August 31, 2010
- A habit of taking nothing for granted, interrogating everything. - Comfortable dealing with ambiguity. - A broad communication toolkit.
['div', {id: 'main'},
['h1', 'Some title'],
['p', 'Some text']]
I wrote a little function to turn this kind of thing into an html string (https://github.com/twfarland/don), but it could also be used as the view descriptor for some kind of view component ala React. Might work on that...https://gist.github.com/twfarland/f030cb2853cdf28b25ed
I'm not sure how possible this would be from an implementation perspective, though, that stuff is way beyond me. I just like thinking about syntax/semantics.
"I divide my officers into four groups. There are clever, diligent, stupid, and lazy officers. Usually two characteristics are combined. Some are clever and diligent -- their place is the General Staff. The next lot are stupid and lazy -- they make up 90 percent of every army and are suited to routine duties. Anyone who is both clever and lazy is qualified for the highest leadership duties, because he possesses the intellectual clarity and the composure necessary for difficult decisions. One must beware of anyone who is stupid and diligent -- he must not be entrusted with any responsibility because he will always cause only mischief."
I'm not sure if I got the problem right, because it solves the hardest case almost instantly (2006 lions, 2055 wolves, 2017 goats -> 4023 lions), in 0.8s on my macbook air.
I used a general search algo that I've also used in the past for the missionaries and cannibals and snake cube puzzles.
It uses a set to store the past states seen, instead of deduping a list.
I specialise in front-end web design/development, but also do solid backend dev in nodejs/golang/racket. I've > 8 years experience working in startups, corporate environments, and agencies. Currently available 20 hours per week. Rate 50 EUR/hr
CV: http://twfarland.github.io/ Github: https://githib.com/twfarland/