skysight-inc/HackerNews huggingface dataset:
A typeclass is really nothing but a basic java/c# interface.

The 4 things you do with an interface are:

1. Declare an interface

2. Describe the contract of the interface

3. Declare that a datatype (or class) adheres to that interface

4. Provide an implementation of the the contract of the interface (fulfill the contract).

A haskell Typeclass does exactly that. The keyword "class" is where you do #s 1 & 2. The keyword "instance" is where you do #'s 3 & 4.

The only notable difference is:
If an ISizable has int GetSize() method in haskell instead of the contract being int ISizable.GetSize(), it is static int GetSize(ISizable x).

Or in Haskell:

instance ISizable MyType where

GetSize :: ISizable -> Int -- Note you don't actually type this line

GetSize x = ...
For a simple CRUD application, there's not much wrong with just passing state down from a parent component. Eventually you end up abstracting and automating it; they're values, like everything else you program with.

Abramov has been beating this drum for a long time: there really are a lot of React apps that use Redux but really don't gain anything from it.
Lyrebird claims it can recreate any voice using just one minute of audio
what if the "grey" traffic came from residential IP addresses using a normally distributed range of user agents? How would you reliable distinguish them from regular traffic?
You make a fair point. Although in more recent versions of JS the whole async error propagation isn't as big of an issue thanks to async functions and promises. I guess the biggest reason to use JS is that since I'm already using it every day, it's much easier to continue using a language I'm highly familiar with. Whenever I have to write a shell script I always have to pull up references and read through a couple Stack Overflow posts.

I don't reject shell scripts, though. I agree that in some cases it can lead to much simpler code. The power and composability with pipes and immediate substitutions is incredibly powerful. I've had a few cases where I replaced far more complicated node scripts with simpler shell scripts.

What I'd truly love is a reference guide that showed how to correctly do certain things with shell scripts. Here's a real-world example I struggled with: Writing end-to-end tests with selenium and a test runner. I wanted a script to start up a selenium server and wait for it to be ready. Then it should start the test runner. If the test runner exited successfully, kill the selenium server and browser, and exit with a 0. If the test runner or selenium server crashed or failed somehow, clean up and exit with a 1. Even after much trial and error, I still ended up with occasional Chrome copies staying open after failures.
You could probably find people who like it among those who are receiving checks from it. I think SS is a good place to consider Chesterton's Fence: before removing something, you have to explain and understand why it's there in the first place. Incidence of senior poverty has dropped since SS was implemented. Maybe it's not so much that people like SS as that they weren't comfortable with the poverty of their elders that they saw before implementing SS.
I think this is generally because of the audience here – I know there's a solid international contingency, but the US one is likely biased by privilege and hasn't experienced police corruption/harassment first hand like lots of less privileged people have, so they assume bad cops are an outlier and not part of an institution which props them up.

I was definitely one of those people until recently, and it unfortunately took an incident I was directly involved in to change my mind, now when I hear someone else's story about police harassment/abuse, I put the burden on the police to explain why it was justified, not on the victim as to why it wasn't. It took a long time for me to have this POV, I expect it will take others who haven't had first-hand experience with bad law enforcement a long time too :/
What about a week or two after that?
Google Really, Really Wants Filmmakers to Try Its New VR Camera
I'm by no means an expert gun-handler, but the only constant instruction every time I go to a range is "Don't point the gun at anything you are not ok with completely destroying".

I understand police should be better trained, and ideally they must shoot to stop vs shoot to kill.
you can start here!!
https://www.reddit.com/r/MachineLearning/comments/5z8110/d_a...
META: This blog post is super low effort. Basically just reiterating some really basic UI principles and complaining. I think we can do better on HN
I believe the idea of tolerance is somewhat overrated. It exists, but it's probably not much different than tolerance to alcohol–which most people are probably better at judging because the effects are more pronounced.
SUPER SCATTERBRAINED ELYSIAN WRITEUP 9000 (making of a 56KB Demo)
The inside story of why Tim Cook almost kicked Uber off the App Store
true, but there's definitely a resurgence of local ginger ale/beer that contains alcohol:
http://smalltownbrewery.com/our-beers/ginger-ale/ for example

