skysight-inc/HackerNews huggingface dataset:
Weird: Depends. I think that an async function might sometimes complete synchronously is not weird - it can happen in many scenarios where the least common denominator is "The function might sometimes take a long time and therfore has to be async". Having a different return type depending on the taken path (Value or Promise<Value>) is definitely weird and should not be encouraged (although supported by JS). I'm therefore in favor of the decision that an async function always returns a Promise - I just wanted to know if anybody has more insight on how the decision was taken and if the performance impact has been considered.

Thanks for bringing up the issue around that an await on a value will wrap it into a promise before! That means even the following "workaround" would not work:

function getFromCacheOrRemote() {
if (random()) {
return "Got it";
} else {
return DoSomethingLongRunnningWhichMightUseAsyncAwaitInternally()
.then(() => "Got from network");
}
}

var result = await getFromCacheOrRemote();

Here getFromCacheOrRemote interferes correctly as type string | Promise<string> in typescript. However if an await on the function will still trigger a Promise creation and the await an eventloop iteration it won't buy anything compared to the simply solution. Seems like to profit from synchronous completions there's also some steps on the callsite needed like:

var maybePromise = getFromCacheOrRemote();
var result;
if (typeof maybePromise === 'object' && maybePromise.then != null)
result = await maybePromise;
else
result = maybePromise;

And just for clarification: I wouldn't encourage any normal application to do this kind of things, the normal async functions should be great for them. However for some libraries (e.g. high-performance networking libraries) these optimizations can make sense. And e.g. the awaitable ValueTask<T> in C# was created with exactly those scenarios in mind.
Can someone get opencv running on it?
I think the answer here is analogous between spoken and programming languages. When I was learning Japanese the thing that made me grok the grammar was when I stopped "learning" and started imitating - that is, instead of trying to know all the rules needed to translate what I wanted to say from English, when I concentrated on reading lots of sentences in the target language, and saying things in Japanese using the patterns I saw there.

So for programming the same gimmick would amount to, rather than just building code out of the constructs you're most comfortable with, also read code written by experts and try to imitate the patterns you find there.
Python (in its CPython) incarnation is pretty slow usually. You can use PyPy (a JIT implementation of most of the Python spec) for dramatically more speed, but the code needs to be ported to work under PyPy.

The real comparison should be a language that is both functional and imperative and that allows you to write as brief a source code as you can do in Haskell.

Such a language is Common Lisp, and it will compile directly to machine language doing many optimizations.
I think your daughter is lucky to be going to an exceptional school that teaches programming at age ten. The vast, vast majority of American students do not have these kinds of courses. May I ask what school system your daughter is in?
Another Electron app, yay...
This 3D production customisation tool is worth checking out if you're into guitars, WebGL, ThreeJS, Angular 2+, Ionic Framework (2+) or web tech demos in general. It's not that often you see a real life use of 3D on the web that people actually want/need to use, so hopefully this makes a nice change :)

@webprofusion
at least you are allowed (i assume) to check HN every now and then during office/work hours? There is always worse :)
I dont see a problem. Japan loves raccoons, they are really cute and sweet and smart. They even put them on game shows:

https://youtu.be/eesxH2-8Jlo
> And frankly, if you can't point to bugs or performance issues, it's likely you don't need to be refactoring in the first place!

I feel this is a lack of clarity around the word refactoring. Improving the code in a way that fixes bugs is "bug fixing", in a way that makes it do its job faster is "optimisation" and in a way that improves the design is "refactoring".

Of course one can do several of them at the same time. And add features, at least in the small.

Refactoring can be a valuable activity for bits of a code base where the cost of change could be usefully reduced. It's useful to have a word that can be used to describe that activity that isn't commonly conflated with bug-fixing or optimisation.
Ask HN: Do we limit a mind by teaching it how to think?
Parents try to raise their kids inside the box to give them the best possible chances of success in society. Employers then tell their employees to think outside of the box. In a society where creativity and new ideas are prized, are we restricting a mind's imagination with mental disciplines during its formative stages?
It's already a 5 hour work day, it's just inside of an 8 hour attendance day.
One issue is that most companies would take a person asking for a lighter work hours as lazy, or not motivated
No matter the company, there will always have "that" vibe when wanting less hours, unless they are specifically seeking a part time

