NickPollard
To be fair it's a 6-bedroom wing, but still a fun fact.
We rent a car ~10-20 times a year, but that's usually for vacations or trips out of the city to visit family. Regular weekly family life we use buses, the underground (metro), trains, or sometimes taxis.
We are considering eventually getting a car, but we've managed for 4 years with children to not need one and it's not been an issue.
(I live in London, United Kingdom)
So the cycle of (N, 1, N+3, 0) corresponds to (A) and (B) being: (0,0), (0,1), (1,1), (1, 0) - i.e. the 4 possible combinations of these states.
More generally, Monads essentially support function composition between monadic functions, so you can use it to write code that is agnostic to the monad it runs in. This can let you write e.g. prod. Code that is in IO or Async or Maybe, but for unit testing run it in Identity.
Also, it allows syntax sugar such as do notation that makes it clear to work with even when you know which monad you're working in.
Const generics aren't dependent types though; you're still dealing with known constants at compile time. For it to be dependent types, you need something like in your latter example, where a type is dependent on an actual _value_ passed to a function at runtime.
This idea of a hostile takeover and such is a figment of Tony's imagination and a deliberate distraction equivalent to Trump's referring to the Mueller investigation as a witch hunt.
Shoutout if you're in the SF area, BayHac (https://wiki.haskell.org/BayHac2018), a yearly unconference/hackathon is incredibly fun, and also there are (roughly) bi-monthly Haskell meetups (https://www.meetup.com/Bay-Area-Haskell-Users-Group/) in SF which are great fun (disclaimer: I co-organise the meetups - find me @Nick_enGB).
Composition is a simple technique to build functions out of multiple simpler functions. It's heavily used in Functional programming but we think it's really useful for everyone, particularly data workers who might be gluing together lots of different modules/libraries/systems. We also use types to help check that functions can compose - this can catch schema mismatch errors early rather than waiting until you run your data pipeline to realise that the output of one function isn't _quite_ what your second function expects.
Wikipedia as some more detailed info on function composition: https://en.wikipedia.org/wiki/Function_composition_(computer...
Show HN: NStack – Typed, composable microservices for data analytics
Many people assume that 'types' are simply primitives like Int and String, and that a type checker just makes sure you don't pass an Int to a function expecting String. However, it is possible to express far more powerful statements about your data using a good type system.
For example, you can express the idea of non-emptiness of a container, as mentioned in the article. Then you know that, say, taking the max element of a non-empty container is guaranteed to give you an element, whereas with a possibly-empty container you might not have any element at all, causing a null, or exception, or at least requiring an Optional type.
You can express safety properties such as a sanitized string vs. unsanitized. You can have a Sanitized type that can only be created by calling a sanitize function - which carefully escapes/handles any invalid characters - and then functions that might, say, pass a value into an SQL instruction can be typed to only take Sanitized strings. Now the representation in memory of Strings and Sanitized strings is identical, but by using different types and a certain set of allowed functions on those types, you can encode the invariant that a string cannot be inserted into an SQL query until it has been sanitized. Now your type checker can catch SQL insertion vulnerabilities for you. How's that for a type error?
Alan Turing showed that, for a program run on a particularly definition of a computer (a 'Turing Machine'), that is equivalent to modern computers, there is no general solution for determining whether a Program, run with a given Input, will halt or run forever. Your question about how long an algorithm will run is a more complex version of the same problem.
If you confine yourself to particular instances of certain algorithms, then you can do what you mean. The field of computational complexity is focused on the performance of algorithms, though the common measures[2] - big/little O/Omega/theta measure asymptotic complexity; that is how the complexity varies as inputs become arbitrarily large.
[1] https://en.wikipedia.org/wiki/Halting_problem [2] https://en.wikipedia.org/wiki/Big_O_notation
static const int eight = 8;
x * eight;
Sometimes magic numbers are just that - numbers. Adding constant definitions is often a good thing, but sometimes just adds noise.I don't work in games any more, but on the last title I worked on (Forza Horizon, Xbox 360), one of my colleagues engaged in a very similar exercise in order to allow data for the open world to be streamed in quick enough to deal with car (travelling at potentially 150+mph) to drive through the world without having to wait for loads, whilst streaming direct from the DVD (we weren't allowed to install to the HDD).
Given that the world was open and you could drive in pretty much any direction, trying to pre-load the right tiles of the world was difficult, and seek times made it tough to bring stuff in if it wasn't all packed together. However we were almost at the limit of DVD capacity so we couldn't do much duplication of assets to lower the amount of seeking required.
My colleague wrote a system that took about 8 hours overnight (running on a grid) to compute a best attempt at some kind of optimized packing. It did work though!
Religious beliefs are obviously very common, and not suprising for humans. That doesn't mean they have any scientific underpinning, and just because they are commonly believed does not mean they should be immune from (sensible) criticism.
If we go by Gartner[1], the games industry was predicted at $93billion in 2013. That's over 21%, so a couple of orders of magnitude more than 0.21%.
In the same way that a clever computer science can be useful to many industries purely through the application of computing, he is hoping that his thought processes can be useful to many different industries, quite separate from actual in-depth knowledge of that particular industry.
I don't think this is a far-fetched idea.
Whether Eliezer is actually good enough to do it is another question, to which I don't know the answer.
Hitchock said of course he would, took the film back, and sat on it for a couple of weeks. He later sent back the 'fixed' version, and the censor was much happier with the 'changes' and certified it for release.
I have never heard a single good argument against HFT.
HFT does not make ridiculous amounts of money these days - and the money it does make is at the expense of large institutional investors - e.g. Goldman Sachs, JP Morgan, et al. Are you so worried that a bunch of clever young mathematicians are taking money away from those poor old put-upon Morganites? Oh how dreadful. HFT means tighter spreads, which means cheaper and more efficient trading for everyone - i.e. your individual workers investing their 401ks, and so forth.
People's arguments against HFT seem to normally come up to '...because computers!'
Do yourself a favour and read this:
https://scottlocklin.wordpress.com/2014/04/04/michael-lewis-...
The problem with modern financial markets is that they have become quite abstract. Finance is maths, which means it's code, which means you start abstracting away from the implementation to get to a high level. Just because it's not immediately clear to a layperson what's going on, doesn't mean it's not useful or real.
Imagine what would happen for most programmers if you tried to explain to a layperson what you do.
"I'm a developer"
"Oh, you make websites?"
"Well, uh, no, you see, I make tools for making it easier to make websites"
"Oh, like what?"
"Um, well I make a compiler for turning one language into another"
"Why?"
"Well, when you make a website, you have to do all this stuff, but, well, you could do less stuff, just more clever, and then it's easier and you don't have to worry about for loops and such"
"What's a for loop?"
"Oh that doesn't matter. But now we can use a monadic map instead, which is much easier, developers don't want to write loops, map is better. But Javascript is a bit fiddly, so now I've written another language, so you can write in that, and then you run my tool, and then you get Javascript, so the browsers can understand it."
"Oh, so the browser only runs Javascript?"
"Yes. Well no. Actually most of them run some kind of JIT compiler, which turns javascript into another language, and then they run that"
"So your language becomes another language which becomes another language? Why not just write the other one?"
"Well, because that's not really what we want to do, it's awkward, and inefficient, and bug-prone..."
"But your language isn't a real thing? No-one's actually using it? My computer never gets it, never runs it, never understands it? Shouldn't you be doing real development?"