skysight-inc/HackerNews huggingface dataset:
I really like Chiang Mai. I haven't been to Manila, but from what I've read, it sounds like Chiang Mai is a nicer place to live. It's very cheap and has very fast internet. I think it's also very safe, especially late at night. (Apart from the roads, which are very dangerous compared to other countries.)

English is not a problem at all. You can get by with English at many (if not most) restaurants, shops, apartments, lawyers, accountants, hospitals, dentists, etc. etc.
> If you don't share the same taste in music, that's going to be a problem. The concerts I go to are filled with men. Besides, I've never been to a concert where people were walking around mingling and meeting each other; they were there to listen to the music, not socialize.

I don't disagree. It can be hard to find activities which are popular with both sexes. I don't really know what to tell you, except that, I'm sorry you didn't luck out in being interested in any of those activities. I would suggest trying to develop a taste for other activities, but I don't think its in my place to ask you to do anything :). I am after all a stranger on the internet.

> I've spent plenty of time in coffee shops. I've had a number of first dates there too. I have never seen anyone introduce themselves to someone in a coffee shop, unless it was obvious that they were planning to meet there. Instead, most people I see there are busy: they're either with a friend(s), or they're busy working on their computer. They're not there to get picked up. If I were a woman, I'd be annoyed if I couldn't go to a coffee shop and relax without a bunch of men hitting on me.

I agree here as well. If you read my other comment, you will see that most of my interactions are incidental, not forced. Its hard to explain, but you have to develop a certain social awareness and curiosity.
> TDD is for unit tests

Never heard anyone say this. Kent Beck has said the opposite on podcasts.
The specific price comparisons aside, it would make sense to offer ownership after X months. So you can position yourself as a rental + financing service. If you pay rent for, say 14 months, you own the stuff.
> When we strike back, does Russia then strike back again?

It seems that Russia is happy to continually strike regardless of retaliation.
The Apache Software Foundation Announces Annual Report for 2017 Fiscal Year
Sure thing. G'night!
I'm not really convinced by this article or by the comments.

You can do exploratory code and TDD at the same time - you just have to write down what you expect the code to do first.

These criticisms of TDD are very weak because they don't spell out an alternative - every critic's vision of proper testing is different - and will respond "that's not what I meant".
>this process has about an 80% roundtrip efficiency

How is that possible? Even if you assume frictionless pipes and lossless power transmission, that's assuming 90% efficiency for both the pump and the generator.
Makes me think of Kevin Kelly (http://kk.org). His 1994 book Out of Control, read retrospectively, has held up better than any other prognostication I can think of concerning the nexus of business and technology. Neal Stephenson's 1999 Cryptonomicon is another staggering example. Asimov. Orwell. Machiavelli. Musashi. Tzu. There are the 'A' players of thought leadership, and there is everyone else.
Mkosi – a tool for os image generation
Whether they _could_ is an open question. They voluntarily agreed not to, presumably since there are other sources for those images, so it isn't worth picking a fight over. The real hardship would have been in removing and replacing all the old images.
That addresses healthcare, but health insurance is just one slice of the insurance market.

I'm not aware of a general solution that covers all cases, but in auto insurance we found that the model of replacing underwriters with crowdfunded groups works.
> instead of just vomiting knowledge read elsewhere

that's a nice line and describes some very high karma HN denizens.
The real problem is that Hong Kong existed as an arbitrage hub to an artificially closed hinterland during a political time warp, and when China finally opened up, Hong Kong's fate was already sealed. Hong Kong still has some first-world advantages to exploit, but the number is dwindling day by day.
Informit.com is a Pearson owned site and we sell the following tech imprints for all levels:
Addison-Wesley, Prentice Hall, Sams, Microsoft Press, Cisco Press, Pearston IT Certification, Que, Big Nerd Ranch, Peachpit, Adobe Press, and New Riders.

We have regular holiday sales (including a 4th of July sale starting tomorrow), update our eBooks, and offer the different DRM-Free formats including PDF, MOBI and EPUB.
Character escapes and string formatting (printf, String.Format in .NET) fall into this category as well. They’re weird little domain-specific sublanguages that are entirely unlike their host languages, which people don’t even think of as DSLs because they’re so pervasive and (somewhat) consistent across languages.
California should use the power to mine bitcoin!! :)
Basically all comparison-based sort algorithms we use today stem from two basic algorithms: mergesort (stable sort, from 1945) and quicksort (unstable sort, from 1959).