"What's wrong, don't you want to work 50 hours a week like the rest of us ? What's the matter ? Not motivated ?"
I remember having to muck about with autoexec.bat files when I was SIX (this was a quarter century ago) because our 386 desktop had enough memory to run either Windows 3.1 or the CD-ROM drive, but not both simultaneously. Granted, I was just copying instructions that my dad had written into a workbook, not writing the file myself.
Agreed. WebAssembly is not a replacement; the point was not to allow to write extensions in native language, the point was to have a mechanism for escaping the browser sandbox in a controlled way.

Google could have allowed Chrome to be used as a cross-platform GUI library (THE cross platform GUI library), but left it to Electron (lagging behind and requiring distribution); think XUL runner. I don't see the sense in that. I'd absolutely love a modern XUL runner.
His personal life aside, the big drama for him was the fact that the people he wrote for didn't really have much chance to read it. Sure, the underground press was well developed, but for most people getting Milosz's books wasn't easy at all. One couldn't even dream about reading his all works.
Then, after 1989, his books were finally officially published - but at this point several of them were less relevant. For example one of his most famous works, The Captive Mind, had been written in 1951 - almost 40 years earlier, with clues and subtle references to some contemporary writers and situations. There was no way the readers of '89, especially more young ones, would appreciate it as much as those who the book was written for - and who couldn't read it then.
ahah yes, true, and this makes people like he and i mad,
i guess some kind of hyperactivity.
I actually don't think you are incorrect. GNU is not nearly as big a piece of the puzzle as it used to be. It's just that when most people say "Linux Desktop", the part where they say "Linux" usually means the part that GNU makes up. As far as I know, GNU libc is still by far and away the most popular libc installed on those kinds of systems.

So it was just kind of a snarky joke because the parent said that to be a "Linux Desktop" you had to be able to get ssh running (presumably they meant openssh). And while that's not GNU, GNU is what the vast majority of "Linux Desktops" will use to get you there -- so the implication really was that "Linux Desktop" == "GNU/Linux Desktop".

I thought it was funny, but probably I was being too obscure. Also, I should know better than to dive into politics for no good reason.
More like a let's touch that code for an hour or so day. ;)
/r/tenguy
I took `contents` from here[0] but I like your random ints much better!

[0]: https://github.com/vaibhavsagar/thursday-presentations/blob/...
See Kickstarter page [1] for a lot of "In Action" videos.

[1]: https://www.kickstarter.com/projects/871405126/turing-tumble...
As @DougWebb said, immediate cost saved is the easiest way to sell CI, especially if the savings are large.

He didn't say it was the only way. Nor that you can't add more arguments if cost savings alone isn't convincing enough.
> Yes there are many ways: migrate from incandescent to LED, run LEDs at lower PWM duty cycle, reduce number of lights, etc.

All of which affect the subjective beauty of them.

> Comparing production to production is exactly what the article is doing.

It's not - comparing market cap (a total value measure) to GDP (a per-year measure) is dishonest.

> RTGS transactions are reversible. Eg. when fraud is detected, banks simply agree to perform a reverse transfer.

Agreeing to perform a reverse transfer will be possible in any system you could meaningfully call a currency. It's certainly possible with bitcoin.
Have you looked at meesho? They are a YC company helping businesses sell using WhatsApp and Instagram. http://meesho.com/

(not affiliated with meesho)
This is not the case. Many believe that CT is a way of thinking that can be completely separated from programming, and taught as an independent thinking skill.

