48 karma · joined September 23, 2019
If I put two blue marbles and one red marble in a bag and ask you to blindly draw one, you probably won't be too shocked if you end up drawing the red one. Yet if it happens in an election everybody starts suddenly claiming all polling and statistics are useless.
If YouTube receives a DMCA request it will take the video down immediately (in accordance to the law). However, you can counter the DMCA claim at which point the other party has to either drop it or sue you.
ContentID is the non-legal system which essentially blocks or transfers monetization (copyright holder's choice) for any detected copyrighted work in YouTube's database. YouTube developed it to avoid fighting studios.
Since there are no objective standards to determine if something is fair use or not, instead it's a bunch of factors that are all supposed to be weighted against each other by a judge, there is no way for YouTube to determine if something is legal infringement of copyright (Fair Use) or illegal infringement of copyright. The solution here for YouTube is to be conservative and not allow any infringement against the rights holder's wishes.
It's not a great system, but I understand why it is the way it is, and I'm not sure how or even if it could be changed.
Pai worked at Verizon for two years between 2001 and 2003. He was appointed as FCC member in 2012. How much loyalty do you have to a job you held for two years, nine years ago?
f x | x < 0 = ...
| otherwise = ...
It took me a while to realize that `otherwise` isn't a keyword or bit of syntax. It's just a variable bound to True: https://hackage.haskell.org/package/base-4.12.0.0/docs/src/G...Although this is a separate issue to the greater point that most people play one game. My bit of anecdata is that me and all of my friends might try out some flavor of the month game or something that caught our eye on sale, but those tend to be one-and-done playthroughs. However, each of us has a game that they play regularly that has an order of magnitude more hours on it than everything else.
Chairman Sheng-ji Yang "Essays on Mind and Matter"
TV news stations care about ratings, papers care about circulation. Fear stories keep people watching/reading.
I do that in in-person conversations all the time. Although I'm probably more blunt than most.
I don't work with make much anymore (or Python or Haskell), but I've come to see the use of invisible characters to express structure as a mistake. It can make code real neat and tidy looking, but I'm not sure the trade off is worth it. In the past I've resorted to actually having my editor show whitespace symbols to make sure code that looks aligned actually is aligned.
At lowest level you have the Control.Concurrent primitives: forkIO and MVar. forkIO allows you to spin up new Haskell threads (not OS threads) and MVar's can be used to communicate between them. MVar's can be empty or full and block when the operation can't be completed immediately (writing to a full MVar or reading from an empty MVar). They also have single wakeup semantics, so if you have multiple readers blocking on an empty MVar read, only one will be woken up when someone writes to it.
STM has transactional semantics. You can write to multiple STM variables atomically in a transaction, and your transaction will restart if any of your input variables have been written to while your transaction was running. Useful if you need to maintain consistency between several variables at all times.
Async is a wrapper around STM and provides common functions you would often write yourself to express common patterns, but more battle tested.
Strategies are about optimistically evaluating Haskell thunks in parallel. For example if you map a function over a list, now you have a list of thunks. You can use Strategies to now evaluate those thunks in parallel. Key thing with Strategies is that if you remove them from your code (or use a non-threaded runtime) it doesn't affect the semantics of your program, it just might make it slower due to loss of parallel evaluation.
The Par Monad isn't used much, but the key idea there is you build an explicit dependency graph of the values in your computation and the runtime tries to parallelize the nodes in the graph that it can. Similar to what make does if you run it with -j.
Sure, but so is the Clojure one. So I guess it's more like:
fun bar () {
let x = 5,
y = 10
foo(x,y)
}
vs (defn bar []
(let [x 5
y 10]
(foo x y)))If you look at things other than function calls, it starts to look different:
let x = 5,
y = 10
foo(x,y)
vs (let [x 5
y 10]
(foo x y))
I actually like Lisps and think the S expression syntax is one of their best features, but I'm not going to pretend there are the same number of brackets in Lisps as there are in C family languages.The numerator and denominator get automatically reduced to lowest terms (just like you learned in elementary school, so 15/100 becomes 3/20) internally by every implementation I know of. This comes at a performance cost for every operation, but it helps keeping the numerator and denominator from blowing up.
>not sure how rounding works -- or even if they do rounding at all
They do not. The point of a Rational type is to keep precise values, so it's up to the programmer to decide when and how values are rounded.
>"arbitrary precision floating point" type like ruby's BigDecimal
Not sure how Ruby implements BigDecimal, but Java internally represents it as an BigInteger of digits, and a second integer that represents where in the number the decimal point should go. This means that BigDecimal still can't truly represent a value such as 1/3, since you can't have an infinite amount of 3's, but a Rational can.
>I'm not actually sure what domains rational data types are good for.
I'll be honest and say I've never had to use them either, but it's nice to know they exist. The intended use case is when you need to perform calculations and maintain as much precision and accuracy as possible in the intermediate values and such accuracy is more important than speed.
Can't wait for $PARTY party to yell "Conspiracy!" when their comments aren't showing up on the congressional web message board, while $OTHER_PARTY says they were simply "accidentally" deleted by the spam filter. Also something about Russian bots and hackers.
PROGRAM -> STATEMENT*
STATEMENT -> IF-STATEMENT | ASSIGN-STATEMENT | STATEMENT-ERROR
IF-STATEMENT -> ...
ASSIGN-STATEMENT -> ...
STATEMENT-ERROR -> TOKEN* SEMICOLON
The idea being that if the if-statement and assignment statement rules fail you consume tokens until the next statement separator (semicolon in our case), produce an Error node in the AST and resume parsing the next statement. This allows your parser to actually catch multiple errors in one pass since it won't die the moment it encounters something it can't parse. After parsing you scan the AST and if it has any Error nodes you spit out the relevant error messages and exit. You can get as granular with the error rules as you want, although the more you add the more unwieldy the grammar becomes.Naturally doing this in practice is harder than it sounds. Tweaking the Error rules is hard. If you consume too much or too little input you will resume in a spot that can have no chance of ever succeeding, giving way to a cascade of parse errors. I think we've probably all seen a compiler spit out a couple of dozen error messages all stemming from a single root error like a missing closing parentheses or brace.
IANAL so I don't know the answer, but I hope the answer is no. Since if the answer is yes it would allow a large media organization to thrust anyone into the spotlight and defame them without recourse as long as "actual malice" can't be established (ie the Covington High kids).
* (symbol-function 'if)
#<CLOSURE (:SPECIAL IF) {1000C5084B}>
SBCL refuses to set that value to an alias: * (setf (symbol-function 'foo) (symbol-function 'if))
#<THREAD "main thread" RUNNING {10005205B3}>:
#<CLOSURE (:SPECIAL IF) {1000C5084B}> is not acceptable to (SETF SYMBOL-FUNCTION)
Trying this with regular functions works as intended: * (setf (symbol-function 'bar) (symbol-function 'mapcar))
#<FUNCTION MAPCAR>
* (bar #'1+ '(1 2 3))
(2 3 4)
Special forms are, well, special and a lot of the regular parts of lisp doesn't work with them.So, if you want to translate a lisp into another language you have to resort to macros.