Mergesort was improved by Tim Peters in 2002 and that became timsort. He invented a way to take advantage of pre-sorted intervals in arrays to speed up sorting. It's basically an additional layer over mergesort with a few other low-level tricks to minimize the amount memcpying.

Quicksort was improved by David Musser in 1997 when he developed introsort. He set a strict worst-case bound of O(n log n) on the algorithm, as well as improved the pivot selection strategy. And people are inventing new ways of pivot selection all the time. E.g. Andrei Alexandrescu has published a new method in 2017[1].

In 2016 Edelkamp and Weiß found a way to eliminate branch mispredictions during the partitioning phase in quicksort/introsort. This is a vast improvement. The same year Orson Peters adopted this technique and developed pattern-defeating quicksort. He also figured out multiple ways to take advantage of partially sorted arrays.

Sorting is a mostly "solved" problem in theory, but as new hardware emerges different aspects of implementations become more or less important (cache, memory, branch prediction) and then we figure out new tricks to take advantage of modern hardware. And finally, multicore became a thing fairly recently so there's a push to explore sorting in yet another direction...

[1] http://erdani.com/research/sea2017.pdf
Show HN: Navalia – Queue and manage headless chrome
I'm not sure I understand the reference since I don't comment on or look at much blockchain related articles here on HN. (Most of my research has been tangential to my former employment as a web security developer.)

Is there a technical reason that a blockchain isn't suitable as one part of a possible solution to improving the speed, reliability and security of voting in the United States? My understanding of the blockchain concept is that what it provides is a proof-of-effort consensus-based system for creating an open and auditable ledger for transactions which would seem to fit the requirement of having an open and verifiable voting ledger for ballot initiatives.
it is far easier to promise service than it is to pay for it. in that regard making promises to the users of the service and workers is one thing, when it comes to paying the bill they always kick the can down the road.

NYC is the only American city which relies on heavy transit, just a little more than half the people working there use it. Only one other city crests ten percent and the after that its five percent and down.

It is the most expensive transportation option available to commuters at all stages when you calculate it per passenger mile, this is with subsidies included. Even building all those roads the automobile less that a fourth of the cost and most public transit will be superseded by autonomous cars and buses; the later which can adapt to changing needs that subway and heavy rail cannot.

Besides all the deferred maintenance and NYC is not alone in this, many lines are tens of billions in deferred maintenance, many lines face hundreds of millions with a few at a billion in underfunded pensions. Worse, subsidies have not increased ridership but instead employment. When most lines came about in the hay days of such it was nearly 60k riders per worker, that has fallen to less than 30k riders being served per worker.

the simple fact is that such transit is expensive to build and maintain and even with incredible subsidy they cannot get enough people to ride it though NYC gets close. NYC has the same problem the rest do, no one wants to pay anywhere near what the actual cost is per passenger mile to use it.
The new projects Fineract and Mynewt are particularly exciting.
But if you lend to high-risk creditors, you have to have non-repayment built into the rate. As of the last time I saw an article on it, the rate of default for payday loans was something like 50%. High interest rates are there to absorb the risk.
Something I've wanted to try for years is what about a Lego refraction distillation tower? Similar to how oil refineries use a tower to sort hydrocarbon compounds by length based on their volatility. Except in this case instead of using heat we would use air blowing upward in a long tube to make the pieces "volatile". Picture a 6" diameter clear tube stretching floor to ceiling with a powerful blower at the base. Or a smaller version could be prototyped using an air popcorn popper with the heating element disabled.