For instance, the article talks about the problems is assessing CT. There is no such problem in assessing programming, just ask someone to solve a problem using their preferred language.
Of course there's been progress, or we wouldn't be able to even start working on this project with such limited resources as we have now — that's like $5000 for total hardware (still 4u rack though, +INS, +cameras, no corrected GPS), the main problem being the inability to buy something like tBOX [0] with a more powerful CPU. Though we are counting on both our system getting optimized and industrial PCs catching up in a year or two.

What I meant to say, though things are a lot simpler now, they are not that simple to discount the Yet Another™ lidar-based self-driving car.

[0] http://www.axiomtek.com/Default.aspx?MenuId=Products&Functio...
There is "seek time" in SSDs, just as there is "seek time" in RAM. It's just orders of magnitude faster.

Some of the principles remain the same across disk, SSD and RAM. Sequential access is usually faster than random ("seek") access.

Seek time from a storage point of view just means the lookup latency - the cost of jumping to a random source of data (an area on disk or in memory or in another datacenter). You could think of a hash table lookup as "seek time". It could be attributed to an L1/L2 cache reference, main memory reference, physical disk seek or network roundtrip etc.

Just because the concept of "seek time" originated with spinning rust does not mean it must remain there.

See: https://gist.github.com/jboner/2841832
They're not raccoons, they're canine called "raccoon dogs" because they look like raccoons.

But biologically speaking they have little in common with raccoons.
I agree.

Happiness understood in hedonistic terms, what most people nowadays search, is futile, because a single inconvenience will make us unhappy.

However, optimising for virtue, as the stoics understood it, can make feel that we are doing what must be done and this brings peace, despite of any inconvenience.

Living and humble life, setting realistic goals (but not lazy ones, of course), caring for parents, spouse and children, and thinking in terms of virtue can help a lot.
Note that node 8.0.0 is not LTS.
Node 8.x will be an LTS release around October.
> autocompletion for reference-tags based on labels in project.

Soon ;)
Sharing data for the common good?
Yeah mostly on HN while:

* Tests are running.

* long-running scripts are running.

* Code is compiling.

* Database is importing.

* Files are copying.

* etc

Thank goodness for this site and a few others.
Not for every device. Desktops aren't obsolete, some laptops never leave their desk and Chrome is a target for WebAssembly.
this is interesting. but there's value in slogging through "old-school" programming, complete with stacktraces, debugging, and battles with syntax.
>go to whole foods and use their monster-fast chargers. You can do a whole car in just a few hours

I'm sorry but things like this always come up and I can't keep my head from shaking at these types of comments.
So, you don't have other options to charge and simply go somewhere else where there is a charger that can do a car in "a few hours"?!

So, I guess you say if you can do it, everybody else in that situation can, too? A short thought experiment, if everybody else did exactly that, how often would you say you will find your charger occupied? And since it is "a few hours" per car, you are in for a nice long shopping spree in whole foods while you wait for the guy in front of you to finally drive off. IF you are already next in line, that is. "Hi Honey, sorry, it'll be a couple of hours till I'm home. What? No, I'm not working late, I just want to gas up the EV and there is one person in front of me."

And before you say "But there are two or three chargers there" I say: And all would be constantly occupied if EV adoption would take of as many here wanted it to. The only way this could technically happen would if if at a snap of a finger suddenly every parking space had a charger available. Then the EV industry could go "Buy an EV today, no matter where you park, you can always charge it" Before something like that is in place, the odd charger at whole foods ONLY works as a solution as long as only a tiny subset of driver choose an EV. If not, you will find yourself cursing all the other EV drivers that constantly block your charging spot and you curse at anyone who still tries to drum up support for EV adoption. Cause that just means an even longer queue to get to your charger.
If a have a table with an email column, can I pivot by email domain?
Why are oil changes so frequent in the USA? Here in Germany the manufacturer's recommendation is usually an oil change every ~10k miles or once a year (whichever come first).
Ask HN: Brevity in Haskell versus Common Lisp
I'm a CL developer, not a Haskell developer. But, in the interest of the Great Northern Wars [1], i need to ask HN:

