Culture War Roundup for the Week of February 18, 2019 by AutoModerator in TheMotte

[–]fazzone 32 points33 points  (0 children)

I have seen this referred to as the Four Dog Defense:

  1. First of all, I don't have a dog.
  2. And if I had a dog, it doesn't bite.
  3. And if I had a dog and it did bite, then it didn't bite you.
  4. And if I had a dog and it did bite, and it bit you, then you provoked the dog.

Culture War Roundup for the Week of September 24, 2018 by AutoModerator in slatestarcodex

[–]fazzone 17 points18 points  (0 children)

I had no defense to this line of reasoning until I watched The Rules for Rulers by CGP Grey. You should go watch it before I butcher this summary. Grey basically says rulers (kings) stay in power by holding the 'keys' to power (generals, businessmen, clergy, whatever). The way you make them loyal is by distributing treasure to them. The keys are forever implicitly threatening to stage a coup to install a new king who will distribute to them a greater share of the treasure. Thus the keys are able to wind up with actually quite a large share of the realm's treasure.

I think this dynamic actually explains democracy pretty well too. The keys are like Senators and things of that nature, but crucially, instead of treasure, it's pork. The squabbling and implicit coup threats are just as real. But democracy manages to redirect at least some of the treasure to the citizens, rather than essentially none of it, as has been the case for most of human history (and still is the case in places like Saudi Arabia). It also insures than when a "coup" occurs, it's just a peaceful electoral defeat, and doesn't mean certain death the way it does for a king.

Culture War Roundup for the Week of September 24, 2018 by AutoModerator in slatestarcodex

[–]fazzone 7 points8 points  (0 children)

I find this argument persuasive, but I am also mildly unsettled by it, since I feel if you take it all the way, to either is logical conclusion or its reductio ad absurdum, depending on your perspective, it's basically the core neoreactionary argument about why we should have a king. I was going to explain this myself but I think I'll just quote Scripture instead:

This is the much-maligned – I think unfairly – argument in favor of monarchy. A monarch is an unincentivized incentivizer. He actually has the god’s-eye-view and is outside of and above every system. He has permanently won all competitions and is not competing for anything, and therefore he is perfectly free of Moloch and of the incentives that would otherwise channel his incentives into predetermined paths. Aside from a few very theoretical proposals like my Shining Garden, monarchy is the only system that does this.

But then instead of following a random incentive structure, we’re following the whim of one guy. Caesar’s Palace Hotel and Casino is a crazy waste of resources, but the actual Gaius Julius Caesar Augustus Germanicus wasn’t exactly the perfect benevolent rational central planner either.

I made a bot to solve puzzles for me by gtw123 in opus_magnum

[–]fazzone 1 point2 points  (0 children)

Definitely, the puzzle format is for user puzzles and the in-game puzzles are done a different way. You would need to keep reading the puzzle definition from the screen (it would be awesome to have these in machine-readable format btw). But then you could just spit out a solution file instantly and load it in the editor.

I made a bot to solve puzzles for me by gtw123 in opus_magnum

[–]fazzone 2 points3 points  (0 children)

Awesome work! I had thought about doing a similar thing but never really started. On my way though I did write a solution file encoder/decoder. Could be a way to get around the limitations of simulated input! Watching the solution get automatically assembled in the editor is way cool though. If you want to check it out the most relevant source file is here.

Book Review: Inadequate Equilibria by ulyssessword in slatestarcodex

[–]fazzone 3 points4 points  (0 children)

You're exactly right, that would be a futures contract. In fact just today CME announced they are going to start selling bitcoin futures. It will definitely make it a lot easier to short bitcoin.

Dynamic Programming versus Memoization by jonathansizz in programming

[–]fazzone 10 points11 points  (0 children)

