Hyperscan, a high-performance multiple regex matching library - <AUTHOR> https://01.org/hyperscan <comment><USER2> Neat! There's also Lightgrep.

[https://github.com/LightboxTech/liblightgrep](https://github.com/LightboxTech/liblightgrep)

Lightgrep also supports a subset of PCRE and scales pretty well with the number of patterns (has done millions of fixed strings). Lightgrep is designed for digital forensics, so it searches data as a binary stream. Lightgrep also supports searching for patterns in multiple encodings, with no requirements on the underlying data. Lightgrep is GPL.

(I'm one of the authors of Lightgrep.)

<comment><USER3> Does lightgrep return which one(s) of the millions of patterns has matched the input?

</comment></comment><comment><USER4> One application this could work really well for is syntax highlighting. Textmate/Sublime syntax files are basically lists of hundreds of regexes that have to be matched very quickly over the same content.

With this library it might be possible for an open source editor beat Sublime text at highlighting using the same grammars. Which is saying something since Sublime is crazy fast and the highlighter is even parallelized.

<comment><USER5> Hyperscan is likely a bit heavyweight for this application. Anything that only needs to keep up with user input for a small number of patterns would probably be better off with a lightweight solution with wider pattern support. Although we would be interested in seeing the integration...

</comment></comment><comment><USER6> The docs state that it's comparable to RE2, and others, but I don't see benchmarks yet. Is it fair to assume it's faster, or is there a tradeoff to emphasize the streaming features?

<comment><USER2> RE2 isn't a multipattern engine. That's the big difference. You can join a bunch of patterns together with | in RE2, but there's a precedence so it will only tell you about the first one to hit and won't tell you which one. Also, RE2 hits the wall with joining patterns together like this (depends on the patterns, of course). Comparing multipattern and single pattern engines is a bit apples and oranges.

I haven't run HyperScan but it looks like it should be very fast. It greatly depends on the patterns selected. It also looks like HyperScan has pragmatically sacrificed some aspects of PCRE compatibility/correctness wrt/ matching in order to achieve performance.

<comment><USER5> We sacrifice features and compatibility. We have sacrificed zero correctness as far as we are aware. We maintain wart-for-wart compatibility with libpcre in order to have a good basis for comparison for fuzzing and we believe we 100% recognize libpcre constructs even when ww don't support them.

Our semantics differ, but roughly speaking, we provide the set of matches that libpcre would if you hook up a callout to libpcre that rejects each match and sends libpcre back to look for another match (our ordering will be different, but is also well defined).

<comment><USER2> If a pattern uses quantification and the match extends successfully, won't two matches be reported (instead of one)? That's what I mean--not that it's buggy. As I'm sure you know quite well, deciding when matches can be reported is quite tricky, especially with Perl's ordered alternation rules.

A few questions: \- What kind of overhead is actually implied by using start of matches in streaming mode?

\- Is the backend a machine code JIT of the automaton, an interpreter, a table-driven search, or...?

\- Why not lazy quantifiers? They're almost always preferable to greedy quantification in a streaming scenario.

cheers, Jon

<comment><USER5> Sorry - might have sounded a bit defensive there. We've seen a few systems that have a tendency to sweep correctness under the carpet with shortcuts, especially when you hit nasties like "large bounded repeats in streaming mode".

Start of Match (SoM) in streaming mode is a real bear for some patterns. It really depends on the pattern - some are free, others (that we would otherwise support) are very expensive or impossible. Our SoM is fully general (i.e. it doesn't time out or give up after N bytes or K stream writes) so the worst case means tracking lots of 64-bit offsets through our automata.

The backend is a big pile of code that coordinates the efforts of many different automata and subsystems, most of which are a combination of a C implementation plus a big table of some sort to implement NFA/DFA/literal matcher/whatever. This isn't something of which we are particularly proud. We would like to make this a lot simpler and more interpreter-based.

A JIT would be really cool but we had some reluctance in our user base to run arbitrary code. I would be fascinated to support a JIT project even if it's not on our mainline.

I respectfully differ on lazy vs greedy. In streaming mode, both require information that's expensive to maintain and imply that you can 'predict the future' (especially once you put a complex pattern _after_ the lazy quantifier). We've been using "automata semantics" for a long time and this is simple and easy to keep track of in streaming mode.

Capturing semantics and lazy/greedy simulation are a work in progress for us. We used to have more work in this area but we did't have a strong demand for it. We do have some IP in this that isn't in Hyperscan - I may blog about this soon. We did have a subsystem that got 100% compatibility for some patterns ("100% right, 50% of the time"?) in block mode for libpcre that covered quantifer semantics and capturing subexpressions.

<comment><USER2> \- With a PCRE/RE2-like NFA implementation, where you have green threads representing the states in the automata, you can just store the start of match in the thread. You do have to be careful then about not killing some threads off. If HyperScan is a DFA, though, then SoM is indeed hard.

\- Redgrep is a cool project by Paul Wankadia that uses LLVM to JIT regexp automata into machine code. [https://github.com/google/redgrep](https://github.com/google/redgrep). The two things that are tough about JITting for very large automata, though, are breaking the code up into functions (a compiler can't deal with one gigantor block), and all that entails, and the fact that a machine code representation of a large automaton might be many times bigger than a more traditional representation, so what you gain in decode time you lose on L3 cache hits.

\- I don't grok what you mean about predicting the future wrt/ lazy/greedy quantification. With lazy quantification, you can stop producing matches once you've gotten the first match (or once you've moved past the quantification iff the subsequent subpattern and the quantification subpattern are disjoint). Looking for ".+" in a large stream is very bad, whereas looking for ".+?" is almost certainly what's desired.

\- Capturing in a streaming mode just doesn't seem worth it.

\- Large spans of bounded repetition are indeed the devil. It should be possible to replace states with a counter, but I think it requires dynamic mallocs (though I haven't worked on it yet).

<comment><USER2> re: predicting the future/streaming/"stitching", how do you need to remember more state for quantification beyond the state that needs to be maintained to support streaming at all? Why do you need to make a decision when you've reached the current block--can't that decision wait until you've seen more data or been told there is no more data?

\--

...I can see that if you're using bit vectors to represent active states, that's how you can make use of SSE4/string instructions and POPCNT... I've been thinking about how to do that but it just doesn't seem to work with a VM implementation. Maybe for a hybrid filtration scheme, though...

\--

Have you implemented Watson's MultiRE with input skipping, or Wu-Manber? I've tried some hacky approaches to skipping before and the problem seems to be that a sufficiently large pattern set will always include a short pattern (e.g., "PE") and now you're stuck with a bad l-min.

\--

Ordering is horrible, both between patterns and within patterns (Perl's ordered alternation rules). It took us a couple years to get full compatibility with PCRE (for forensics, correctness is more important than line speed searching; and most of our input comes from spinning rust, not ephemeral packets). We had to sacrifice the strict guarantee on O(M)/static memory usage during searching in order to gain full compatibility. Fortunately, branch prediction and reserving memory remove pretty much remove that cost, so that with normal pattern sets we don't see mallocs.

Streaming matching is criminally understudied from a theoretical perspective. You cannot match some patterns in O(M) memory in a streaming model as an NFA algorithm should. The one we know about is any time a lower priority path is a prefix for a higher priority prefix; you have to buffer the lower priority match until the high priority match resolves. E.g., "a+b|a" on a string of a's is pathological. These kinds of patterns can be detected; what I don't know is whether there are other classes (I don't think so, _but_...).

\--

I've always found the DPI use case fascinating, as it is a completely different input model than what I've worked on, which has its own rules, and yet has many of the same demanding theoretical requirements in its treatment of automata.

<comment><USER5> I think we'll need to take this discussion offline, and we _will_ be posting more details about how Hyperscan is implemented to our blog over the next few weeks.

Our different implementations clearly start with different emphasis; some of design decisions will probably be clearer as we post about our implementation and the hard constraints in DPI.</comment></comment></comment></comment></comment></comment></comment></comment>


PG's Hero Listed as NFL's All-Time 8th Most Feared Tackler (2009) - <AUTHOR> http://www.youtube.com/watch?v=q3RQ_xhLK-4

<comment><USER2> Also worth watching: <http://www.imdb.com/title/tt0116277/>

It's a documentary about liking someone a little bit too much.

</comment><comment><AUTHOR> For those who haven't read the essay: <http://www.paulgraham.com/heroes.html></comment>


ROS developers and lovers: What are your greatest challenges working with ROS? - <AUTHOR> A honest question from deep ROS lovers
We use ROS in our daily robot development and really love the way it´s generally working. So please ROS fans, fanatics and lovers don´t get us wrong. This little open survey is not about shitstorming, blaming or wise welding.
In lot´s of our internal discussions or chats with you – the ROS community – we got under the impression that you are struggeling with the same issues like we do. So let´s collect these thoughts and experiences and try to summarize them into a huge feedback page for all of us.
http://proboter.com/index.php/en/2015/12/03/ros-open-survey/ <comment><USER2> My problem with ROS is my MTR is not reaching my KPM correctly. How do I plug the CPT so I can get KPM connectivity back in my ROS? (!)</comment>


The Future of User Interfaces Might Already Be Here - <AUTHOR> http://blog.avneeshkohli.com/post/26334127763/future-user-interfaces

<comment><USER2> Isn't your example of flutter.io - holding up a hand for the music to stop - simply another form of button?

Shouldn't a reactive interface stop the music when it sees you raise the phone to your ear?

<comment><AUTHOR> As it stands right now, yes, it is another form of a button. From what I understand though, they're working to get it to the point where it is a reactive interface. The gesture-based technology is in its infancy at the moment, but the push Flutter is making is where I believe interfaces will go.

Still, I find using a hand to stop music a more natural interface than hitting a button or switching to iTunes. It's a start, but definitely not the end goal.

</comment></comment><comment><AUTHOR> This is my first official blog post. I'd love to hear people's thoughts on the subject of user interfaces and human-computer interaction!

<comment><USER3> Kinect has been on the market for nearly 2 years, and Leap[1] is the real thing for computers. The article sounds a bit awkward since it doesn't even mention them. Flutter has the advantage of not requiring extra hardware, but as a technology it is way more primitive and brittle.

[1] <http://leapmotion.com/>

<comment><AUTHOR> Fair point about the Kinect. I was gearing this article towards tasks typically done on a computer. Granted the Windows Kinect SDK will allow for similar functionality once developers get on board. It should be interesting to compare the two. In comparing Flutter to the Kinect on XBOX, I've found Flutter to be more accurate, but of course it's more limited.

Hadn't heard about Leapmotion until now, thanks!</comment></comment></comment>


Distributed count(distinct) with HyperLogLog on Postgres - <AUTHOR> https://www.citusdata.com/blog/2017/04/04/distributed_count_distinct_with_postgresql/ <comment><USER2> I still think the best explanation of HyperLogLog is the one done by antirez (Redis Developer) here: [http://antirez.com/news/75](http://antirez.com/news/75)

</comment><comment><USER3> Great explanation of HLL in here - I hadn't fully understood how you can combine HLLs together, which is key to understanding why they can help distribute count distinct over multiple shards without needing to copy vast amounts of data around to check for uniqueness across multiple shards.

</comment><comment><USER4> Is citus + cstore_fdw a good choice for space-efficient archiving and occassionally querying large amounts of (high cardinality) log and (lower cardinality) time series data?

ElasticSearch works great but it unsuitable for long term storage for performance and storage reasons.

Great writeup by the 18F guys on this topic: [https://github.com/18F/api.data.gov/issues/235](https://github.com/18F/api.data.gov/issues/235)

Unfortunately, they did not really consider Citus and they seem to have lots of issues with the solution they chose (Kylin).

<comment><USER5> TLDR: This depends on your requirements. We find that users with similar requirements follow one of two approaches:

(1) You keep raw data for a certain time period and regularly roll it up: [https://www.citusdata.com/blog/2016/11/29/event- aggregation-...](https://www.citusdata.com/blog/2016/11/29/event-aggregation- at-scale-with-postgresql)

(2) Citus + cstore_fdw if you're cool with doing some manual work. In particular, our customers who follow this approach shard on one column (automatic) and then manually partition by time. We're looking to leverage upcoming partitioning improvements in Postgres 10 and further automate this setup: [https://github.com/citusdata/citus/issues/183](https://github.com/citusdata/citus/issues/183)

For more on Citus + cstore, this recent HN comment could also be helpful: [https://news.ycombinator.com/item?id=14039001](https://news.ycombinator.com/item?id=14039001)

Happy to chat more if you drop us a line. How much data did you have in mind? Are you looking to power a B2B or B2C application?

<comment><USER4> Internal analytics, may accidentally become a B2B at some point (who knows), but for now, non business-critical with no availability requirements. About 30+ GB per day, but that's uncompressed and unprocessed.

Thanks for the pointers! Manual sharding sounds like an option.

</comment></comment></comment><comment><USER6> HLL is great for a lot of reasons. He gives the primary reason as getting uniques from randomly sharded data in a distributed system.

If your distributed system allows you to do a hash or range based sharding, for example by user_id, then you can do an accurate count(distinct user_id) across the system without a reshuffle of the data, knowing that all the data for a particular user lives on the same node.

<comment><USER5> (Ozgun from Citus Data)

Yup, good point. This example shards the github_events table on user_id and then shows running count(distinct user_id). Since the sharding and count(distinct) column is the same, Citus can push down the count(distinct user_id) to each shard and then sum up the results from those shards. In this case, reshuffles don't come into the picture.

In this example, HLLs would be most useful if the user then issued count(distinct repo_id) for example. Citus would then ask for HLL sketches from each shard and add them up on the coordinator node.</comment></comment>


Success Beyond China Seems Unlikely for Its Online Giants - <AUTHOR> http://www.nytimes.com/2010/03/24/business/global/24internet.html

<comment><USER2> >"The young people who dominate Web use in China are not just searching for information; they're searching for a lifestyle. They are passionate about downloading music, playing online games and engaging in social networking."

Perhaps it's better to say "they're searching for a lifestyle instead of information". I once had to visit a netbar outside the main gate of one of China's top ten Universities. It seemed, thru the haze of smoke, that everyone else was online gaming. I started doing my business, but quickly hit a snag: The acrobat-format document I wanted to read wouldn't open because there was no software to read it, and the netbar security settings wouldn't let me download Adobe Acrobat.</comment>


What the F*** Are Trump Supporters Thinking? - <AUTHOR> https://medium.com/adventurous-social-science/what-the-fuck-are-trump-supporters-thinking-ecc16fb66a8d#.cnow22yxe <comment><USER2> Decent article about using machine learning to analyze politics with a really really terrible title and a partisan tone. For anybody else who was put off, go ahead and click through.

<comment><USER3> > with a really really terrible title and a partisan tone.

I was on the fence with regards to that observation, until I reached the very last sentence of the article.

It's a shame that an otherwise interesting analysis would be all thrown out of the window due to the author's inability to stay focused on what matters.

</comment></comment><comment><USER4> Things are dark out here on the economic periphery, that was once the economic heartland, and people are starting to despair about it.</comment>


Proposal: using bacteria to change sand into sandstone - <AUTHOR> http://bldgblog.blogspot.com/2009/04/sandstone.html <comment><AUTHOR> Choice quote:

"I researched different types of construction methods involving pile systems and realised that injection piles could probably be used to get the bacteria down into the sand - a procedure that would be analogous to using an oversized 3D printer, solidifying parts of the dune as needed. The piles would be pushed through the dune surface and a first layer of bacteria spread out, solidifying an initial surface within the dune. They would then be pulled up, creating almost any conceivable (structurally sound) surface along their way, with the loose sand acting as a jig before being excavated to create the necessary voids."

<comment><USER2> That is a fascinating hack of the real world. I could see this being readily applicable to construction in desert climates; my first question would be about the water budget necessary to support the biological glue.

</comment></comment><comment><USER3> This article was very interesting and inspiring. Also meditative in an unexpected way.

</comment><comment><USER4> How to dream big. And the analogy to ice-nine (Vonnegut's Cat Cradle's ending) is not out of place.

While a great idea for a great purpose, biotech lacks the means to add a plug that could be pulled reliably when events turn wrong.

<comment><USER2> There are multiple well understood ways of limiting the effects of biological activity. It's not like compost heaps or breweries have eaten civilization yet.</comment></comment>


Google Launchs Plus Codes – Giving all places in the world a shortcode - <AUTHOR> https://plus.codes/ <comment><USER2> At first I thought that Google had purchased what3words[0] but it turns out that this is a completely independent offering. I like the idea of what3words but I feel like the Plus Codes might be more workable. For one thing you can shorten them by not using the global prefix. Also, you can sorta almost tell how close two locations might be with Plus Codes.

With what3words each location is easier to remember (it's just 3 words) but the locations don't have any commonality to them at all. So, its impossible to tell at a glance if two locations are anywhere near each other.

[0] [https://what3words.com/](https://what3words.com/)</comment>


Lonesome George, last-of-his-kind Galapagos tortoise, dies - <AUTHOR> http://www.reuters.com/article/2012/06/24/us-ecuador-tortoise-idUSBRE85N0PI20120624

<comment><USER2> It's humbling to think of seeing an entire subspecies being wiped out by this one simple event.

I saw Lonesome George in person just last December - although at a fair distance (he wasn't particularly friendly to the tourists!)

On the same trip we saw a whole new hybrid species that had never been seen before - as confirmed by the scientists at the same place that George lived. The whole cycle of evolution is visible in a very small and isolated location.

<comment><USER3> > _The whole cycle of evolution is visible in a very small and isolated > location._

In Galapagos? Who would have thought!

</comment></comment><comment><USER4> \- "Lonesome George, the last remaining tortoise of his kind." \- "Some 20,000 giant tortoises still live on the Galapagos." That confused me a bit. My interpretation is that Lonesome George belonged to a species of giant tortoises that is not extinct, but there are still several other species of giant tortoises in the wild. Is that correct?

<comment><USER5> I took it to mean there are 20k left, but are of different species.

</comment></comment><comment><USER6> Poor George. It's a terrible thing that us humans have steeped this low.

This is a QI segment where they discuss the near extinction of tortoises:

<http://www.youtube.com/watch?v=tU3sZgh5xeM#t=8m42s>

</comment><comment><USER7> Its a bit strange to have an article about the last of a kind animal doesn't have a photo? :(

"[] often had to scramble with each other to take pictures of one of the rarest creatures on Earth."

<comment><USER8> Here you go: [http://en.wikipedia.org/wiki/File:Lonesome_George_in_profile...](http://en.wikipedia.org/wiki/File:Lonesome_George_in_profile.png)

And another: [http://en.wikipedia.org/wiki/File:Lonesome_George_- Pinta_gia...](http://en.wikipedia.org/wiki/File:Lonesome_George_- Pinta_giant_tortoise_-Santa_Cruz.jpg)</comment></comment>


Firefox 74.0 released and shows large ad for Facebook container - <AUTHOR> https://www.mozilla.org/en-US/firefox/74.0/whatsnew/all/ <comment><AUTHOR> Notice how that page has Google tracking</comment>


Show HN: Using WhatsApp to receive Soccer news about your teams - <AUTHOR> http://soccerfriend.co/ <comment><USER2> Interesting. Mind sharing your stack?

<comment><AUTHOR> The tech I used: Ruby + Rails + Sidekiq + Python

services: Kimono lab

also Postgres + Redis, hosted on Heroku + Digital Ocean

<comment><USER2> Awesome. I am more interested in your integration to Whatsapp. Contact me if you are interested in sharing/licencing your tech: moncayo74 at gmail</comment></comment></comment>


Musk told employees: much higher chance of dying in car crash than from corona - <AUTHOR> https://www.businessinsider.com/elon-musk-spacex-employees-email-coronavirus-less-deadly-car-crash-2020-3 <comment><USER2> Of course none of them were on auto pilot. Come back in 4 months and dine on your choice words.</comment>


FPGA expansion board for the Amiga 500: SDRAM, microSD mass storage and Ethernet - <AUTHOR> https://github.com/endofexclusive/greta <comment><USER2> Appears to be a technical design document from 2 years ago, although I can't tell if anyone ever used it to create his/her own board (let alone use it for mass production). Shame, if I'm right.

<comment><AUTHOR> "GRETA is supposed to expand an Amiga 500 by 8 MB SDRAM, an ethernet controller as well as a port for MicroSD cards and a freely usable I/O-port. It seems that the development of the board has been finished but since 2013 obviously the programming of the FPGA was not continued: Currently GRETA only offers additional memory. All other features still have to be programmed. The documentation of the projects are available on Github under the GNU General Public License."

[http://www.amiga-news.de/en/news/AN-2016-04-00050-EN.html](http://www.amiga- news.de/en/news/AN-2016-04-00050-EN.html)

</comment></comment><comment><USER3> I'm not loving GPL for "dumb" blocks of hardware designs. SRAM glue and SD card boilerplate would benefit from a more liberal license. Commercial fees charged by the big boys for some of this crap is truly absurd. And it barely works.

Want to craft a tool to generate it and release under GPL? Right on. But the output? Please consider other options. I know so many people wrestling with this stuff.

Emulator code, cpu cores, etc. may benefit from GPL depending on your leanings. I just don't see it for some of the basic blinky-blink stuff.

<comment><USER4> Are you suggesting this wasn't completed because of the GPL?

</comment></comment><comment><USER5> Could be adapted to an Amiga 1200 ?

<comment><USER6> Or an Amiga 2000.

<comment><USER7> This appears to connect to the left side expansion port on the Amiga 500. See [https://github.com/endofexclusive/greta/raw/master/greta.pdf](https://github.com/endofexclusive/greta/raw/master/greta.pdf)

For the 1000, it has almost the same connector, but inverted in gender.

Not sure about the 1200.

For the 2000, there's the Zorro slots, which serves the same purpose, but is an entirely different type of connector.

I don't think there's a ready made adapter available for either. There was an adapter to use Zorro cards on an A500, but not the reverse case.

<comment><USER8> > For the 2000, there's the Zorro slots, which serves the same purpose, but is > an entirely different type of connector.

The connector is different, but the Zorro II bus in the A2000 is logically the same across all the 16 bit models.

</comment></comment></comment></comment><comment><USER9> Why not use the internal connector under the keyboard? Is it that different?

<comment><USER10> You mean slow RAM expansion slot? Isn't it connected to chipset side, right. So limited in capacity and slow.

On some Amiga models I actually saw this expansion "slow RAM" as true chip RAM, could play samples, set up copper lists, set Denise to display bitplanes from it, etc.

</comment></comment><comment><USER11> Any chance of this loading the Vampire II stuff?

<comment><USER12> That's the Apollo 68k accelerator right? If so, that could be great, though I wonder if it'd result in too much data travelling through the A500 expansion port.

<comment><USER13> The Vampire 500 is in the final stage of design and does not use the expansion port, it replaces the 68000 CPU in its socket.

<comment><USER12> Sure, that makes sense, but I was replying to the suggestion that the Vampire could be part of the A500 accelerator linked to at the top of this thread.</comment></comment></comment></comment>


Louis CK - "Everything is amazing, and no one is happy." - <AUTHOR> http://www.youtube.com/watch?v=rOtEQB-9tvk <comment><USER2> Previous discussion: <http://news.ycombinator.com/item?id=494066>

(Adding this because it's relevant, not as a passive-aggressive way to complain about a repeat. I think more people should see this video.)

<comment><AUTHOR> Excellent discussion; I had no idea this had been posted before. Thank you!</comment></comment>


How to Name Clojure Functions - <AUTHOR> http://stuartsierra.com/2016/01/09/how-to-name-clojure-functions <comment><USER2> I think one issue that pops up in many languages is the distinction between functions that have side effects and those that don't. In C++ you see standard library higher-order-functions that accept lambdas or other functions, but the documentation says "the function passed should not produce side-effects." You also see this in Clojure functions, and functions you might write might also expect only side-effect-free functions. The problem is that the functions you pass may not be functions you wrote, they might come from another library and then to be most confident, you must go and look up the source or docs to feel sure. I don't think a naming convention is enough, since many may not use the convention. For languages where this is important, I wish there was a compiler or runtime check for these things so the user didn't have to take responsibility. Almost as if functions were split into two "function types", those with and those without side effects. Maybe starting at the lowest level of the core language library, some functions would be noted as causing side- effects, and then any function built that called those functions would automatically be categorized as such, and on up to the top, so that side- effects-beget-side-effects and function parameters that require non-side- effect-functions wouldn't allow those to pass.

Anyway, it is a problem that is not solved by a naming convention.

<comment><USER3> Haskell for example has exactly that with e.g. the IO monad.

<comment><USER2> I don't know Haskell, but assumed it would probably tackle this problem based on all the praise I've seen it get for things like this and its general type system.

<comment><USER4> It gets all the praise but the use of Haskell is still very low. For me the package system drove me into the Arms of Racket and Clojure.

<comment><USER5> You should revisit it, then! Stack, a new build tool, far surpasses the Cabal hell that drove people away in the past.

<comment><USER2> I have read many times that you need a solid understanding of the Haskell implementation as well as various extension to make the code as performant as it is elegant. True?

<comment><USER5> Right now, that's truer than many would like. However, when GHC 8 (the new version of the compiler) drops in the next couple months, most of the performance tuning will involve putting a single line of code at the top of each performance-critical file. That line will make all evaluation within the file strict instead of lazy.

A lot of the performance and predictability problems in Haskell come from its laziness, so the ability to toggle that on and off on a per-module (read: per- file) basis will be a game changer.

<comment><USER2> That _does_ sound significant. I will be curious to hear more about that. Can you recommend a good go-to resource for all the latest news and discussions on Haskell?

<comment><USER5> Mostly I just read various people's blog posts and follow links (for example, I think I first found Stack on [1]). I also spend occasional time in the IRC, which can be useful but isn't a comprehensive news source by any means.

I hear some of the mailings lists are informative - iirc there's a haskell- beginners one which will probably cover major updates in tooling, feature releases, and so on. Good luck!

[1]: [https://www.fpcomplete.com/blog/2015/08/new-in-depth- guide-s...](https://www.fpcomplete.com/blog/2015/08/new-in-depth-guide-stack)

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> I suspect I overuse the x->y naming convention for functions that take an x and return a y. Esspecially when there is only one kind of thing that that function ever takes.

So instead of:

        (-> x x->y y->z)

I'd have:

        (-> x y z)

Makes sense. Thanks for the post Stu!

P.S. Another useful tome about naming functions is: [https://github.com/bbatsov/clojure-style- guide](https://github.com/bbatsov/clojure-style-guide)

</comment><comment><USER7> I'm really confused about what is the author intent with this article. At first read, it is pointless. The first paragraph pretty much resumes it: "These are my rules, but they're not good because I break them more often than I adhere to them". If this is intended as a starting point for a discussion, as the author claims, I think a forum is more appropriate format, and at least start from some previous existing convention discussion. This just looks like trying to reinvent the wheel from scratch.

<comment><USER2> Blogs tend to be the way a lot of advice, guidelines etc are disseminated in the software world, so that's the main reason. I don't know of any major forums in the Clojure world, for example, that everyone is aware of and contributing knowledge to. It seems to blogs, irc, the mailing list, stackoverflow.

</comment></comment><comment> j-pb I think it would be more valuable to actually define the ! convention, than propose yet another one for side effects.

<comment><USER8> Not sure why he says the ! is not for side effects, i've always encountered it used in that way (and changing the state is also a side effect)

<comment><USER9> I can't think off the top of my head where it's been abused. I do know that one question that often arises is "should I end with an ! if my method logs?" I've had this conversation on IRC with the author. The consensus was to only apply such a name when a global was involved.

The trick is trying to telegraph to the consumer that your function logs. They need to know because it brings with it dependencies both by way of code and runtime requirements. Logging may fail for a variety of reasons. These would throw any consumer off. They have to plan for it.

</comment></comment></comment><comment><USER10> > If name-clashes become a problem, add prefixes to the function names

Or, find better names for local variables, like customer-address. In the given example, there is in fact no need to add local variables: simply calling the functions would be enough.

<comment><USER11> Changing function names after the fact is a versioning problem. I'd much rather not have to rename functions. Changing global names because you're having a hard time with local names seems like a developer anti-pattern.

</comment></comment><comment><USER12> >If I have a function to compute a user's age based on their birthdate, it is called age, not calculate-age or get-age.

Ah, but isn't Clojure Lisp-1? Then you can't have function `age` and variable `age` in the same scope despite `age` being a great variable name in many circumstances. Hence having to come up with silly variable names like "lst" instead of "list", because all the good names are taken by the functions.

<comment><USER13> When I write Clojure I tend not to worry too much about this. Most of my variable names will be declared with `let` and will have a very limited scope. I can go ahead and clash some builtin function name and not worry about it unless I happen to need that builtin function within the `let` block. It usually is the case that I don't need to.

<comment><USER12> Locally overriding builtin/global functions seems like a bug waiting to happen. There's no way to figure out if you actually intended to use the local variable inside of scope, or the function it overshadowed. It seems to me that in Lisp-1 all local variables should be prefixed with some sort of symbol so that they can never override globals.

</comment></comment></comment><comment><USER14> I am always baffled at how individuals present their opinions and methods as the industry standard.

<comment><USER15> I'm glad you made this comment because it's important to understand why this attitude is harmful. If people believe what you're saying, then they're less likely to attempt to steer their communities in helpful ways. Strong opinions that are widely distributed act as a frame of reference that lets people start from a common base of knowledge and explain where their opinions differ. I can now say, "I name my Clojure functions like Stuart Sierra, except for two differences..."

More people need to present their opinions as the best way to do things.

Some useful, widely-cited examples:

\- [https://github.com/airbnb/javascript](https://github.com/airbnb/javascript)

\- [http://12factor.net/](http://12factor.net/)</comment></comment>


Early payouts to startup execs a troubling trend - <AUTHOR> http://www.sfgate.com/cgi-bin/article.cgi?f=/c/a/2011/10/08/BUIB1LESO0.DTL

<comment><USER2> I'm trying to take the perspective of a founder here. Let's suppose I have a startup that's showing signs of success and growth. I'm some combination of funded and profitable that means I can keep running for awhile. My startup have the potential to grow into the billions. I'm earning a subsistence salary and have no significant assets aside from my equity in the startup itself.

If an acquirer offered enough for the company that I personally would make at least 10 million from it, I wouldn't hesitate to sell at that point. My VC isn't hungry or broke like I am, he's just an investor who rationally wants me to go for the billions. My employees aren't hungry or broke like I am, they're earning market salaries and their only hope of a decent equity payout is for me to go for the billions. But I'm just subsisting and I don't have the stomach to avoid cashing out early from an acquisition. We have a problem.

Now let's suppose I raise another VC round and partially cash out. Now I have my millions, just like the VC's. I'm still left with a good stake in the company. Now our interests are aligned; I want to go for the billions now too. I no longer have any reason to sell it short.

Truth be told, I'm not a founder and I've never faced this myself. Maybe even taking a startup to this point requires crazy, dedicated risk-takers who will turn down significant wealth for the promise of absurd wealth, and I'm just not that kind of person. Maybe if I ever invest the time and effort into a startup necessary to get to that point I'll grow the stomach to take crazy risks. But I just don't understand the argument that paying founders a few million in a late VC round makes them _less_ motivated to swing for the fences and build billion dollar businesses. Hungry people don't turn down a decent meal for the promise of a huge feast later on.

<comment><USER3> I'm also not a founder, so this might be a dumb idea..

But if you're doing well enough to have several employees and funding and stuff, wouldn't you pay yourself a reasonable salary?

It seems hard to believe a company could be doing that well, but the founder would be in dire straits financially.

<comment><USER4> The simple answer is: because every single dollar/pound/yen you're not paying yourself, you could be using to grow your business.

Imagine you're semi-profitable, you've got enough to pay wages for a few months while you finish off your next iteration/product and bring in new cash. Then your project gets delayed, and all of a sudden you're running out of cash to pay the actual programmers. Do you try to make them take a cut and risk them jumping ship, or do you cut your own salary to close the cash gap?

These sorts of things happen with (from what little I know) quite alarming regularity. The founders are almost certainly taking out less cash than everyone else up until the equity starts being traded.

The same sorts of decisions can occur even if you're not desperately squeezed for cash. Do you bump your personal wage up, or do you use it to hire that kickass designer you just found who can really polish up your stuff and give you a better chance at success?

The whole founder-as-martyr approach explains why they feel justified in taking out early cash, and why there's a general feeling that '1st employee' shouldn't get any early cash - they've already gotten their fair share through their wages up til now. It gets a lot more complicated when your employee is taking a pay-cut to work for you on the hopes you'll succeed, but then it's up to you and them to negotiate some sort of fair compensation scheme when you do get cash in.

</comment></comment></comment><comment><USER5> I don't see this as troubling at all - actually, the opposite.

In the 90's, people cashed out by taking their companies public. Now, for a variety of reasons including the new burden of complying with Sarbanes-Oxley, founders are waiting much longer to go public. So they are cashing out by selling some of their founder shares to private investors.

This is in the interests of the investors because it aligns their interests with those of the founders. Say you started a company, it's kicking ass, and you face a choice. Plan A is a $100MM acquisition offer. But there's also Plan B, an ambitious expansion. Plan B gives you a 50% chance of $1B in two years, and a 50% chance of failure. If you had no assets before you started the company, the only sane thing to do is to sell out. (Not that I am suggesting that sanity should always rule the day.) But your investors probably prefer plan B. If they let you cash out $5MM or $10MM of your stock, then they make your risk tolerance more like theirs, and you can both get excited about Plan B -- which, assuming your startup is actually producing something of value, is better for the world, too.

And it's probably also better for the investing public that tech startups don't make it to IPO until they are a bit more fully baked.

<comment><USER6> That, or the motivational carrot to drive to success has been reduced.

It's purely observational on my part, but a founder who is sitting comfortably vs. a founder who is not -- I've seen the difference, and it very often comes down to motivation, drive and determination.

Each situation is different, but given the hungry founder (like, actually hungry) vs. the comfortable founder -- I'll take the hungry founder almost every time.

<comment><USER7> It definitely varies per person.

There's clearly a level of financial uncertainty where a founder is LESS productive. But, there are ways (which don't necessarily overlap) a founder could spend "excess" money which don't inhibit drive at all.

Probably the lowest hanging fruit would be to eliminate actual debt (founders may have student debt, credit card debt from earlier in the company, etc.); getting rid of debt probably won't change behavior. Maybe other health-related things. Actually, a lot of this could just be handled as "generous startup perks" vs. payouts; if I knew I could always fly in domestic E+ or upgrade- to-F on my preferred airline, and stay in a decent hotel, I'd be a lot more into taking back to back business trips all the time.

Taking care of someone else's expenses (e.g. kids, parents, or other dependents) probably won't reduce motivation, either. Fixing things which inhibit a founder's productivity (paying for a housekeeper, driver in some cases, closer apartment to the office, ...) seems like a good idea.

It's probably a bad idea to pay someone enough to become an investor, or to buy/build a house (oh god no for BUILDING), indulge in expensive AND time- consuming hobbies, etc.

The gray area is when founders would actually take an outright sale, but are given a choice of $5-10mm now and continue instead; that's enough to possibly reduce drive, but not as much as selling out.

One option might be to put some of the payout into a "lockbox", where it's safe for reasons of diversification, but not accessible. e.g. you sell, get $1-2mm into your 401k, or into an account which is inaccessible (but safely invested) for 5 years. That way, your downside risk is covered if the company tanks, but your lifestyle doesn't change.

Although, anything like this will make Bay Area luxury car dealers very sad. :(

<comment><USER6> Well put. It's definitely a balancing act to go down this path.

</comment></comment></comment></comment><comment><USER8> Troubling to whom? You have to read the article to find out:

 _this is a new phenomenon, at least at these multimillion-dollar levels. And it's a very troubling one in the eyes of some investors._

Not troubling in general, nor even to investors in general. Just troubling to _some_ investors. What's bad about the balance of power shifting toward founders when it was so unbalanced the other way for so long? Let's remember where the pendulum is swinging in from: a few months ago there was a video of Silicon Valley in the 70s with stories of entrepreneurs giving up 98% of their companies in order to raise any money at all. The real story here is the long- term trend.

Is there evidence to support the claim that these deals diminish companies' long-term prospects? There isn't any in the article.

 _Goldhaber said it sends a signal that entrepreneurs don't believe in the long-term prospects, and makes VCs question whether they should._

Obviously not the VCs who just signed the deal. Seems like markets behaving like markets to me.

<comment><USER9> If it's only the execs (founders I assume) then this may create unhealthy tension within the company.

Think about the company's employees. Especially the ones who joined early on. They are usually working nights and weekends hoping for an IPO or a buyout. How do they feel about this?

<comment><USER8> But this is an argument not that the trend is bad, but that it should go even further and benefit not just founders but early employees as well. I'm inclined to agree. No doubt investors who feel this way are advocating strongly for employees' interests while structuring deals.

Actually, the trend does seem headed this way. Just as the balance between founders and investors has been shifting, so it is shifting between founders and early employees. Scarcity in the hiring market for top talent is one indicator. It is bound to be exacerbated by the fact that creative people who want to work at a startup can easily just found one themselves. We may see the line between founders and early employees blur over time.

None of this seems very troubling. It looks to me like creative people being rewarded more, and earlier, for value they add. Perhaps it is more troubling if one has nothing to add but money. But even that seems short-sighted. Why not maximize the total value created?

</comment></comment></comment><comment><USER10> Oh those poor investment bankers!!!

Those innocent investors are being taken in by the cruel and shrewd entrepreneurs!!

Who gives a shit?

They're investment bankers.

I'm pretty sure they can handle their own money and don't need investigative journalists to stick up for them.

Find something real to report.

<comment><USER11> First off, venture capital != investment banking.

Secondly, if your goal in business is to extract what you can from foolish VCs and run, you're destroying many things. One is obviously investor value. But you're also destroying all the other startups that could've put the money to good use. In which case as a founder or director you're no better than these inside-trading Ponzi-scheming main-street-hating 1% banksters your lot loves to hate.

But hypocrisy is lost on the hypocrite...

<comment><USER12> I watch all my games on Broadcast.com and pay my local taxes with govWorks website.

</comment></comment></comment><comment><USER13> This article completely misrepresents the email. Chamath Palihapitiya seemed to take the most issue with the fact that the deal was structured with most of the money going out as a dividend. It's not about the founders taking money out, it's about the founders taking money out without dilution.

</comment><comment><USER14> This reminds me a lot of professional sports...you see a lot of athletes get criticized for "not being a team player" because they want the huge contracts, but people don't realize that ITS A BUSINESS. If you see an opportunity to make something in the tens of millions of dollars, why wouldn't you jump at that? Its hard not to get sentimental about it, but some people don't view their companies as more than a venue to make money, and its a FACT that if you couldn't make money doing it, 99.9% of businesses would not be started.

Personally, I don't agree with the "easy cash-out" strategy, and I think that what you find is that with the REALLY successful businesses, the game changers, money is never at the top of the list of priorities for the founders, its usually viewed as an added benefit. However, from a business standpoint, working long hours and taking advantage of an opportunity to earn some serious cash for your effort can't really be criticized.

</comment><comment><USER15> Apart from suggesting that entrepreneurs are "trying to hit the lottery," the article does not attempt to explain why founders and early employees are taking cash early.

The simplest explanation is that someone is willing to offer it to them. Many of the companies the author mentions had very high acquisition offers at some point. Founders and early employees could have taken the opportunity then to cash out, but they didn't.

My guess is that a lot of this is VCs compensating founders for not accepting acquisition offers and instead going for something bigger.

This is perhaps not an optimal situation, but it may be better than acquisitions in terms of creating longer-term value.

<comment><USER16> That scenario is likely precluded by the conditions that come along with the investment capital. Nobody has ever gotten rich from signing blank checks. And while there may have been the occasional, foolish investor to do just that, everybody else in that position has already internalized the rules of what not to do if they want to have a hope of hanging on to some of their investment. If in life there is no such thing as a free lunch, then by extension, nobody in the position to be directly involved views VC as a free handout.

</comment></comment><comment><USER17> The article completely disregards that there is a business interest for the investors to align the interest of board and management in a startup.

If a startup is going to take the shortest path from a well-funded garage op to a mature company, you need everybody on the same side of the table.

</comment><comment><USER18> " Here we meet a very important feature. It would seem as if this were circular reasoning; profits fell because investment fell, and investment fell, and investment fell because profits fell. " - Jan Tinbergens

"You'll stop looking for who's to blame; instead you'll start asking, What's the system? The concept of feedback opens up the idea that a system can cause its own behavior." - Pg.34 ( <http://lnkd.in/kK7hdJ> )

Or to joke via P vs NP, always easier to verify a solution than to create one.

</comment><comment><USER19> As others have pointed out, how is this a problem ? If the VCs are offering cash out to founders and early employees - it's just to sweeten the bitter side of a non-acquisition. It's not like the founders will take the cash out and retire to a private island as the author implies. Money is not a motivator for most of these founders and if it is - then the VCs are making a bad choice in not just offering the cash outs,but in the basic investing they are doing in that company. VCs are not that short sighted or stupid.

</comment><comment><USER20> Founders cashing out isn't the problem. It's common--even encouraged--for late stage founders to partially cash out so as to align their interests with the startup, particularly if they're not otherwise sufficiently wealthy to aim for the fences.

Not all deals seek to diversify the founders and there are a number of warning signs:

1\. The cash out is too soon. The company is still growing rapidly and in need of capital;

2\. Too much of the funding round goes to the founders when the capital requirements of the company are still high. If the company is already profitable then a paying out the founders makes sense;

3\. Such offers are only available to the founders rather than all employees.

Two recent deals fall into the highly suspect category: Groupon and Airbnb.

In Groupon's case, the early investors are paid out. Eric Lefkofsky has cashed out to the tune of almost $400 million [1], Groupon has has dubious accounting practices, it is only cash flow positive by screwing merchants and it basically looks like a giant scam.

In Airbnb's case the founders are using a large chunk of the funding round to pay themselves a _dividend_ [2]. Dividends are normally a way to distribute profits to shareholders. Imagine if you take a $1 million loan from the bank, paid yourself a $500,000 dividend and then declared bankruptcy.

What's worse, most employees will see none of this because most of them have options not shares.

So this deal fails the smell test too.

Twitter is a more borderline case. $400 million seems reserved for cashing out employees [3]. If that's open to all employees I'm generally OK with it. If not, it's a problem. That being said, I believe Twitter's future is far from assured. It's unclear how many "real" users they have and what those users do. The large majority seems to just follow celebrities. I'm not convinced it can really go mainstream.

[1]: [http://venturebeat.com/2011/06/10/the-questions-about- groupo...](http://venturebeat.com/2011/06/10/the-questions-about-groupons- other-founder-eric-lefkofsky/)

[2]: [http://articles.businessinsider.com/2011-10-01/tech/30232499...](http://articles.businessinsider.com/2011-10-01/tech/30232499_1_cash- dividend-stock-options-groupon)

[3]: <http://mashable.com/2011/07/20/twitter-8-billion/>

<comment><USER12> Excuse my ignornce, but what is Twitter's business model?

I can understand Groupon and Airbnb, but what about Twitter?

<comment><USER20> Exactly.

</comment></comment></comment><comment><USER21> Provided that a company's financials arn't half baked like Groupons were, an early diversification of investments is in everyone's interest.

Where funny accounting happens there should be lawsuits, not a general call for founders to stop taking some off the table.

</comment><comment><USER22> small payouts, yes, to pay down a mortgage or for home/family-development. but nothing multi-million, especially 8-digits-- definitely not.

but small payouts do give founders enough security to swing for the fence.

</comment><comment><USER23> > Far too many silly, derivative and pointless companies are cranked out in > the desperate hope that they can secure just enough press attention and VC > love to make the founders a few million bucks.

So in summary: We're partying like it's 1999 again.</comment>


Ask HN - How to find APIs, API directories? - <AUTHOR>

I found http://www.programmableweb.com/apis/directory<p>Are there others that I am missing? <comment><USER2> Mashery also has a big list of the APIs they enable: <http://dev.mashery.com/apis>

And Google's APIs: <https://developers.google.com/>

I think ProgrammableWeb is pretty comprehensive though.

</comment><comment><USER3> ProgrammableWeb is my go-to resource too.

There's also: \- <http://www.mashape.com/> \- <http://apis.io/> \- <http://data.gov/>

</comment><comment><USER4> less quality than programmableweb but some APIs only there <http://www.webmashup.com/>

</comment><comment><USER5> That's pretty much the best one.</comment>


Ask HN: Given the diversity in America, Who actually is an American? - <AUTHOR> <comment><USER2> Anyone born or naturalized here.

I don't really understand the question.

America has historically prided itself on being a nation of immigrants. We have citizens whose ethnic origins are all over the world. Being an American has nothing to do with your genotype or religion or what gender you're attracted to or any other personal characteristics that could be interpreted as "diversity" and everything to do with your birth certificate or naturalization papers and your passport.

Why should diversity make any difference in "who is American"?

</comment><comment><USER3> Anyone who has a US passport and/or born in US?

Or are you referring to America the continent?</comment>


A well designed black-hat SEO is actually working - <AUTHOR> http://www.google.com/search?q=is+%22keywealthsystems.com%22+scam <comment><USER2> Can you elaborate? I can't see what is you point here.

<comment><AUTHOR> You ask google is website X is scam, while it is obvious it is. All you get in the front page is a list of sites which provides great reviews about this site, telling it is not a scam, rather working and magnificent, etc. etc.

While all those sites are obviously built by the owners of the reviewed sites, Google do not recognize this fact.</comment></comment>


W3C Issues Recommendations for Annotations on the Web - <AUTHOR> https://www.w3.org/blog/news/archives/6156 <comment><AUTHOR> Waiting a long time for this. Looks flexible and comprehensive. A bunch of compliant tools (see tests) but none yet provides 100% coverage of the recommendations.

I hope coming soon to every web browser!</comment>


Health Law Tax Penalty? I'll Take It, Millions Say - <AUTHOR> http://mobile.nytimes.com/2016/10/27/us/obamacare-affordable-care-act-tax-penalties.html?em_pos=small&emc=edit_dk_20161027&nl=dealbook&nl_art=16&nlid=65508833&ref=headline&te=1&referer= <comment><USER2> I think we're just experiencing the ultimate end game of the system. The ACA was nothing more than ointment on an infected wound. It worked for a time but it is becoming more and more obvious that this leg our economy needs to be amputated.

We _need_ a single payer system or at the very least a single body that negotiates the price of all drugs and health care services _on behalf of all Americans_. Frankly I'm surprised that the insurance companies aren't lobbying for such a thing as it could be their only hope for continued existence very soon.

The pharmaceutical industry would practically go to war to prevent a single payer or a price-fixed system but they would lose if they're opponent was the insurance industry (and the American people; who have very low esteem for "big pharma").

A most interesting change resulting from an American single payer system would be the _increase_ of drug prices for everyone else (other countries). As it stands right now the only reason drug companies can get away with some of their lower prices in single-payer countries is because the US can and will make up the cost. Lowering the cost of drugs in some countries really _does_ result in higher costs for Americans.

<comment><USER3> _We need a single payer system or at the very least a single body that negotiates the price of all drugs and health care services on behalf of all Americans. Frankly I 'm surprised that the insurance companies aren't lobbying for such a thing as it could be their only hope for continued existence very soon._

What role do insurance companies have if there is a national body fixing prices?

<comment><USER4> Looks like not much of a role at all. After all of my experiences with insurance companies I'm quite okay with that.

A NHS-style system would still need staff in order to function and I expect many rank-and-file insurance people would end up there. The executives can go to hell as far as I'm concerned.

<comment><USER3> Providers also have a lot of staff dedicated to working with the insurance companies. I'm pretty sure billing complexity is one of the things driving consolidation of physicians into large practices and health systems.

</comment></comment></comment></comment><comment><USER5> The public exchanges are a slap in the face. Companies like walmart expect the government to pay for healthcare. The poor wanted socialized healthcare to make WalMart et al pay for it. The poor desire the destruction of the insurance industry, and what they got was what they already had only with IRS penalties.

<comment><USER6> I think you hit the nail in the head.

Most poor people are worried about making ends meet the very last thing they are thinking about is their taxes and possible IRS penalties. They are expecting a refund and not to get hit with a fine. This is really just another burden on the middle class, it was for sure an unintended side effect by the folks who came up with his law.

<comment><USER7> An example of said burden on the middle class. I make a senior software engineers salary and my wife has Lupus. I'm beginning to have signs of having Lupus and RA myself. Her prescriptions alone barely have any coverage until we meet our out of pocket max, and by then, 10-15% of our income is gone paying just for drugs. This is on top of 25-30% taxes, plus the rising cost of food, and now they are telling me I may need the same drugs as her? So in this new found world, I could potentially lose up to 55% of my income in taxes and health coverage. Oh and for a laugh, Medicare won't cover her because I make too much. This is insane.

Despite this, I'm of the mind that we can't return to the way things were before ACA, and ACA isn't the answer either. Something has to change or we may have to move to another country with better options. People huff about waiting lists, but neglect to realize that waiting lists are often for non-life threatening surgeries. They also forget to tell the part about how routine office visits don't have the same types of waits, and how prescription coverage is still free.

All of my crying aside, I'm left with one thought. How in the actual fuck do poor people afford this shit? I grew up poor and I know what we did--we didn't have insurance and thankfully we were lucky enough not to have any chronic illnesses in my immediate family when I was growing up.

On a lighter note, a small joke: I downloaded the GoodRx and it physically started emitting laughter from the speakers once I typed in the drug names.

<comment><USER8> >All of my crying aside, I'm left with one thought. How in the actual fuck do poor people afford this shit?

A unpopular thing to say is that there exists two types of poor in this country. The poor and the working poor. The poor are fine, they get Medicaid, Medicare and discounts at the exchange. The working poor are fucked they get to pay higher taxes because insurance is too expensive and when they lift themselves up to a point where they can afford it, it doesn't cover anything anyway.

This sort of bullshit has chilling effects. Rig the game so obviously against low income Americans and they might just decide to stop playing. That is why you see the lowest labor participation rates since the 70's. It's better to be poor than working poor anymore.

</comment></comment></comment></comment><comment><USER9> Want to fix healthcare?

\- Mandatory price transparency. Health care is procedures and medicines, not a used car. Also all procedures signed off beforehand (with the exception of emergency ones, naturally). If Procedure A costs $100 for Health Insurance A, why should they charge a BS price for someone without Health Insurance?

\- Zero drug advertisement (maybe for no-prescription drugs, still)

\- Cut on incentives (briberies) by drug-companies

<comment><USER10> I'm kind of on board with zero drug advertisements. But what rationale for banning drug advertisements doesn't also apply to banning other kinds of advertisements? I mean, I'd be on board with that too but I'm wondering if you see some distinction.

<comment><USER11> We do ban other kinds of advertisements already when we deem them against the greater public good.

So I can see how banning drug advertisements falls into the same category as banning cigarette ads, in that it makes for a more healthy public. The same thing can of course be said about just about anything, but sometimes you just have to stand on that slippery slope.

<comment><USER10> The rationale behind banning cigarette ads is that those are products that actively harm consumers. What's the equivalent rationale for banning drug ads? Presumably, it's that drug advertisements cause people to, _e.g._ , demand expensive brand names when cheap generic alternatives are available, or to demand drugs they don't really need. But isn't that true for almost all consumer advertising? Everything from toothpaste to cars to razor blades to jeans to handbags?

<comment><USER11> Sure. And if we decided that rampant razor blade advertising was causing systematic pricing imbalances that dramatically impacted the greater public good, we could ban those too.

<comment><USER10> That begs the question. Consumers pay huge premiums for brand-name products when cheap generic alternatives would serve the same function. Is that not a "systematic pricing imbalance?"

<comment><USER11> There was a second part to my requirement.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> It would be interesting to know how many of these people are from states that didn't expand Medicaid. Of the two mentioned in the article, one is from Georgia (didn't expand Medicaid) and the other is a customer of someone in DC (could be from DC, Maryland or Virginia; the first two expanded Medicaid, but Virginia didn't).

<comment><USER13> Why? If you would have qualified for Medicaid, had it expanded, you don't have to pay the penalty anyway - the government doesn't punish you because your state didn't expand Medicaid.

Only if you qualify for the subsidized private coverage (which poor people do not) do you have to pay a penalty for not getting health insurance. Frankly that part of the law is a little insane, even if it is because it wasn't implemented as intended; if you don't have any income, then you have to pay the _full price_ for coverage on the exchange, no subsidies. Your income has to meet a certain minimum level to qualify for subsidies - the intent was that below that level, you'd get Medicaid.

<comment><USER3> If you qualify for Medicaid based on income, I don't think you can buy from the exchanges (the option is a similar plan off exchange).

</comment></comment></comment><comment><USER14> Obamacare was expressly designed to fail, it seems.

Take an issue and make it worse, wait for the backlash, then come back to the public and offer a new solution: single payer.

<comment><USER3> The design included risk corridor payments that aren't being met.

[http://www.cnbc.com/2016/05/18/health-insurer-highmark- sues-...](http://www.cnbc.com/2016/05/18/health-insurer-highmark-sues-us-over- obamacare-payments.html)

It's also really difficult to say what premiums would have been without the changes the ACA made. Medical inflation has slowed since the law was passed, but again, I think it is difficult to figure out how much of that to attribute to the ACA.

<comment><USER15> > It's also really difficult to say what premiums would have been without the > changes the ACA made.

No it's not. Forcing insurers to take people with pre-existing conditions completely screws up risk pools. Anyone could've told you that doing so would make premiums rise much faster than if those customers could be denied.

<comment><USER3> Right, but the must carry provision is not the only change the ACA made...

<comment><USER15> It's without a doubt the provision with the biggest impact. The whole point of an insurance pool is to pay out less than you bring in, and if you suddenly introduce a lot of people that cost more than they bring in, premiums have to go up. A lot.

</comment></comment></comment></comment></comment><comment><USER16> Twenty to fifty years from now historians are going to reference the ACA as a case study of early 21st century American government:

1) hyper partisan political process

2) special interest control of the content of laws

3) release of information by the government used as a method to manage the electorate rather than inform

4) front loaded benefits with back-ended payments

5) political class taking credit for the good stuff and leaving if for others to clean up the mess

Generally speaking, all aspects of American government in this place and time are reflected in the ACA. All aspects share the same sustainability issues.

</comment><comment><USER11> I see a lot of value in a single payer system as health care system as I fundamentally believe healthcare spending does not conform to the same rules as other parts of the economy and thus might make all of our (basic) understanding about economics moot.

That said, single payer does not solve the single biggest classic problem with the current healthcare system in the US and that is the agency issue. Right now I _cannot_ make informed choices as a consumer in this market. Prices are not transparent and the people negotiating the prices are not the people receiving the care.

Further, we've coupled insurance to employment which is just insane.

Oddly McCain's health plan from a few elections back would have at least dealt with the last point. I wonder if the exchanges would be more successful if the entire population was buying insurance through them.

<comment><USER17> I see no value in turning a whole industry into defacto civil servants. Doctors and nurses are people too who need to be able to choose themselves. I don't give a rip about insurance. Getting access to health care is what matters. Doctor/patient relationship is what matters. I see no need for government to get involved other than stopping ethical type (illegal) abuses.

<comment><USER18> If you don't give a rip about insurance, you should be especially irritated at ACA and the ACA status quo ante, because the insurance companies and hospital chains quietly negotiate the prices for health care services, collude to establish favorable prices for the insurers, and lock individual consumers out of those prices.

A fun experiment I've had the pleasure of running: try to get an MRI done outside of your insurance policy --- that is, try to pay the rack rate for an MRI, out of pocket.

</comment></comment></comment><comment><USER19> Here in the Netherlands: You can't pay for health insurance? Here is some subsidy to help you.

In the US: You can't pay for health insurance? Here is a fine of 700$

:s

<comment><USER3> The fine is structured such that only people that can pay for health insurance are hit with it. The various income tests and whatever might not be perfect though.

Here's some numbers.

~8 million people chose the fine[1].

More than 9 million people receive subsidies on the ACA exchanges[2].

About 58 million people receive Medicaid (heavily subsidized insurance)[3].

[1] [http://www.cnbc.com/2015/07/20/irs-more-paid-obamacare- fine-...](http://www.cnbc.com/2015/07/20/irs-more-paid-obamacare-fine-than- expected.html)

[2] [https://www.healthinsurance.org/obamacare/will-you- receive-a...](https://www.healthinsurance.org/obamacare/will-you-receive-an- obamacare-premium-subsidy/)

[3] [https://www.medicaid.gov/medicaid/program- information/downlo...](https://www.medicaid.gov/medicaid/program- information/downloads/cms-64-enrollment-report-oct-dec-2015.pdf)

<comment><USER20> The solution seems obvious. Instead of fining (those who can afford it), use that money to pay for their Medicaid/Medicare.

That way they have insurance, which was the goal of this program, no?

<comment><USER3> What money are you talking about? The fines are coming out of the pockets of the people that are not insured and they are choosing the fines because they are lower than the cost of the premiums. So it isn't possible to insure them with the money they pay in fines.

We know that they don't qualify for Medicaid (those people aren't fined). I guess you could further expand Medicaid, but that probably wouldn't be real popular, and there would probably still be fine payers that had too much income to qualify for it.

</comment></comment></comment></comment><comment><USER21> When I can get rent both a house and a car for the same amount health insurance would cost me, the system is totally broke.

HillaryCare isn't working.

[https://twitter.com/HillaryClinton/status/697967580770869248](https://twitter.com/HillaryClinton/status/697967580770869248)

<comment><USER22> You had such a good point, until you scuttled it all by going pointlessly political and partisan. There is a problem here, but it's utterly without a political identity. The bottom line is that we need price controls, and something like an NHS; the current model is just utterly broken. Nothing the R's or D's are saying will change it either, and laying it at one person's feet is pathetic and wrongheaded.

<comment><USER23> Free market + insurance version of healthcare. How much of my money(my premiums) are you willing to spend to control your diabetes, risk of heart- attack, or cure your cancer? I'll give you a hint, all of it.

<comment><USER22> It's a free market in the same way that we won the war in Iraq.

<comment><USER24> Twice? As in, it's twice the free market???

</comment></comment></comment></comment></comment><comment><USER25> I will always support the ACA, for one big reason: friends and coworkers of mine who were denied insurance before can now get insurance.

I am more than willing to pay higher premiums (or tax penalties) if it means that people who need treatments can now have access to those treatments without going bankrupt.

</comment><comment><USER26> Insurance companies have to meet their quarterly earnings goals or investors will punish them. If their lobbying can't get the tax penalty raised, then it will continue to be a better deal for the young and healthy to take the penalty.

</comment><comment><USER27> > It has not worked all that well, and that is at least partly to blame for > soaring premiums next year on some of the health law's insurance exchanges.

People love to blame any post-2010 health insurance problem on Obamacare, but what's the evidence that rate hikes are actually significantly influenced by PPACA?

<comment><USER28> > but what's the evidence that rate hikes are actually significantly > influenced by PPACA?

For 4 years before "mandatory purchase" was in effect, I saw annual 3-5% increases in premiums. In 4 years since, I've seen ~20% increases each year (last year was 'only' 11% increase - I'm bracing for much more).

The 'evidence' is insurance companies bringing in more people who previously didn't have insurance - generally, they either needed or used more services than whatever the premiums (+ subsidies) they were paying covered, and insurance companies lose money because of this. In NC, BCBS lost ~$400million last year (or so the claim goes). They can't sustain those losses indefinitely.</comment></comment>


Refactorator: Xcode Plugin That Refactors Swift - <AUTHOR> https://github.com/johnno1962/Refactorator <comment><USER2> Very cool. But the fact that a (fairly complex!) third party plugin was required to do things like rename constants is tragic. Where is the first- party support for basic edits in Xcode, two years after the release of the language?

<comment><USER3> It is annoying, but they had far bigger problems to fix from release until now. When Swift was released SourceKit would crash all the time. The compiler would crash when code wasn't correct. The error messages were terrible. The language had was missing essential parts. Apple had to do a lot of fixing to get to where we are now. The things they have fixed has been a lot more important to get right than the refactoring support. Crash free IDE, good error messages, stable compiler, user friendly handling of optional types has been far more important IMHO. But now the language is looking good, so I think starting with Swift 3.0 I think we will start to see xCode getting fixed.

It might also be intentional to give a marked to AppCode and others. xCode has always been pretty slim in the offerings when it comes to refactoring. But xCode contains a lot more tools than what you get in e.g. AppCode. There is considerably more effort going into creating good GUI designers, UI Automation tools, performance diagnostic tools, debugger, playground etc.

AppCode has a much smaller scope and can thus focus more on being a great tool for refactoring.

<comment><USER4> > When Swift was released SourceKit would crash all the time

it still does that if your code is sufficiently broken.

</comment></comment></comment><comment><USER5> An Xcode tip which I didn't discover until recently was that if you hover over a variable for a moment, a small down arrow will appear next to it. If you click on that arrow, you'll get a menu which includes "Edit all in scope". This provides very basic variable renaming.

<comment><USER6> Without using the mouse and hovering you can press Cmd-Ctrl-E.

</comment></comment><comment><USER7> The lack of these refactorings is the main reason I bought AppCode. It comes with it's own set of problems, so I find myself using two IDEs a lot of the time. Does this plugin at least support Extract Method, or is it just Rename?

<comment><USER8> I'm curious, being a fan of keeping a copy of AppCode just for refactorings: What problems?

<comment><USER7> Let me preface by saying I like AppCode a lot more than XCode; given the choice I always work on AppCode.

But, my complaints are:

-Much slower startup time

-All in all, it feels less responsive than XCode when my computer is struggling(I do cross-platform development with Android, so on occasion I'm running Xcode+AppCode+Android Studio at once)

-For projects with multiple targets, changing a file from one target to another does not have a good UX. I work in projects with several targets, and I have to do this more than most developers, and it always takes me to XCode

-Choosing and editing launch configurations has a better UX in XCode

-Editing plist files, project configurations and Storyboards is significantly easier in XCode

-AppCode will occasionally show spurious errors and warnings. It warns me any time I call [UIImageNamed:] with an image in my asset catalog, for example, saying the resource does not exist.

-The update cycle lags behind XCode's by necessity.

<comment><USER9> This summary is useful for me as I'm planning to get my personal license soon.</comment></comment></comment></comment>


Ask HN: How to model cost and revenue structure of HaaS startups - <AUTHOR> What are the best practices to model the costs and revenues for HaaS companies? <comment><USER2> What does the H stand for? I did a websearch and can't find any relevant website using the term.

<comment><USER3> I think they are talking about Hardware as a Service. Essentially a new way to describe hardware leasing that has been going on for decades.

Frankly, if that is what the OP is looking to research, I'd start with leasing companies and how they function as that is the basic model.</comment></comment>


What startup videos and nipples have in common - <AUTHOR> http://grumomedia.com/what-startup-videos-and-nipples-have-in-common/

<comment><USER2> Breast Cancer Insensitivity Fail [http://www.breastcancer.org/treatment/surgery/reconstruction...](http://www.breastcancer.org/treatment/surgery/reconstruction/nipple_replace.jsp)

Miguel, go with one of the other analogies.

<comment><AUTHOR> You are right, some readers may be offended by me using the boob analogy. But the saying goes "those who care don't matter, and those that matter don't care". Those that know me personally know very well that I have the utmost respect for anyone that suffers from cancer directly or indirectly. In fact, my dear grandmother died form breast cancer when I was a kid and she had both breasts surgically removed. My articles are very much a true unfiltered reflection of who I am. I, like most mammals, specially the male ones, have a special predilection for boobs, I love them! I don't regret to express that admiration to such an amazing part of the female anatomy. If I had a predilection for asses, ears, toes, or dicks I would have chosen those as my top analogy.. but I prefer boobies and something tells me I am not the only one!</comment></comment>


Morgan Stanley is cutting about 1,500 jobs - <AUTHOR> https://www.cnn.com/2019/12/09/business/morgan-stanley-job-cuts-wall-street/index.html <comment><USER2> USCIS should immediately deny the vast majority of H1Bs Morgan Stanley is obviously abusing, and should make it a policy to do the same for any company announcing layoffs.

'Analysts' making $75k in Manhattan does not appear to me as a legitimate use of the program - that these low paid positions absolutely could not be filled with American citizens is bullshit. More likely they couldn't find educated US citizens willing to work 60 hours a week for $80k in NYC, with the threat of being tossed from the country if they didn't.

I'd say any visa worker being paid less than what a typical VP makes in the same Morgan Stanley office should be revoked, and fines should be paid. Finance companies tend to be the worst of these abusers, and every visa they fraudulently use means a great engineer is disallowed from working for a US company which has a valid need for real talent.

[https://h1bdata.info/index.php?em=Morgan+stanley&job=&city=&...](https://h1bdata.info/index.php?em=Morgan+stanley&job=&city=&year=2019)

</comment><comment><USER3> "Morgan Stanley plans to take a charge of approximately $150 million to $200 million because of the layoffs, a person familiar with the matter said."

At 150M / 1500 jobs, does that mean each employee cut costs $100K? If so, is that severence pay or something else? I'm also curious what the distribution would look like. Is it like most people get almost nothing but some big cats get golden parachutes?

<comment><USER4> I doubt this includes executives with golden parachutes. They typically don't do those in bulk like this. This is more likely severance pay, immediately vesting RSU/options, any outstanding benefits owed, and any increased fees/taxes owed because of the layoffs.

</comment></comment><comment><USER5> Wishing good luck to those affected.

</comment><comment><USER6> I'm a developer at Morgan Stanley. The layoffs were largely targeted at technology and operations in New York and London, including a significant chunk of middle management. Word is that there could be more in January/March targeting lower level people and contractors. There will of course be more layoffs to come every December for people who are too old or are make too much money. Needless to say, I'm heading for the exits.

</comment><comment><USER7> "We remain committed to controlling our expenses," CEO James Gorman said at the time.

Morgan Stanley CEO James Gorman pay rises 7 percent to $29 million (2018)

Sure thing there, Jimmy. Remain committed to cutting your expenses. I feel bad you have to live on a measly $2 million dollars a month.

<comment><USER8> I guess if he can figure out how to cut 1500 jobs without affecting the bottom line, that saves the company $150m a year (assuming $100k average salaries) and so a few more million in CEO salary seems like a drop in the bucket.

But I'm guessing you could find someone else able to cut 1,500 jobs for a little bit less than $29 million a year.

What it really comes down to is sort of like the old "nobody ever got fired for choosing IBM". A board of directors has no incentive to take a risk on an unknown leader when they can hire a "brand name" one for a mere $29m.

Same reason a company pays millions of dollars for a simple rebranding logo update or why Google pays $500k for top engineering talent. There are plenty of cheaper options out there that might be just as good or even better. But when the new company logo is a flop, you want to be able to say you hired the best. Not, "Well we saved a ton of money by using 99designs."

<comment><USER7> Good points. I feel very fortunate that I have never had to work at one of these megacorps (banks, tech, etc) where you're just a number on a balance sheet. It hits me in the gut thinking about 1500 people being fired over a bank pretending to be worried about the future.

</comment></comment></comment><comment><USER9> Seems odd the cuts included tech jobs, given the increased pervasiveness of tech in finance.

<comment><USER10> Just means they hire contractors for those jobs now. No way 1,500 did a cumulative sum of 0 work.

<comment><USER11> It's likely a mix. Some jobs will get put onto other people, Some jobs will just go away and never come back. When they feel pain they'll fill the role with a contractor or cheaper person.

</comment></comment></comment><comment><USER12> Just out of interest, what is the main tech used in finance these days? Still a mix of Python, Java and C#?

<comment><USER13> I worked at JP Morgan a couple years back, they were in the process of migrating a ton of their legacy systems to their own terrible proprietary Python offshoot.

<comment><USER8> Why in the world would a finance company need to fork python rather than just a custom framework or something?

</comment></comment></comment><comment><USER14> Nothing doing. The Street cut big in Fall 1998 and look what happened next. Source: I worked on Wall St back then.</comment>


Ask HN: Are domain registrars gaming the system? - <AUTHOR> I recently found a nice 3 letter domain under the .mx tld. I tried visiting the domain but it wasn't registered, with no whois either.  Upon trying to register it with Namecheap, I got as far the checkout, entered my credit card details, but the transaction failed. It wasn't my card, but the domain itself was apparently unavailable.
I then revisit the web address, and suddenly there appears a domain company's landing page with a message saying the domain is for sale and it gave me a UK number to call. Intrigued, I call the number (it was around 3 am in the UK) and it connected me to a call center in Eastern Europe, where the operator let slip that the call center belonged to Namecheap. This made me a little suspicious that perhaps Namecheap deliberately failed my transaction, registered the domain in order to get me to pay much above the standard price of the domain.
So I want to know: (a) has anyone experienced something similar? And (b) is this legally permissible? It sort of reminds me of front running in the stock market where the market makers are taking advantage of their privileged position... <comment><USER2> Hi guys - I work for Namecheap. We don't own any call centers. We don't even offer phone support. It sounds to me like the domain may have been premium and we accidentally reported it as available. Can you check the whois and see when it was registered?

Namecheap has and never will do this - period.

</comment><comment><USER3> It could just be that they cache availability data, then do a cache invalidation on purchase to make sure. I see lots of inconsistencies between what different vendors consider registered.

I guess check whois before visiting any registration site is the lesson here.

Namecheap is a good brand in my mind but if I find out they do this it'll be disheartening.

<comment><USER4> Yup, I always, always, always simply check for domain availability via pinging the TLD's registry directly using the whois command in my terminal. I've been burned like this before by checking on another registrar (I forget which so don't want to make accusations) and not getting past the checkout process like OP. And with the whois command you don't need to worry whether the registrar you're using to search sells the TLD you're looking for or not, which is a nice plus.

There's absolutely no reason to ask a third party domain registrar whether a domain already exists. People need to spread the word more!

</comment></comment><comment><USER5> I remember suggesting a sick domain to my friend for his new website just a year ago. he purchased it once and never really used it. so I recently I decided that I will buy it for myself. But now that domain name is premium domain and I have to pay 700+ USD extra to buy it. he used GoDaddy.

<comment><USER6> Registrars picking up expired domains is definitely a thing although, perhaps, a touch more ethical since someone else would likely pick it up anyway?

</comment></comment><comment><USER7> How did you check the whois? Through an online interface or i.e. by running whois through terminal on mac?

<comment><AUTHOR> I think I just used bash.

</comment></comment><comment><USER8> you shouldnt be using that domain system. In fact a good question is, where can you go to search for domains and be relatively "clean" from these tricks?

I use bluehost.com and gandi.net in the past and i generally didn't have this issue.

</comment><comment><USER9> I know for a fact Godaddy used to do this, I don't know if they still do (but would assume so). If you searched for domains and/or added them to the cart but did not purchase right away, they had their little known team of reviewers that constantly checked the list of all domains people were interested in purchasing. The ones that were deemed valuable were registered by an affiliated entity and offered in their auctions. My source for this information is a person who used to work there.

<comment><AUTHOR> This sounds totally unethical to me. Is someone regulating this? Have they ever been fined for such underhand tactics?

<comment><USER10> I think there are some ICANN policy preventing/limiting this. However, that generally only applies to gTLDs. The domain in question .mx is a country code domain. So ICANN does not have the same level of say on certain things.

-edit- Also registrars and registries have probably spend more time interacting with ICANN, and probably push for policies that are advantageous to them.

<comment><AUTHOR> Wow, why is this not made a bigger deal of? I mean this is outright market manipulation, is it not?

<comment><USER10> Countries, can construct their own policies for their domains. Sometimes they omit things or allow things that other registries prohibit. They also may require things like being a resident ect...

However, quickly looking at some ICANN's policies take look at number 3. Wheather any of this applies to .mx depends on how the policies for that ccTLD are setup.

[https://www.icann.org/resources/pages/approved-with- specs-20...](https://www.icann.org/resources/pages/approved-with- specs-2013-09-17-en#registrant)

Also if you are thinking of filing a complaint keep in mind ICANN is quite bureaucratic so nothing may happen or take ages.

-edit- if the domain in question is important I suggest talking to someone well versed in the minutia of all this.

<comment><AUTHOR> So domain front running is a thing (I actually coined the term yesterday without knowing it was already a thing!): [https://en.m.wikipedia.org/wiki/Domain_name_front_running](https://en.m.wikipedia.org/wiki/Domain_name_front_running)

According to the article, it seems it's not very well regulated.</comment></comment></comment></comment></comment></comment>


Ask HN: is it possible to sell an idea for a UI improvement? - <AUTHOR>

Say I have an idea for a UI improvement in iTunes. Could I approach Apple and pitch my idea for a potential "finders fee"? <comment><USER2> Probably not. There are potential problems where you disclose an idea, the company realizes that it's something they're already working on so they don't license it, then when the product comes out you sue them for "stealing" the idea, and then they have to pay lawyers to smack you down. Also, the transaction cost for negotiating such a thing may be almost as much as the idea is worth (e.g. would you negotiate for a month to get, say, $5K?).

It _may_ be possible to get a patent and sell it, but that's a pretty heavyweight process and doesn't have a good record of success.

<comment><AUTHOR> Darn. It would be nice if there was a way to do it. I'd be happy to take a one-time spot payment and then never bug them about it again.

With open-source, I could go in and make the change myself, but if the owning entity will benefit from it, it only seems fair to me that they should share that benefit. Even if it's just once as a way of saying thank you.

<comment><USER3> Just design a mockup of it in Photoshop (or code it, depending on whatever it is) and post it up your blog. At least then you'll get credit for it.

</comment></comment></comment><comment><USER4> The only way I could see that happening is if you had a very good social connection in the right place at Apple. Engineering that connection would likely be much harder than mocking up or coding the fix.

If the software in question has an extensible architecture or plugin API that could be your path to getting the feature you want though.</comment>