+++ Is there any example out there on the web of a code made significantly briefer in Haskell (versus Clojure/Common Lisp/Arc/Racket/Scheme), while still being reasonably understandable? +++

I know this question cannot have a definite answer[2], so feel free to do not-so-serious answers as well.

[1] Great Northern Wars: See reference picture:

http://lemonodor.com/images/functional-programming-is-beautiful-s.jpg

Comic author: Conrad Barsky, MD.

[2] I found this nice, fun comparison of the "fake" quicksort that is typically used to show how brief can Haskell code be. The author proceeds to write the same algorithm under Common Lisp with good results:

http://blog.thezerobit.com/2012/09/01/beautiful-quicksort-in-common-lisp.html
For a different perspective, consider the Netherlands where the right to work part-time is enshrined in law. It's really common for people to switch to 36 or 32 hours having previously worked 40 hours full-time, and it's culturally acceptable and isn't seen as lazy or unmotivated.

http://www.economist.com/blogs/economist-explains/2015/05/ec...
Qualcomm, Microsoft Announce Snapdragon 835 PCs with Gigabit LTE
Related, the tool https://github.com/yugr/sortcheck will check that qsort comparison functions are sane. It's found quite a few errors
> if you can measure how much time a computation takes, then Haskell is impure

gettimeofday requires IO, so the computation would depend on dynamic inputs, but that doesn't make it impure. If the program knows how long one of its computations took, that's only because an oracle (outer layer of abstraction) told it.

> Another problem with seeing purity as fundamental is that our physical reality isn't a persistent data structure

I like this line of reasoning, but would take the opposite conclusion. The universe is symmetric with respect to time, and indeed, information is conserved. Past states aren't easily accessible, but they have not been erased. This sounds like a fine working definition for persistent data structures.

> there's a strong suspicion that the (pure) type signature of runST has no pure implementation

Interesting, thanks for bringing it up!
2 weeks is not enough of a dataset. Habits have to be unlearned and off-work time reorganized.

Come back in a year.

Also, it would be better to ask the manager's observations regarding productivity. Biases and all, you see.
This is a awesome resource, thanks a lot! Some of these books are of course quite old. For example I would not recommend trying to learning contemporary German using this [1] book. Reading 'fraktur' alone can be rather challenging …

[1] [Worman, J. H.: Erstes Deutsches Buch, nach der Natürlichen Methode, für Schule und Haus, American Book Company, New York 1880](https://vivariumnovum.it/edizioni/libri/dominio-pubblico/Wor...)
There's a folk song about Moreton Bay that details some of the horrible things Logan did. Here's a pretty recent rendition by a couple of British folk musicians (apologies to any Australians who know of good Aussie versions): https://saulrosejamesdelarre.bandcamp.com/track/moreton-bay. Although lyrics change over time, folk songs are often a good record of events as they were usually created by less literate people and you get the working man's viewpoint essentially by word-of-mouth.
MCQ Questions on C++ with Answer Set-2 – InfoTechSite
This isn't about high level concepts like RAM or variables but actually understanding how a computer works -- a fair number of actual programmers have no idea of how a computer actually multiplies a number -- it might as well be magic as far as they know.

As for number of ball drops for anything "sophisticated", it all depends on the meaning of "sophisticated" -- basically what the guy proposes is a modern, more flexible version of 1960s marble teaching computers like the DigiComp II. You couldn't use them to compute anything practical, yes, but that wasn't the point. Here's a link to the DigiComp II manual to see what you could do with them: http://cdn2.evilmadscience.com/KitInstrux/DCII-manual.pdf
They'd be a lot happier with being out for that time rather than having to replace a bunch of hardware.
Reminds me of Cunnigham's Law: "the best way to get the right answer on the internet is not to ask a question; it's to post the wrong answer."
Unless it is a really crappy laptop.
SS officers didn't really have a gun pointed to their heads. They could refuse.

But it was the combination of the difficulty of saying no to authority and probably peer pressure , together with the reasonable possibility they'll be sent to the front lines (not even as a punishment , but because that's what men did back than).
You're assuming that we can only ever add to languages, not constrain them. Yes if your program has 6 decision points and you model each possible combination explicitly then your model will have 2^6 possible states - but you don't have to model it that way. In previous discussions you've said that humans understand these programs by using symmetries to drastically reduce the size of the state space - let the tool do the same thing.
I really wish more companies would be willing to do this, as a childless adult I have no need for more than 20 hours worth of pay, and my health definitely benefits on a lighter schedule.