Essentially it would sort pieces according to their free-fall terminal velocity. You could exploit the Venturi effect to make the bottom of the tube have a higher velocity than the top, or simply add bleed-air holes at progressive levels. There could be take-off doors at different levels of the tube. A nice property is that if the ingress and egress mechanisms are designed elegantly, it could run continuously.

(Although, that last point is one reason I've never built it: it seems like there would be a fine line between "air powered sorter" and "air powered rock tumbler" and I worry it could wear the corners of all my Lego bricks if it goes wrong.)

Another potential issue is that there might not be much logical relationship between the pieces which share similar terminal velocities, and different pieces may have different or metastable terminal velocities depending on initial orientation.

Obviously this wouldn't be a perfect sorter, but it could be a good pre- or post- sorter for your visual system. And for my purposes it might work well since instead of adapting the system to suit my sorting preferences I could simply train my sorting expectations based on what I learn the machine tends to sort together.

Hmmm now that I have an industrial dust collector installed in my workshop, I actually already have the bulkiest / most expensive part of this invention. I just need a tall acrylic tube and I could try this!
NJTransit and Subways failing at the same time makes it really hard for commuters especially ones with families and kids who need to be picked up and dropped at day care and schools. The lack of leadership and vision are making Big Apple into a third world country. What good is it for customers to have free wifi on Streets but failing subways.
From https://en.wikipedia.org/wiki/Pumped-storage_hydroelectricit...

> The round-trip energy efficiency of PSH varies between 70%–80%,[4][5][6][7] with some sources claiming up to 87%.[8]
You are two users each talking about your team to promote a framework. I'll take some actual time to look at some code from the sole link here, which is the website:

class DataDriven extends Specification {
def "maximum of two numbers"() {
expect:
Math.max(a, b) == c

where:
a | b || c
3 | 5 || 5
7 | 0 || 7
0 | 0 || 0
}
}

I see here a DSL that

* defines blocks without curlies by overloading the C-style label syntax normally used for break targets

* overloads the | and || operators to build tables of data without quotes around it

* uses strings as function names instead of camelCase

The Apache Groovy DSL enables that by having a complex grammar and intercepting the AST during the compile. Clojure, also for the JVM, has a simple grammar and provides macros, which are convenient for eliminating syntax in repetitive tests. I switched from Groovy 1.x to Clojure years ago for testing on the JVM.
Man I love a good smack down letter :-). This one is typical of the genre, in terms of content and well executed. I particularly like that they cite the Righthaven LLC case because a really good letter points out all the scumbags who have tried to do what you are trying to do and lets the reader know you think they are scumbags without actually having to call that out directly.