Though these are at beer level.

Kombucha often contains a low (< 1%) amount of alcohol.
This part of the original article was referring to React Native. React != React Native, they are two separate projects.

I realise that doesn't answer your question (which seems to be 'please justify React Native having a lot of open Github issues and being seemingly less stable than React') but it seems a bit misleading to conflate the two projects, and to expect the same amount of stability from each. React is a UI library. React Native comprises of a UI library, a JS <-> native binding system with wrappers for native APIs, a build system, and an implementation of CSS-like layout for native views. They are not really comparable.
I had the same problem until I manually focused the emulator window by clicking it. Fine after that. Firefox 51.0.something x32 on Windows 7.
Not in a lot of places, e.g., Canada and Germany, to name two off the top of my head...

(And for the record, I'd happily vote to place additional restrictions on hate speech in the U.S., following the models presented by those two countries. I'm simply not afraid of the slippery slope arguments that people bring up; I think they're fallacious.)
I tried to have it more along the lines of:

"you're stupid if you expect to go to a really shady part of town and not get mugged. If you get mugged, technically, it's not your fault, but you should have seen it coming."

And that's what I think about this guy getting shot. It was less about the police being justified, and more about that person not thinking about the surroundings.

Edit: FWIW I do think the policeman was overzealous.
I'm Indian, and I don't know what you are talking about. I wasn't aware that there was a big group of devs working for politicians.
>I'm beginning to think there'd be a way to make Redux a helluva lot clearer by sticking everything in a class with a well-defined interface (but: ewwwww, classes, impure, burn the heretic!).

I thought the same thing. That's why I started using VueJS with Vuex. Vuex accomplishes the same things as redux in a much more manageable and centralized manner. Plus, you don't have to worry about connecting your components to the store through `react-redux` or whatever. With Vue and Vuex, you just pass the store object to the root view component and it's available in every single child component via `this.$store`. You can then `dispatch` actions which perform `commits` which call `mutations` which update the state. Then, in your component you create a computed property that uses a `getter` to return the piece of application state you want. It's a really simple top down data flow and everything is namespaced. It's so absurdly simple and easy that I don't understand why redux doesn't take a page from vuex's book.

I really should write a Vue + Vuex tutorial for beginners as I'm super happy with the way it works.
So (much like the OP), your non-answer is moving the goalpost and blaming something else, and even that only partially "addresses" the issue brought up? Seems appropriate.
While it seems interesting, I have no idea how one gets a trustworthy supply of such micro doses, not to mention that fact that LSD is a schedule 1 drug. Caffeine seems much easier to obtain.
And just as my bank offers a "login via speaking" option. Lovely.
> Basically, a couple of guys looking to provoke a reaction, and a cop who interacts with them respectfully and is primarily concerned for everyone's safety.

yep

https://www.youtube.com/watch?v=aDtsXYG9b9Y&t=45

https://www.youtube.com/watch?v=aDtsXYG9b9Y&t=90

https://www.youtube.com/watch?v=AWkefVqO9vw&t=10

https://www.youtube.com/watch?v=AWkefVqO9vw&t=73

These guys are a couple of attention seeking jerks.
Why write a glob engine at all when you already have a fast regex implementation that can match both exact paths and plausible subtrees?

The bulk of the haskell code to do this:

parseGlob :: Char -> Char -> String -> Parser Glob
parseGlob escC sepC forbid =
many1' (gpart <|> sep <|> glob <|> alt) >>= return . GGroup . V.fromList
where gpart = globPart escC (sepC : (forbid ++ "{*")) >>= return . GPart
sep = satisfy (== ch2word sepC) >> return GSeparator
alt = do
_ <- AttoC.char '{'
choices <- sepBy' (GEmpty `option` parseGlob escC sepC (",}" ++ forbid)) (char ',')
_ <- AttoC.char '}'
return $ GAlternate $ V.fromList choices
glob = do
res <- takeWhile1 (== ch2word '*')
if B.length res == 1 then
return GSingle
else
return GDouble

wrapParens s = T.concat ["(", s, ")"]

globRegex :: Char -> Glob -> T.Text
globRegex sep GSingle = T.concat ["([^", T.singleton sep, "]*|\\", T.singleton sep, ")"]
globRegex _ GDouble = ".*"
globRegex _ GEmpty = ""
globRegex sep GSeparator = T.singleton sep
globRegex sep (GRepeat a) = T.concat ["(", T.concat (V.toList $ fmap (globRegex sep) a), ")*"]
globRegex sep (GGroup a) = T.concat $ V.toList $ fmap (globRegex sep) a
globRegex _ (GPart p) = T.concatMap efun base
where base = TE.decodeUtf8 p
escChars = S.fromList ".[]()\\{}^$*+"
efun c = if S.member c escChars
then T.concat ["\\", T.singleton c]
else T.singleton c
globRegex sep (GAlternate a) =
if V.null alts
then ""
else T.concat [altsStr, if hasEmpty then "?" else ""]
where hasEmpty = isJust $ V.find (== GEmpty) a
alts = fmap (globRegex sep) $ V.filter (/= GEmpty) a
altsStr = wrapParens $ T.intercalate "|" $ V.toList alts
MicroSlider – Lightweight, Mobile Friendly, Dependency-Free JavaScript Slider
Because police engage in dangerous situations by their very nature. Following them around will likely put followers in unsafe situations as well. Following them and engaging in antagonistic dialog will detract from their ability to do their job. Imagine trying to asses an area before entering a building to deal with a domestic (likely one of the most dangerous things an officer deals with on a regular basis) when someone is antagonizing you.

Filming should be legal. If there is an interaction occurring, police should have the expectation of being filmed. They should be required to wear body cameras. They should be accountable. But what this guy was doing seems to slip over the line into obstruction.
"Using it in production" is not the same thing as making it a dependency on master.

Also, you realize how silly that question is when the two programmers are actually one and the same, right? Like I said, there's nobody who knows the React codebase better than the React Native people.

Edit: You answered your own question better than I could have in your reply.
The difference is Google doesn't sell the data to other people. You agreed to Google reading your email when you signed up for the service, with Google.

Its like saying, my travel agent knows my travel plans.

unrollme on the other hand was asked to do a specific task. And while they were probably really good at it, they took it upon themselves to be curious and find more information, black out some and sell that info to others.

Its like saying, you travel agent sells the data on what car you came in, what you were wearing and what you were feeling when you came to discuss your travel plans.
I didn't say this shouldn't be of interest. I was defending the author of the original comment, which in light of the fact that both accounts belong to you means my intention was ensuring your attribution.

I felt no discomfort here, though granted I haven't read the whole comment. "Same-sex network connections" gave me a chuckle - I assume a reference to the "male" and "female" hardware connectors. I was actually weighing on commending you for the joke before I found out the same words were used elsewhere by another account.

I am surprised by the tone of your reply. I kind of hope most of my downvotes are from you then, as I would hate to see a rise in reposts. I also hope you have an automated way of finding non-positive comments, because knowing you went through them by hand would be somewhat discomforting.

Now, my morality certainly should influence how I view things - that's what it's for. If it is the case that here lies your problem with me, you should be aware that when I say gay I don't have in mind the mere attraction to the same sex, but indulgence, the practice of sexual acts of this nature (which is closer to the original sexualized definition of the term). The distinction may appear subtle, but isn't really. The grave difference is between temptation and sin. In recognizing the difference, one may become accepting of the human without in process compromising that human's soul.
Here is the thing to know about volunteering: you get out of it only as much as you put in.

Back in 2010 I founded a local volunteer organization[1] for young professionals. The idea was to go above and beyond regular volunteering (although we did plenty of that too) and use our professional skills to organize and run larger projects. It was an avenue for personal and professional growth as well as scalable positive impact.

I worked non-stop getting this organization off the ground for over two years, to the point where it became a second job on top of my day job. In the end it seriously burned me out, but I'm proud to say it was a huge success and is alive and well today, despite the fact that the original leaders (including myself) have moved on.

I also learned a lot about the challenges of starting something from scratch, and it's how I originally got interested in startups and ended up joining HN. I apply the lessons I learned from that experience seven years later, in areas that are often completely unrelated.

[1]rotaractlb.org
You answer your own question: society vests them with the authority.

As a similar thought: why do we only allow police to give citations for crimes, instead of allowing anyone to cite anyone for a crime?
1. Is this company new?

2. Is this better then what Google or Baidu are doing?

3. I remember reading Adobe has something similar.

4. Why ( What happened ) that all of a sudden we have 4 company making voice breakthrough tech like these?

5. What Happen to Voice Acting? Places like Japan where they highly value voice actor. Is Voice even patentable?
Politics is a strange bird, and it's really hard to predict the future. Much of the drug policy in the US is not based on science or medicine, and the US government has repeatedly ignored the advice of prestigious scientific and medical bodies and panels to soften its anti-drug stance, reschedule drugs, and treat drug addiction as a medical issue rather than a legal one.

In the meantime, some states have gone ahead and legalized medical marijuana and even recreational marijuana. This was often done by referendum, where voters got to decide, and how voters decided is a complete mystery. Did they take science in to account? Did they care about double-blind trials? Who knows? But considering the massive ignorance of science by the general public, it probably wasn't science that tipped the balance.

I suspect that if wholesale legalization of some currently illegal drugs does come, it will have little to do with science, and more to do with public perception change, and the dying off of old, rabidly anti-drug legalization opponents from another generation.
Being annoying or insulting isn't a crime, but there are lots of other things that are crimes. If you want to hold the system accountable, don't give them any excuse to take you down. If you're going around filming cops, there may not be any legal requirement to be polite and respectful, but you had better be polite and respectful if you want to be effective.
Rethinking Broadcast, Redefining TV
I came up with similar results by just tracking word probabilities and then regenerating text based on those probabilities.

Feeding it Edgar Allen Poe produced the best results:

twelve vibrations of purple air. vortex of its absolute hurricane.
monck flying footsteps of the picture all the police are concerned.
silence on a year in an identity.
materiality escaping the city was their white spot of printing apparatus all things only one supposes it were its mere duration that it in baltimore monument to its luxuriant nature asserts her person whom i not hesitate about five hundred paces to have not the principia of idiotic thought of curvature or metamorphosis these friends were in an earthquake and the then i felt my chair so rigidly of interest could not summon courage

Here's the TED version I just generated using the input.txt from one of the linked articles: https://github.com/samim23/TED-RNN/

educationists made around in our modern medicine.
gq did make perfect mankind which the blue pill every week had infinite instant messaging that sucks when your food day that previous background is about being foreign interventions. psychopharmaceutical arsenal.
attached to tail but a distribution units in our traditional estimates that men engineers who negotiate my whole province of long awkward to call it came back go deep conversations you grow fast when there been around the long lever systems.

entertaining anyway, and occasionally amazing
So... the police made a mistake, but that's OK. The guy made a mistake, but he died and that's warranted (your word!).

It's the asymmetry of this morality that horrifies me. I can understand people who think this is a terrible mistake but still sympathize with the officers and don't want to see them punished. But you guys... yikes.
http://www.politifact.com/truth-o-meter/article/2013/feb/01/...

According to the institute’s data, a two-earner couple receiving an average wage — $44,600 per spouse in 2012 dollars — and turning 65 in 2010 would have paid $722,000 into Social Security and Medicare and can be expected to take out $966,000 in benefits. So, this couple will be paid about one-third more in benefits than they paid in taxes.

Some types of families did much better than average. A couple with only one spouse working (and receiving the same average wage) would have paid in $361,000 if they turned 65 in 2010, but can expect to get back $854,000 — more than double what they paid in. In 1980, this same 65-year-old couple would have received five times more than what they paid in, while in 1960, such a couple would have ended up with 14 times what they put in.

Such findings suggest that, even allowing for inflation and investment gains, many seniors will receive much more in benefits than what they paid in.
I agree it feels out of place in that list. Most of the rest of the principles are prescriptive: "Do this" or "Take that action" or "Keep this in mind", whereas this one is an after-the-fact measurement. The rest of them are things you can wake up one day and decide to incorporate into your life. "Being right" is not such a thing. They should probably re-write it with something like "Use good judgment" or "Seek diverse perspectives."
The performance part doesn't make sense to me either. What are they serializing in a CRM that is so time-critical? I found a benchmark [0] that shows differences of like .2 milliseconds for a 904 byte array.

[0] http://techblog.procurios.nl/k/n618/news/view/34972/14863/ca...
Good to know there's still hope :)
> Almost any civilian action (e.g. filming police / protests) encourages the 'us vs them' attitude and encourages police to close ranks.

IMO, if you are not able to shrug off people exercising their rights even if it bothers you you are unfit of being a police officer. Or any civil servant for that matter.
Google's next trick for Android is 'copyless pasting'
Huawei huh, kinda turned me off when I bought their premium Ascend P6 and while it was well built, it had weird issues with the GPS (not working at all while driving), screen artifacts and micro SD card being constantly removed.

Oh and everything was seriously underclocked, CPU, GPU and RAM. It only went to maximum clocks after being over 99% load for a few seconds, so pretty much never, OR when it ran a benchmark app. Smartasses.

Fortunately it was really easy to undervolt and over clock (well, clock to advertised specs, at which it got hot as hell and ate through the battery faster than it would charge).

Really liked the hackability of that SOC, but Huawei pretty much lied about its performance.
Since LinkedIn changed the UI, signups to my Showcase pages that are newsfeeds about famous entrepreneurs [1] have dropped by over 70%, making the work involved in curation almost worthless. If they are trying to make a social network that allows people to share business-related content they are failing badly.

[1]https://www.linkedin.com/company/elon-musk-newslines
Not at all. In civilized countries, police are specifically trained to stop, not to kill. Sometimes one may imply the other, but not necessarily.
I doubt it. I spend my days looking at this "smart city" trend, it seems that in the future modern services will allow cities and city planners to focus on more things like community spaces and social infrastructure. As it stands today I'd hazard over 85% of the productivity within a city at the government layer is spend managing and dealing with existing infrastructure. Very bullish on cities. Highly recommend reading
Triumph of the City: How Our Greatest Invention Makes Us Richer, Smarter, Greener, Healthier, and Happier
by Edward Glaeser
The Intel Optane Memory (SSD) Preview: 32GB of Kaby Lake Caching
> Create React App is a thin layer on top of Webpack and Babel. It doesn’t generate the project code for you, but it configures those tools in the recommended way.

TIL. I've been manually setting up my own configs for years now, and never touched this tool because I thought it was literally creating a sample/boilerplate app for you much like the express.js cli generator.
Seems like 'provocative' and 'provocateur' are reasonable descriptions of this behavior and this person.
> All the world leaders should be spent to space

You know what I'm afraid of? Some country's leader will go up there, see their bit, and think "All the rest of that should be mine."

I agree with your sentiment, but writing it is based on the assumption that all people are like you (or us) in our sense of goals and community. It's not true.
Ask HN: Pointers for Aug 21 Eclipse?
Looking for ideas from the community on the upcoming solar eclipse. In particular, where to be, what to look for (interesting phenomena, etc), what equipment to have, and so on.
Watch this Larry Page-backed flying car take to the sky
Back in my carefree youth, I often took LSD multiple times a week. I never noticed any sort of "tolerance"... tripping was tripping. Of course, not microdosing, and not daily, but it doesn't feel like a "tolerance" drug, really, the way, say, opiates are a tolerance drug.
Idiot much?

https://www.washingtonpost.com/news/volokh-conspiracy/wp/201...
Clearly you don't realize the origin of SELinux and why it's such a limp dick.
Big Automakers and Top Ridesharing Startups Seal Pacts for Next-Wave Technology
Oh wow, you really dug out a sockpuppet to downvote me for pointing out that comparison you shredding was YOUR comparision?

That's really sad.
Honest question: Are you serious?

I can think of a number if situations in a number of jobs I have had were people following me around could have been dangerous (farm hand, concrete work etc).