Currently I'm achieving this through contracting but I would much rather have a more typical employment situation to reduce the administrative burden and the need for sales.
Yes, beside those you listed (that are not common in a normal conversation) there is a large number of Latin derived words in English, as a rule of thumb, there are almost always two words in English a non-latin derived one and a latin derived one having more or less the same meaning (or a near enough one).

Usually native English speaking people will use the non-latin one, but of course they also generally know it (or at least have heard or read the "other" one) so they can understand you alright, but I am told that if/once you are proficient enough in English, when you - mistakenly - use the latin based ones you sound like being snob or "upper class" or very formal (and wanting to seem so).

A few examples (of common words):

apartment=flat < I never managed to get this right

obscurity=darkness

arms=weapons

annually=yearly

legal=lawful

constructor=builder

transmit/transmitted=send/sent

custodian=keeper
AlphaGo AI is retiring
To me it's often that when I see screenshots of MacOS I usually assume that it's Mac only software and most of the time it's true
>Until a computer decides that it wants to win a chess tournament and teaches itself how to play

The AI doesn't need to be fully conscious to kick a human's arse in the workspace.
You are
Thanks for your linking! Just in case, the lodash might not be a big problem since I have already using babel-plugin-lodash, it won't bundle the whole lodash in the final bundle.
>>without writing a single line of code

Umm, how? You have a web app, you provide people with an admin dashboard to interact with the messaging apps. Am I missing something here?
If mysql handled columns declared as "ascii" as utf8 that would be "compatible" in the sense you're describing. I think it would be fair to say "mysql ascii isn't actually ascii" in that case though.
Sounds like a rewrite, but it's just a wrapper.
I recently switched to a 36 hour week from 40 hours, which fortunately is something enshrined by law in the Netherlands.

I had the option of working 36 hours each week, but they wouldn't allow more than an 8 hour day. Having one half-day seemed to me like a total waste; not only do I still have to commute every day of the week, I'd only have a short amount of productive time.

So now I do 40/32 and have every other Friday off. It's great. While I work 10% less, and nominally get paid 10% less, the way taxes work out I ultimately only make 7.xx% less.
Ask HN: CRM for small business ~500 clients
Looking for a Customer Relationship Management solution for a small business with approximately 500 clients.

Requirements are pretty basic but must be able to email personalised emails to all / groups of clients.

Any suggestions?
Top 6 Mistakes to Avoid in Businesses Mobile App Development
It is the easy parallelism that is the key feature here.
Radio broadcasting only live forest sounds
> use the latin based ones you sound like being snob or "upper class" or very formal (and wanting to seem so)

I'm guessing that distinction comes from the norman conquest, with the upper class speaking French with the latin version for 500 years and the lower class speaking a germanic version.
The article claims ancient Egyptians are more similar to people of Near East. "The study found that modern Egyptians share more ancestry with Sub-Saharan Africans than ancient Egyptians did, whereas ancient Egyptians were found to be most closely related to ancient people from the Near East"

However, there is not enough sample data to make a universal assertion. What if Egyptian Pharos were a bit like European royalties, where the Austrian princess would marry the ruler of France or German royalty would marry the Russian Tzar. And these mummified people were prince or princes from Near East empires marrying into Egyptian royalty to forge political bonds?