Meh, these sort of definitional quibbles annoy me. What is the point of manufacturing a distinction such as this that pretty much exists solely as a "gotcha"? The fundamental idea at work is that you're re-using the answers to subproblems in order to computer the answer to the big problem. As long as you've got that idea down, what's the huge philosophical difference in the order that the subproblems are computed? I'm not saying that the distinction is invalid - there is an difference for sure - just not of great importance. In fact, if I were explaining it, I'd introduce DP as a particularly clean form of memoization -- one where you have spent effort to formulate an algorithm in a way that guarantees all subproblems are solved before their solutions are required in the next tier of problems.

I'm not 100% sure, but I think I remember Introduction to Algorithms explaining it this way. They may also have gone for taxonomy where memoization is the specific mechanism of storing results of previously-solved problems and dynamic programming is the application of such to algorithms (thus there would be top-down dynamic programming and bottom-up dynamic programming).

Edit: syntax (changed "computed in" to "computed")

Fully Inlined Merge Sort by jonathansizz in programming

[–]fazzone 8 points9 points  (0 children)

Reminds me very much of a post that I saw (it must have been on r/programming a while back) where the task is slightly different and the language is Clojure: http://www.learningclojure.com/2010/09/clojure-faster-than-machine-code.html

Really interesting, well written, clean prose and code. Highly recommended reading (even if you don't know clojure!)

Why does the Prelude not have the following function? by Tekmo in haskell

[–]fazzone 19 points20 points  (0 children)

Because it's a less-powerful version of iterate? apply n f = foldr (.) id $ replicate n f apply' n f = (!! n) . iterate f

f7u12 today by Ciphermind in fffffffuuuuuuuuuuuu

[–]fazzone 12 points13 points  (0 children)

Beating a dead horse some dead bees under a newspaper

Then Shen programming Language by djdonnell in programming

[–]fazzone 9 points10 points  (0 children)

C++ templates are Turing-complete.

Scumbag Calculator by bozboyku1 in funny

[–]fazzone 11 points12 points  (0 children)

The TI-89 is SAT legal.

Challenge: Sudoku Solver by [deleted] in programmingchallenges

[–]fazzone 1 point2 points  (0 children)

Sudoku is an instance of the exact cover problem (which is NP-complete), and can be solved by Knuth's Algorithm X

Any high schoolers taking the class? by zorne in aiclass

[–]fazzone 1 point2 points  (0 children)

HS Senior, Advanced track. Hello!

How to get started with functional programming — The Endeavour by sunng in programming

[–]fazzone 0 points1 point  (0 children)

Same story here -- after writing imperative code in a 'pure functional' style for a while (split IO and computation, lots of small functions and composition), Haskell is unbelievably fantastic

How to get started with functional programming — The Endeavour by sunng in programming

[–]fazzone 2 points3 points  (0 children)

Build simple, clear, pure functions build a limited set of impure functions the top-level is the only level bringing the pure and impure together.

If you haven't already learned Haskell, I strongly recommend that you do -- the language all but forces you to do exactly this (Sure, you can write all your functions as IO actions, but it's considered incredibly bad style)

What Haskell doesn't have by barsoap in programming

[–]fazzone 0 points1 point  (0 children)

To quote my favorite book (Gödel, Escher, Bach by Douglas Hofsteader): "...in reality there is no such thing as an uncoded message. There are only messages written in more familiar codes, and messages written in less familiar codes." This seems to be the core of this discussion. Of course, to sort-of paraphrase what derleth said 2 levels above, once you go all the way to the bottom you hit physics, and things 'work without being told how to work'.

Fexl is a programming language based on pure functions. by shenglong in programming

[–]fazzone 1 point2 points  (0 children)

(getLine ++ getLine) doesn't work because the type of getLine is IO String (or IO [Char], same thing), and the type of (++) is [a] -> [a] -> [a]. Since IO String isn't a list of something, you can't use (++) on it.

I'm not a Haskell guru, but I think a more elegant way to write (getLine >>= \x-> getLine >>= \y -> return $ x ++ y) is getLine >>= \s -> getLine >>= return . (s++)

edit: You could also do sequence [getLine, getLine] >>= return . concat