I have a 4 year old and an 18 month old, and I don't own a car (nor does my partner).
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.
There are essentially two bits of information in the 'state' of this iterated algorithm:
a) Are all the non-lowest bits zero, or are they the value of the latest N
b) the value of the lowest bit
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.
Traverse (or foldM) is probably a good start, likely the most useful monad-generic (or applicative-generic) function, that is simple but incredibly powerful and useful.
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.
> Functions and types can take integers as monomorphization-time template parameters (const generics).
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.
Absolutely not. The code of conduct was created to help produce a welcoming and supportive community, and if Tony being kicked out for being neither welcoming nor supportive counts as 'weaponizing', then that's a very strange view. I've met many of the people who were involved in this and they are amongst the nicest, friendliest, accepting people you could meet, and about as far from 'sociopath' as you can imagine.
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.
Can second all these suggestions. Also, from my experience all the Haskell events I've been to have been incredibly welcoming and positive, whilst I'm aware there are a tiny subset of abusive people out there, I've never met them nor met anyone who would tolerate them.
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.
You are right - in a tautalogical way - that type systems only catch type errors. However, in modern languages (including Haskell, Scala, as well as newer, more experimental languages like Idris), those type errors can be extremely powerful.
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?
You don't have to clean up everything at once - it's possible to put items on a queue to be cleaned up when refcounts hit zero, and you can then control at what rate the queue is emptied.
Because the display is normally running at 60hz, so if you don't want tearing (where the frame to be displayed changes halfway through monitor refresh, leading to a sharp tear across the screen), you need to run at an integer number of refreshes per frame (known as vsync). 1 = 60fps, 2 = 30fps, 3 = 20fps.
This is, generally, undecidable. In fact, it's one of the most famous results in Computer Science, known as The Halting Problem[1].
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.
A good portion of this stuff does still go on in Games Development.
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!
It shows Eric Clapton, widely considered one of the most skilled and successful blues guitarists, chauffeuring B.B. King, implying that Clapton honours and reveres him.
Weird, or unsupported by any evidence or logical foundation?
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.
To be fair it's a 6-bedroom wing, but still a fun fact.