I wonder if they would be interested in writing a letter to the "JustPrintIt 3D" people. (see video https://www.youtube.com/watch?v=NPnhkQZ9fzM)
One of the problems is that hardware changes. Long time ago memory was very limited and there was virtually no cost with branching. Now we have very complex pipelined architecture with branch prediction, many levels of cache, microcode, etc. And memory is plenty.
A Stunt Turns Deadly for a Couple Seeking YouTube Fame
Hi everyone - since Dropbox is deprecating its Photos/Albums feature tomorrow, I built this! It creates a slideshow, viewable on any device, just from the URL of a shared Dropbox folder containing photos.
Well, solar farms in CA are mostly in deserts, where hydro reservoirs are not that feasible.
That really depends. I've seen a lot of contract engagements where part of "the work" is just being there (or available) during standard business hours (e.g., 40h) regardless of whether you're doing anything. So depending on the situation, it is a "gray area".
This is pretty similar to saying, "I don't rent cars, I just steal them." You're buying things, keeping them for <1 year, then returning them for the full value?

Even if this is allowed/legal, it isn't exactly moral.
Sort of. There are California cities that already have desalination plants. It's okay for retail users on the coast (who are okay paying a bit more).

Agriculture is different. They rely on much cheaper prices and besides, you'd have to transport it uphill.
I don't think you can introduce new syntax in Python and have it run as part of the language, so magic methods, decorators and metaclasses are as good as it gets. You'd have to write a parser to handle new syntax, and that makes it external, right?
MileagePlus Updates
How do asymmetry and angular momentum affect this? Or how do they affect terminal velocity in general? (For example, what can happen to a Lego plate which has a very different terminal velocity in one orientation than in another?)
I hate this separations based on gender.
This seems to be a temporary problem until green electricity has the capacity and is cheap enough to be used year-round.

Natural gas is so much cheaper on a $/BTU basis, but perhaps with enough solar capacity (or other green sources) that wont be the case much longer. It would be great if I could keep cool and warm using electricity alone.
Well we need all the reasons we can get for adding dam capacity.
Did you look at that link? Excerpt:

> If you are a PRC citizen (and most HK people are), you can get a Mainland travel permit, then you can work and settle in Mainland China without restrictions. Getting a Mainland travel permit is a routine matter, and almost everyone in Hong Kong can get one.

This is completely, entirely different from a Palestinian living in the West Bank. It is _not_ a routine matter for them to get a permit to work and settle in Israel proper without restrictions; it is extremely difficult to do so.

It's worth pointing out the unequal nature of the restrictions - with Israel/Palestine, members of the dominant power have the advantage over the weaker power (Palestine). Israeli settlers are able to move into the Palestinian territories much more easily than Palestinians are able to move to Israel (and Israeli settlements and annexation of the Palestinian territories exist, while the opposite is nonexistent for the Palestinians). This is most definitely not the case in China - Mainlanders aren't given preferential treatment over Hong Kong locals.

It's also not correct to think about them as separate entities like Israel and Palestine, since Hong Kong is represented in the National People's Congress. Palestinians do not get representatives in the Israeli Knesset, as HK citizens get in the NPC. The PLA is supposed to protect HK citizens, the IDF is not there to protect Palestinians - in fact, one of the goals of the IDF is to fight against the Palestinians. The goal of the PRC is to integrate HK into the mainland proper, the goal of Israel is to exclude the Palestinians from Israel. The government of HK is a local PRC government, whereas the Palestinian governments are separate entities from the Israeli government. There has been wars fought between Israel and Palestine, and blockades put up - nothing like this has happened between PRC and HK.

This is kind of like saying "I cut my hand cooking the other day; what's the difference between that and surgery." The two situations aren't even remotely similar.
I'd even go as far as arguing that the fact that pandas / numpy isn't a DSL causes some of its awkwardnesses, e.g. the fact that you have to use & for `and` in pandas, and the fact that you have to parenthesize expressions like `df[(df.a == 7) & (df.b == 2)]` instead of `df[df.a == 7 & df.b == 2]` or python's wonky operator precedence will try to execute `7 & b` first. Also we could even have special dataframe scoping rules like `df[a == 7 and b == 2]`, but we have to do `df.a` instead, exactly because pandas is NOT a DSL.
Eh, one person's twitter can be ignored.

These days people get so worked up on social media anytime a brand does anything (i.e. people getting mad a cinnabon for their carrie fisher bun pic - http://cbsnews3.cbsistatic.com/hub/i/r/2016/12/27/a9c2ac0c-3...). I think social media can serve as a watchdog for more important issues, too.
Can I preorder your book?
It's also very capital-intensive. Ideally you would want a useful energy-intensive process with low capital costs so coming online during these peaks but staying idle for the other 80% of the day has minimal impacts.

I wonder if hydrogen generation would be more along the lines of what you're thinking. Hydrogen is an energy store not an energy source -- it takes more energy to produce hydrogen than you get out. But that just means it's a type of battery. It seems conceptually simple to produce... if a plant can be made simple enough (low enough capital costs that the idle time matters less), I wonder if hydrogen generation/burning has been studied as grid-level storage to do this kind of time-of-day energy arbitrage.

(With the amount of interest in grid-level storage and by the law of markets-are-efficient, presumably someone has run the numbers...)
It'd be much easier just to make voting day a national holiday.

A big problem with things now is voter education, and people go to the polls without actually understanding what they are voting for - they are rushed and push through, or don't vote at all.
I have a Fitbit and love to use it for step counting but I sure as heck don't sleep with that thing.
I find it strange that 50 years ago desegregation was so crucial but now resegregation is the new norm. Black-only colleges, female-only conferences, safe spaces.
The point is that things are connected. By physically accessing one machine you bring down not just one machine but the entire network. The importance of physical security just went up by a factor of the number of machines on the network.

At some point you are going to have to focus on the network part of security. Getting physical access to one Google server shouldn't allow you to bring down all of Google.
Has HN ever discussed the possibilities when purposely crafting worst-case input to amplify a denial-of-service attack?
Supreme Court of Canada Upholds Order for Google to Block Content Worldwide
You know, I have no idea why I even checked for < 0 since it's seconds backwards since epoch. Just a mental snag I guess
I have this great idea for this new service called real time voice messaging, instead of typing out your message you simply say it into a microphone and it is delivered to the other person in real time audio. It also works in real time in the other direction.

Actually, the idea of online furniture rental is not bad really, we are just having fun with it. I recently sold my house and I rented furniture for staging, that could be another aspect of their business model, those staging people charge a ton, I get it some of it is for the "design" but really there could be a few canned designed on a web page and done far cheaper I think.
Even if you trust every developer implicitly that's not a reason to forego the Principle of Least Privilege
Maybe the could make our PG&E bills not be (very quickly) .30/kwh and instead follow the .12/kwh average of the USA during these peak times.
This is not how most of the money is made in the software industry.

Are you sure? I agree that the most profitable companies are not doing that, but at least from what I've seen in a few European markets, the number of developers writing custom software for one client (consulting or in-house) or maintaining stable applications absolutely dwarfs the number of developers writing new products.

I work on a consulting company that customizes a relatively little known open source platform (Odoo) and the number of small and micro companies doing the same over the world is staggering.
But isn't the EFF supposed to pick the fights based on principals? By agreeing to this compromise they really just gave all the Zillow's of the world more confidence that strong-arm tactics work.
That's a nice concise way to put it, and spot on.
Just a combination of those joke plaques that say "On this site in 1897, nothing happened" with the date of the Tiananmen Square Massacre.
You and I have very different opinions on the purpose of TDD. You're presuming it's a design technique - many do. For me, TDD is all about validating a design in a way that gives me faster and better feedback than if I were just coding. I design the code before I write the first test. In fact, my test is derived from the design.

First I sketch a rough implementation design on a napkin or whiteboard. I don't worry about making it perfect, just good enough to create an initial mental model, and perhaps discuss it with someone.

Then, I write a test to express how I would like to interact with a small area of an implementation of this design, typically by calling a function or method and expressing a desired outcome.

I use the feedback from the test to drive out some simple code that resembles the design I sketched. If at any point this becomes hard, I take that as a clue that my napkin design can be improved, so I go back and tweak it.

Then I start over again. This is a quick cycle, typically 10 minutes or so. I get constant feedback on my design as well as my implementation.

I don't design code with TDD. I design code exactly the same way people who don't to TDD do it. Through intuition and experience. This is a skill, not a process. I only write tests to validate my design (not my implementation). Of course, because they are tests, they automatically validate my code as well, but that is not why I am doing it. If I only cared about testing, I might as well write them last.

More often than not my designs are imperfect, but by doing TDD I always improve them significantly, with relatively little time and effort.

It's taken me 15 years to get decent at it, and I'm still learning new techniques and abandoning others. There are many tricks to be learned. I usually only TDD when I care about the design. Quite often I don't, and then I just hack. I'm simply making a choice between going very fast now or going reasonably fast in a year. I haven't found a way to do both yet.