Silicon Valley hubris watch, Mary Meeker edition - <AUTHOR> http://blogs.reuters.com/felix-salmon/2011/02/25/silicon-valley-hubris-watch-mary-meeker-edition/

<comment><USER2> The goals of countries and companies are usually very different. Company's maximize their owner's financial returns, countries (should) maximize their citizen's happiness (standard of living + freedom + etc. etc.). Different tools for different jobs.

</comment><comment><USER3> The second paragraph strikes me as hubris of a totally different sort. I get the feeling this guy would be writing "how can a group of commoner think they can not only create a new government but run it better than the King" in 1776.

In general and ignoring party affiliations, why wouldn't we want a successful business person running for office? They have experience in hiring people and tax policies. Who is not full of hubris when they run for office?

Once of the many problems with Medicare has been fraud. The government has not dealt with it like a business would. The government doesn't have the same incentive. It seems that if the government had a lot more business like tendencies in its governance, it might be a lot more efficient. The reasons businesses exist are that they are a pretty efficient organizational tool (not perfect, but nothing is).

The prejudices laid out in that second paragraph really make it hard to really look at what the rest of the article says. He may be right in this instance about this report, but it seems like an opinion piece of poor value.

</comment><comment><USER4> At first I thought Mary Meeker was delusional - to think that the US budget problem is one of _identification_ is completely missing the point. But then I realized she's just pushing the underlying link between technology and politics: promise radical forward progress through tough decisions (made by you) and sacrifices (made by nebulous _other_ people).

</comment><comment><USER5> @protomyth, re: "why wouldn't we want a.."because the criteria to be successful in business and government are completely different! In business the ONLY goal is to create value for your shareholders.

In government the goal is to serve your people. If you're in government and lose sight of this goal, then you end up like Ben Ali, Mubarak, Gadafi etc :-) All of them created value for their "shareholders", be they foreign oil companies or the domestic businesses that were run by the local oligarchy.

<comment><USER3> The goal of a business is to return value to the people who own it. This is really no different than what the goal of government should be. Government needs to return value or it should be tossed to the street. If a government sees foreign oil companies as its "shareholders" then then the local populous needs to get rid of the government.

All this being said, I still want to know the qualifications of a person who should run for office that isn't seen as hubris by this author. It is a serious sign of problems and out of touch politics when we have a professional political class divorced from participation in commerce. If a government leadership has no or little understanding of commerce than how the heck can they make rules that economically work? It is like asking a non-techincal manager about coding standards.

<comment><USER5> You're saying the goal of government is to "return value" to the people. I'm saying its goal is to "serve" the people. I think we can agree we're saying the same thing.

Here's the thing about your second paragraph: There is self-confidence, which is an absolute requirement if you want to start/run a business, a political campaign or even a war.

Then there is hubris. Hubris is when you haven't bothered to vote (the most basic civic duty) for 28 years, and then run for Governor of California based on the fact that you've been CEO of a Silicon Valley company. To me this is worse than asking a non-technical manager about writing coding standards.

Its like a non-technical manager TELLING you how to write a coding standard.

<comment><USER3> I guess I can agree on that. My point is that the both companies and governments are organizations formed by people without much difference in goals.

I get your definition of hubris, and go along with that in one case, but read the writing in the article makes it very much sound like all business people should stay out of politics. I am very sure that is not and has been shown to be a bad idea.

<comment><USER5> Hmm..when I read the article the first time I didn't get the impression that he was saying business people should stay away from politics. But I was closely following the 2008 election in CA and assumed that's what he was referring to.

I think business people should definitely be involved in politics. I think everyone should be involved in politics, as a matter of fact. Democracy is a wonderful thing.

But I don't think being successful at business automatically means you're going to be successful in politics as well.

</comment></comment></comment></comment></comment><comment><USER6> Correct me if I'm wrong, but was Meeker not the arch cheerleader for dotcom bubble compaines such as Netscape, 360 degree Networks, Aol, and many others? I recall her sending "buy" and "outperform" letters to clients for companies who lost from 90% - 100% of their values.</comment>


Sibyl: Google's System for Large Scale Machine Learning - <AUTHOR> http://www.kdnuggets.com/2014/08/sibyl-google-system-large-scale-machine-learning.html

<comment><USER2> There's a popular dystopian Cyberpunk Anime, _Psyco-Pass_ , which has an AI system controlling and analyzing the population (keeping the "peace") called the Sibyl System.

The system can analyze a person and instantly determine their "Hue" (mood) and how likely they are to commit a crime.

Spoilers are in the following link, the mystery behind the Sibyl System plays a significant role in the series [http://psychopass.wikia.com/wiki/Sibyl](http://psychopass.wikia.com/wiki/Sibyl)

<comment><USER3> I really enjoyed Psycho-Pass. A smart an entertaining series. Other than the obvious picks (cowboy beboy et al), any other recommendations for "mature" anime?

<comment><USER4> I liked Terra e (2007, not the 1980 film which isn't very good). It bears some similarities to Psycho-Pass, although it probably doesn't meet the "mature" marker with its super powers.

I struggle to recommend more because mature anime is almost nonexistent these days. I can count on one hand the number of shows that might fit the bill in the past 5 years (Aoi Bungaku, Jormungand, Attack on Titan and Night Raid perhaps, and they're not all good).

If you just want something entertaining without the same old cliches in most anime, then Gintama will have you in stitches.

</comment></comment></comment><comment><USER5> FWIW, the name is similar to a technology in fictional TV Show, "Sibyl System"; which is a system that composed from large amount of brain to decide what things to do next.

<comment><USER6> The show is an anime named "Psycho Pass", it's on netflix. I was thinking the same thing.</comment></comment>


What "technical" concerns do I have with systemd? - <AUTHOR> http://blog.lusis.org/blog/2014/09/23/end-of-linux/ <comment><USER2> Something that tends to get lost in these discussions: it's not a question of systemd-versus-sysvinit. Systemd is miles better than sysvinit. There's absolutely no question that the vast majority of Linux users would rather sysvinit disappear entirely.

But that _doesn 't_ mean that there aren't better alternatives. My personal preference is runit[1], which is based on djb's daemontools[2] and gives you all the dependency management and speed gains of systemd without the monolithic architecture and without the complicated shell scripts of sysvinit, as well as cool features like service management trees for non-root users. (In fact, runit doesn't need to be run as init—you can run it as a non-root user and provide service management even if you use another init. It just happens to make a nice init.)

The tests I've seen show that a minimal system with runit boots roughly as fast as than a minimal system with systemd. That doesn't mean runit is the end-all solution to "which init"—it's perfect for my needs, but maybe not yours—but it _does_ mean that the choice is not a choice between systemd-but- fast versus sysvinit-but-slow. The field of choices is much, much broader.

[1]: [http://smarden.org/runit/](http://smarden.org/runit/)

[2]: [http://cr.yp.to/daemontools.html](http://cr.yp.to/daemontools.html)

<comment><USER3> What mystifies me in these systemd discussions is that people constantly seem to attack a _caricature_ of systemd that has little in common with its actual implementation. Take for instance the perpetual "monolithic architecture" argument. _What_ monolithic architecture? Systemd is in fact highly modular. For instance, PID 1 concerns itself with starting and monitoring units, and not much more. Other functions are implemented in other programs, such as journald, udevd, logind and so on. Of course, some of the components sometimes need to talk to each other, but generally via well-defined (D-Bus) interfaces - e.g., pam_systemd registers user sessions with logind via a D-Bus call, and loginctl asks logind about current user sessions, also via a D-Bus call. What's wrong about that architecture?

Now, systemd the _package_ is getting pretty bloated. For instance, there is no reason why stuff like networkd couldn't be in a separate package that depends on systemd. But that's not really an architectural issue, and not much of a problem for users. (For instance, you can disable networkd just fine.)

<comment> jude- What mystifies me in these systemd discussions is that systemd proponents always seem to think that "modular" is somehow the opposite of "monolithic," when it is entirely possible for a system to be both.

"Modular" only means that a system is factored into components that address logically separate concerns. "Monolithic" means that your modules are tightly coupled.

For example, the Linux kernel and X.org are both modular and monolithic, as is systemd. Coreutils, by contrast, is modular and NOT monolithic.

<comment><USER3> The Linux kernel is considered monolithic because all those modules run in the same kernel space, where they can all walk over each other and bring down the system. Systemd is not like that: its components run in separate processes.

By your line of reasoning, the GNU Hurd is a monolithic OS, because most Hurd servers live in the same source tree and send messages to each other at runtime.

<comment> vezzy-fnord systemd's modules are interdependent and all require systemd to be PID1 in order to function. You cannot, e.g. strip out logind only and use it as a ConsoleKit replacement. Contrast this with a toolkit based approach like s6, which can run as init, process supervisor or both, and can have its tools that operate on process state be used independently.

Another criteria is whether you can swap out one component without breaking the whole. You can't do this for journald, for example. You're forced to keep it by reducing it to a sink that redirects to your syslogd of choice. On the other hand, replacing parts of the GNU coreutils with those of 9base or sbase, for instance, won't break the rest (though it will break programs that depend on the GNU coreutils' extended options, of course).

<comment><USER4> The journal is a bit of a contrived example though, it is pretty much the only mandatory part of systemd outside of pid 1 and you can still replace it, you just need something to fill the place of it and no one wants to put forth the effort to create some journald compatible rsyslog daemon because it would be mostly pointless. Also, if you really hate it you can still configure it to not even store run time logs by throwing Storage=None into the config file.

</comment></comment></comment></comment></comment></comment><comment><USER5> So... none?

Unintegrated desktop linux is painful, and the fixes for it so far have mostly been hacks. Systemd actually attempts to create some kind of modern cohesive system which is a _good_ thing.

Maybe you don't see the downsides to the lack of integration because you're just used to putting up with them.

<comment><USER6> Tightly integrated operational systems are painful. The article really says it all:

> Linux is becoming the thing that we adopted Linux to get away from.

It's just true in many more aspects than the one where this sentence is placed.

<comment><USER7> Most people now didn't adopt Linux to get away from something, its just the default server OS. (And not desktop).

<comment><USER8> I think mostly people adopted Linux to get away from paying a lot of per-seat license fees for everything, and to get away from having to buy some vendor's medium iron hardware rather than just using commodity x86 chips.

<comment><USER7> Ten years ago yes. Now we have the new people who have never used anything non x86.

</comment></comment></comment></comment></comment><comment><USER9> As a user of linux on the desktop, I've never felt a moment of concern over the fact that it takes longer to boot than did Windows. I'm not sure who is panicked by this and I'm distressed that we would solve all of our problems with init by embracing systemd.

If Gnome requires systemd, lets drop Gnome.

<comment><USER10> As a user of computers, I have never once felt that boot time was adequate for any device I have owned.

<comment><USER11> You must be young. Back in the good ol' days computers booted instantly. Apple ][, Commodore 64, I'm looking at you.

<comment><USER10> My first computer was a Mac Plus, so it appears I just narrowly missed the good ole days.

</comment></comment></comment></comment><comment><USER12> Integration comes with a huge price.

I'm a beginner sysadmin, and therefore not really knowledgeable about the recent changes in Linux -- however I've seen FreeBSD in production(ish), and it was indeed a more pleasent experience. Paths, configuration, the package system, the documentation (!) all felt nicer.

<comment><USER13> I believe it's more about tight vs loose coupling, not integration. The contrast is, systemd's parts are relatively tightly coupled together (in a way one can't easily pull, say, journald and use it autonomously, with other init), while, traditional init systems are bunch of loosely coupled mostly autonomous modules that happen to reliably work together thanks to standards' glue (so, they're integrated as well).

I could be wrong on this, though. Just my thoughts.

<comment><USER14> I suspect the 'standards glue' is an important aspect of all this. With loosely coupled modules and _standardised_ glue you can update components separately on different time scales and be reasonably confident that they will still integrate with other components.

Tighter coupling with rapid integration in functions and therefore changes in glue makes it harder to work piecemeal. Distributions have very different time lines. Pity the packager stuck trying to back port patches to an earlier version of the system when the upstream project(s) is(are) pushing out security updates based on the current versions and their current glue/api.

Of course it will _work_ and _work well_. Redhat are betting their major product on this set of modules. The problem will be the load on other projects working around this.

</comment></comment></comment><comment><USER15> He's hit the nail on the head - systemd's fundamental design is not appropriate for the server environment:

"I have to provide a system that runs reliably and can easily be reasoned about and yet I have to build it on distributions created by people who consider how long it takes to get to the fucking GDM login screen and if shutting the laptop lid will cause the system to hibernate properly or not."

<comment><USER16> Why do you "have to" build it on those distros? Why not use a server distro that doesn't even have X let alone GDM?

<comment><USER15> The problem is that in many server environments, particularly at scale, the speed of the bootstrap processes of the OS doesn't matter. One of the goals of systemd is to make the bootstrap process faster, which is irrelevant for those (non-desktop) use cases. So you see, systemd is solving problems, and making trade-offs to do it, that just don't matter for the non-desktop use case. I can of course choose not to install gdm, but that doesn't change the fact that systemd was designed (you might say over-designed) with the desktop use case in mind. Because of that, I have to live with those trade offs, even though my use case does not benefit. Since all major Linux distros are deciding to adopt systemd, it will be very difficult to "roll your own" and use something else, especially since the rest of the userland will assume that everyone is doing things the systemd way, this making it even harder to go against the flow.

<comment><USER8> What tradeoffs is it making for faster boot times that you feel aren't suited to the server?

</comment></comment></comment></comment><comment><USER17> Why weren't any of these objections heard back before Canonical knuckled under? Was upstart even worse? I really enjoyed the "impotent rage" piece linked in TFA's comments.

<comment><USER18> Systemd didn't used to be this invasive.

There have been "better init" options for many years, none of which gained much traction. So most of us figured the community as a whole wasn't very bothered. IMO systemd has only achieved "popularity" by using some very underhanded tactics.

<comment><USER19> Is this a classic Poettering thing?

How'd PulseAudio get stuck in so much stuff? Is this a pattern?

<comment><USER20> It's not really a "Poettering" thing. More like a "Red Hat" thing. They control (= their employee are mantainers and developers of) most linux core userspace programs/libraries, starting from Udev and Dbus and Upower, they/their developers make the choices that matters in that regard. It's how OSS operates.

</comment></comment></comment></comment><comment><USER21> Whatever happened to the old unix philosophies of KISS, and if it isn't broken, don't fix it. Granted, as many other have pointed out, SysVinit definitely has its pain points and could use improvements, but there are some other init systems people can use without having systemd shoved down our throats. It's been a while since I've played with *BSD, but it might be the time to start seriously looking at it again. Or switch to slack/debian and keep my old-fashioned init system.

<comment><USER22> debian is switching to systemd. the only big holdout i've heard of besides slackware is gentoo.

</comment></comment><comment><USER23> Assuming that everything the author says turns out true - such as the "big one" exploit - in say an year from now, does anybody know any active popular open source distro that aims to keep systemd away from servers?

<comment><USER24> Debian has only made systemd the _default_ , and getting sysvinit back is as simple as running `apt-get install sysvinit-core`.

Removing systemd might have consequences for GNOME, but that's not a concern on servers. There is a significant enough anti-systemd contingent in Debian (not to mention Debian also supports kfreebsd, where systemd doesn't run) that I'm confident sysvinit will remain a viable option for servers and non-GNOME desktops on Debian. Even GNOME desktops may work on Debian without systemd thanks to the work being done on systemd-shim.

<comment><USER14> _"...and getting sysvinit back is as simple as running `apt-get install sysvinit-core`"_

Well I gather that is the _intention_ but there are a few bugs at present around that and an ongoing issue about upgrade from Wheezy to Jessie changing the init system silently. See Debian-devel for gory details.

</comment></comment></comment><comment><USER25> systemd should really include pulseaudio, and nginx. Oh, it already has a httpd in there.

<comment><AUTHOR> And it's own database which is mentioned in [http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/69...](http://thread.gmane.org/gmane.comp.sysutils.systemd.devel/6922/focus=6950)

<comment><USER26> And it supports QR-codes for kernel panics!

<comment><USER19> oh ffs

<comment><USER27> QR codes for kernel panics is actually brilliant, because it encodes the data which would otherwise just be serialized to screen in a manner that makes it portable.

<comment><USER4> That actually might be nice but don't get your hopes up, systemd isn't actually part of the linux kernel as some conspiracy nuts would have you believe. The systemd project can't possibly just add random stuff to kernel panics, all of that code is in the kernel, not userspace.

I think a little while ago there actually was some work done on making kernel panics display a QR code but I doubt it'll ever be merged in if it's even done.

<comment><USER27> I think you're right, but if that's so, then apparently all of the features the OP claims to be bloat in systemd are questionably in systemd at all, and the entire discussion is moot.</comment></comment></comment></comment></comment></comment></comment>


Ask HN: Pivotal Tracker SSL Error? - <AUTHOR>

Pivotal tracker isn't loading for me in browser. "Chrome: this webpage is not available". I got an SSL error a moment ago. Pings fine, fast response in terminal. <comment><USER2> dfgdfgdfg</comment>


School Attendance (9th grade) Predicts Graduation - <AUTHOR> http://www.learnboost.com/school-attendance-in-9th-grade-predicts-high-school-graduation/

<comment><USER2> Conformance, not intelligence, predicts success in school at every level (well, until you're a tenured research professor, at least.) This fact is why I find it so amusing when people use school drop-out rate to as a proxy for per-capita intellect (as in the study on HN yesterday that showed that "Socratic discussions lower the drop-out rate"): all you're measuring is an increase n the amount of shit students are willing to put up with before walking out.

<comment><USER3> Intelligence (with a healthy dose of diligence) plays a big part in success in college. If you don't think so, then you're either not challenging yourself enough, or your college is not challenging enough.

Why do so many people on HN love to disparage school? Did they have horrible experiences? I had an incredible experience and learned an amazing amount of stuff. I almost never felt like I had to "put up with shit" to get a degree, or anything along those lines. Maybe I'm the exception, but I doubt that's the case.

<comment><USER4> My teacher in seventh grade was a tenured paranoid schizophrenic who had it in for me as soon as I corrected her on the first day of class. This was combined with an altogether toxic social environment. For me, school seems pointless -- a failed exercise in education cited within in a social disaster zone. I'm glad I got out. But the general inefficiency of the educational process has spread as memes to most corners of western society, so I am never truly away.

<comment><USER3> Can you describe toxic? I'm not trying to be a jerk, just genuinely curious. I remember social life in junior high and high school as being pretty stressful, and there were bullies (a handful I suppose), but I wouldn't describe it as toxic. I wasn't particularly popular or unpopular, just kind of did my thing with some like-minded friends. Kept to my academic clubs, played some sports here or there.

It sounds like the social aspect was what really killed it for you, not necessarily the education you got.

<comment><USER5> You asked this 3 days ago, so probably you'll never see my reply. But:

I read, and understood most of, _Cosmos_ while I was in elementary school. For me, the educational process of school certainly was toxic. I can see that it works for plenty of other people, but for many -- some like me -- it is extremely adversarial.

It took me years after graduation to relearn learning, and re-discover focused curiosity, and to recall again how to _intelligently_ consider the accepted notions that many other people have.

To be more specific, public schools lack (among other things) any focus at all on critical thinking and problem-solving. There are simply not classes for those at most schools. At best, a few teachers try to work them in to their class here and there, but it's not taught the way that, say, mathematics is.

Science classrooms are another specific example: they tend to concentrate on printed material and multimedia, and the few "experiments" that students do are little more than facades for re-confirming whatever thing is being taught that week. There is very little there to teach investigation, or to drive intellectual curiosity.

I say this as someone that was fortunate enough to attend some of the best schools in the Bay Area at the time; I imagine that my experiences, mediocre and toxic as they were, were still quite a bit better than what the vast majority of students are exposed to.

This is not to say that I didn't have some brilliant and dedicated teachers, however. I remember several of them quite fondly, all the time.

</comment></comment></comment></comment></comment><comment><USER6> Corellation != Causation

Why do high schools keep abusing statistics? This is one of many cases where I have seen a high school find correlation between an act and grades, and then made policy decision assuming things like attendance and extra-curricular activities caused increased grades instead of considering the alternative that kids who have a nature that causes good grades also causes attendance and participation in extra-curricular activities.

<comment><USER7> Somebody's Third Law: the comments on any study of anything will inevitably contain some guy reminding the world that "correlation != causation".

This will happen whether the study actually asserts some kind of causal link or not. In this case, it doesn't.

<comment><USER6> Just because "correlation != causation" comments correlate with studies, does not mean idiots like me cause them. I pose that it is the fault of the Study, and not the crazy person on the other end of this keyboard.

</comment></comment></comment><comment><USER7> That's a great graph. The best thing they could do with it would be to just hand out a copy to every 9th-grade student.

<comment><USER8> > The best thing they could do with it would be to just hand out a copy to > every 9th-grade student.

What makes you think that the folks who dropped out would be affected by that graph?

Assuming that someone does something because they're ignorant is almost always a mistake.

Example - smokers know that smoking is bad for them and they knew it long before the warning campaigns. (The phrase "cancer sticks" is quite old.) If you don't understand that they smoke because smoking is better for them than doing without, you can't possibly help them.

<comment><USER7> I'm assuming that at least _some_ of these kids who are wagging school are just doing it out of short-term thinking. They don't want to be high-school dropouts, they just feel like hanging out at the mall today instead of going to school. They don't think it matters. Having this graph burned into their minds might scare 'em into showing up on days they otherwise would not have.

Cigarettes are chemically addictive, so analogies to most other behaviours are weak.

<comment><USER8> > I'm assuming that at least some of these kids who are wagging school are > just doing it out of short-term thinking.

Actually, almost all of them are.

> They don't want to be high-school dropouts,

You're assuming that they care.

> Having this graph burned into their minds might scare 'em into showing up on > days they otherwise would not have.

Do you really think that seeing that graph will keep them from engaging in short-term thinking? Wowsers.

The graph shows one consequences of short-term thinking. However, they're surrounded by negative consequences of short-term thinking and still they continue.

> Cigarettes are chemically addictive

That's not the only effect. It may not even be the strongest.

And it isn't true of starting smokers. They also know what smoking will do for them, but yet they start.

</comment></comment></comment></comment><comment><USER9> Isn't this pretty obvious?

Also, it's clearly not the absences causing people to fail to graduate. Just think about the people you know who skipped classes and days of school in 9th grade...

<comment><USER7> It should be obvious both ways. On one hand, the people most dispositionally inclined to skip school are the people most inclined to drop out. It should be fairly obvious there's a causal link too, because if you're missing every fifth day of school you're probably going to fall way behind in your classes and understand less and less.

Still, the magnitude of the effect is surprisingly large, and this information is useful to schools if they're trying to minimise dropout rates.

<comment><USER10> I wouldn't be entirely sure of your assumptions that missing class makes them fall behind.

An example is myself. I am a high school drop out. I gave up when, in Grade 11, I passed my Math 20 class with an 85% - but had credits withheld (meaning that I either had to retake or had to make them up with some other class) because I missed 60% of the class. This repeated itself in other subjects. I didn't need to go to school, I was still learning the concepts etc, but I would not have graduated without repeating classes (and actually being there for them) because of my attendance record.

I'm also aware that this is anecdotal, but from discussions I've had with other people in similar situations, it's not that I was necessarily unique.</comment></comment></comment>


Developing your style of code - <AUTHOR> http://alexsblog.org/2014/07/24/developing-your-style-of-code/

<comment><USER2> "use validators to check your code" \- does any one do this? It seems most people just hack lots of manual checks (unit-tests) or use third-party static analysis.

<comment><USER3> Given that his blog is about web design, I would think he's talking about markup-validation, rather than unit-tests or static analysis</comment></comment>


What's new in HAProxy 1.6 - <AUTHOR> http://blog.haproxy.com/2015/10/14/whats-new-in-haproxy-1-6/ <comment><USER2> External check pleases me greatly, but sending emails for me seems to be overkill, there are well established ways to do this in unified manner (logparsers, snmp traps etc). Half way trough to fullfill Zawinski's Law.

<comment><USER3> Yeah, there's a mix of awesome and what? stuff.

> Since 1.6, HAProxy can forge SSL certificate on the fly! Yes, you can use > HAProxy with your company's CA to inspect content.

> Device Identification

(Considering it seems you need a proprietary lib)

> mailers

> lua

> Processing of HTTP request body

All seem to be be moving away from what HAProxy is/was. It's not an application server. It's not a webserver. It's not a mail server.

<comment><USER4> Lua is kinda awesome, though. Use it with plenty of common sense and it can be a very powerful tool.

<comment><USER3> I guess part of my concern with Lua was the example on the linked article. It seems to be able to interface with most of the system and not just as a content source, which makes more sense.

</comment></comment></comment></comment><comment><USER5> Cool, now we can use Device Identification feature to route mobile users to a different backend, also love the HTTP/2 connection sharing.

<comment><USER6> As always I'm skeptical of reliable device identification. Claiming to have it almost sounds like claiming to own a hen that lays golden eggs. Their blurb about it doesn't do much to convince me so far:

        Through our company, we have some customer who want us to integrate
        into HAProxy the ability to detect device type and characteristics and
        report it to the backend server. We got a couple of contributions from
        2 companies experts in this domain: 51 degrees and deviceatlas. You
        can now load those libraries in HAProxy in order to fully qualify a
        client capabilities and set up some headers your application server
        can rely on to adapt content delivered to the client or let the
        varnish cache server use it to cache multiple flavor of the same
        object based on client capabilities.

        More on this blog later on how to integrate each product.

But it would be a nice surprise if it performed well.

<comment><USER7> Speaking for DeviceAtlas in particular I can assure you that detection reliability is better than most assume. The stated 99% detection accuracy rate isn't marketing speak—it is continously verified on real traffic from all around the world.

We measure two main aspects of performance:

\- _Per-request detection overhead_ : Willy's preferred way to measure impact on HAProxy performance is the per request overhead added. DeviceAtlas adds a few µs per request. Typically this does not cause much of an issue. Example: if a load balancer is serving 20,000 requests per second with 80% CPU, that's 40µs of CPU time per request on a machine that can go up to 50µs. If we add 4µs to that we reach 88% of CPU under the same load, and the end user performance is not degraded in any meaningful way.

\- _Memory footprint_ : DeviceAtlas lets you configure the per-device property set to tailor the memory and performance impact. The resulting memory impact ranges from about 12MB to 100MB.

</comment></comment></comment><comment><USER8> Whenever I see a long list of features like these, especially something major like Lua integration, I always wonder, what was given up in the process of adding them? Normally when there's a performance bump, they show the numbers. In this case there's no numbers. Was there a performance hit? Negligible?

<comment><USER3> I'm surprised to see lua, and to see 1.6 released so quickly. 1.5 took forever to finalize and SSL termination was heavily debated because it wasn't a fast or lightweight like the original goal of HAProxy was. While I realize I don't have to use the lua scripts, it just feels out of place.

EDIT: I guess part of my concern with Lua was the example on the linked article. It seems to be able to interface with most of the system and not just as a content source, which makes more sense.

<comment><USER9> Willy might not agree, and this isn't really a criticism, but I think 1.5 simply got out of hand — he did a lot of (much-needed) architectural cleanup that took a long time to complete, but along the way a lot of new features (and subsequent bug fixes) got piled onto the same branch and intermingled with the cleanup work.

It's one of those "take apart your airplane and put it back together again" projects that one generally shouldn't do, though sometimes there is no way around it. If you need to rearrange the whole internal architecture of your engine, you should it do it quickly and not mix it with new work.

</comment></comment></comment><comment><USER10> As an HAProxy user, support for logging to stdout (and hence journald) would be great. Currently HAProxy users on the major Linux distros either have to use it in debug mode or have a second log server just for the purposes of running HAProxy.

Otherwise I love HAProxy!

<comment><USER11> HAProxy is not linux-specific. We have a POSIX logging facility, and HAProxy works just fine with syslog. If journald has problems with syslog, it's basically journald's problem.

<comment><USER12> In the spirit of avoiding code duplication and making daemontools-like process supervisors happy (that includes systemd for these purposes), I greatly appreciate when logs can be sent to stderr

If the admin wants the logs in syslog, 2>&1 | logger or similar. If the admin wants to use multilog, s6-log, or journald, that's also easy.

(For the same reasons, daemons should not include daemonization routines but should run in the foreground. If I want it in the background, I'll arrange for my process supervisor to start it.)

<comment><USER13> > (For the same reasons, daemons should not include daemonization routines but > should run in the foreground. If I want it in the background, I'll arrange > for my process supervisor to start it.)

If a daemon doesn't... daemonize into the background, it's no longer a daemon - just a process.

Silly loonix folks.

Please see the FreeBSD program daemon[1] or the FreeBSD handbook section 3.8[2].

[1] [https://www.freebsd.org/cgi/man.cgi?query=daemon&apropos=0&s...](https://www.freebsd.org/cgi/man.cgi?query=daemon&apropos=0&sektion=0&manpath=FreeBSD+10.2-RELEASE&arch=default&format=html)

[2] [https://www.freebsd.org/doc/handbook/basics- processes.html](https://www.freebsd.org/doc/handbook/basics-processes.html)

<comment><USER12> The freebsd daemon tool is exactly what I'm talking about. Debian has start- stop-daemon [1]. Process supervisors like daemontools create daemons simply by fork+exec by virtue of the parent process already being a daemon. There's no reason for every service to implement its own daemonization routine.

[1] [http://man.cx/start-stop-daemon%288%29](http://man.cx/start-stop- daemon%288%29)

</comment></comment></comment></comment></comment><comment><USER14> Something I've always wanted to do but from what I can see is impossible in Apache is simply limit the number of connections a single IP can have open at once.

Is this possible with HAProxy? If it is, the documentation doesn't make it clear how.

<comment><USER15> Well its possible with nginx for sure, havent used apache in about 10 years now (first lighttpd then nginx) i think, after switching to nginx no going back.

Haproxy btw is fantastic too, useful for hiding real location of web server from attacks

</comment></comment><comment><USER16> Nice. It supports lua and mail alerts on changing servers now...

<comment><USER17> The mail thing seems like a not healthy growth of functionality.

Most people already have logging infrastructure in place for this.

Unix philosophy and all that.

<comment><USER18> Sending email alerts probably take very little code. Receiving mail is where the complexity is.

</comment></comment></comment><comment><USER19> Great!

But no http2 so it won't get in front of my nginx instances, yet ;)

<comment><USER20> It's too late to include new draft HTTP/2 in 1.6, so it'll be in 1.7

</comment></comment><comment><USER21> I was comparing HAproxy to Squid a while ago and could not figure out what's haproxy's advantage over squid? I ended up using Squid but still am very interested in HAproxy, would like to learn more about it.

Squid remains to be the only one that can deal with SSL proxying(yes it's kind of MITM, but it's needed sometimes), and it's also the real "pure" open source. HAproxy might be better fit for enterprises that need support?

<comment><USER22> HAProxy is a TCP/HTTP load balancer, so the entire perspective of the software (from configuration to feature emphasis) stems from that.

Squid is a caching HTTP proxy, which began with forward proxying but also supports reverse proxying. I wouldn't regard it as relevant to modern, dynamic architectures as HAProxy or Varnish (another caching-focused project).

There's no real difference in open source purity between any of these projects, unless you dislike the stewardship of a company. HAProxy has existed for a long time without such stewardship (as has Varnish). Indeed, Squid's lack of commercial backing might be a hint as to its current relevance.

<comment><USER20> Varnish is a good HTTP caching server, but with the rise of HTTPS and soon HTTP/2 I'm not sure it'll change since last time I heard its developers don't intend to support TLS at all.

<comment><USER23> I disagree, Poul-Henning Kamp's HTTPS/HTTP2 rant is well known, but he's not going to abandon the project. He has steered it to follow the unix ideals of doing one thing well. They (varnish) forked stud and bought it up to date as hitch [1] which covers TLS. At some point they will incorporate HTTP2 once the demand is there.

[https://github.com/varnish/hitch](https://github.com/varnish/hitch)

<comment><USER24> Poul-Henning Kamp's HTTPS/HTTP2 rant ->[https://queue.acm.org/detail.cfm?id=2716278](https://queue.acm.org/detail.cfm?id=2716278)

</comment></comment></comment></comment></comment><comment><USER25> Lots of goodness!

</comment><comment><USER26> Supports Lua? SWEET!</comment>


Just how many failed startups can Google afford? - <AUTHOR> http://www.simplyzesty.com/google/22176/

<comment><USER2> While the money's pouring in at millions a minute they can afford as many as it takes to find a winner, even if being a giant corporation sabotages some of their attempts.

<comment><USER3> Exactly, a few employees + dollars to try some things out is nothing.

<comment><USER4> It hurts their brand image though. If Google's only products were Search, Android, Gmail, Adsense, Youtube, Docs, Chrome, and Maps then some new product they announced would probably have everyone assuming its going to dominate it's field and signing up to use it instantly.

Since they have had more high profile failures than high profile launches in the last 5-ish years, that leads to people not really trusting that any new product launch is going to be a winner. People having a "wait and see" mentality works fine for certain products (gmail, maps, news, etc would both be fine in that area) but it really kills anything that have social aspects (or economy of scale type products) like Buzz, Wave, Places, etc. These things just have significantly lower value if your IRL social network isn't using the product.

<comment><USER3> Even they can't predict all winners. So the alternative is stagnation.

</comment></comment></comment></comment><comment><USER5> Successful roll-out of self-driving cars ought to pay for one or two. Even if they gave away the software, they could probably make billions per year from licensing content like maps and streetviews or the patent portfolio. Or license the software for a few bucks or a few hundred bucks per car. At $100 per car that would be on the order of $10B. And think of all that ad revenue from commuters who dont have to watch the road.

</comment><comment><USER6> I think a bit part of it is really talent acquisition. Sure the technology in these startups is awesome, but from Google's perspective what they're really buying are the people who made it in the first place.

</comment><comment><USER7> If I were speaking for Google, I would reply: If all of our experiments succeeded, it would mean we are too conservative in what experiments we conduct.</comment>


Piezoelectric Nanogenerator to harvest all sorts of biomechanical energy - <AUTHOR> http://www.technologyreview.com/energy/26689/ <comment><USER2> A couple of years back I was exploring models for a next-gen health club that captured peoples' energy through a combination of min-generators on cardio and piezo-electic devices underneath classroom floors. Back then, the cost didn't justify the potential to capture energy, but developments like this start to make the concept potentially more viable.</comment>


Chrome Extension Fixes Twitter's Grammar, Tells Us "Whom" We Should Follow - <AUTHOR> http://techcrunch.com/2011/02/25/towhomtheextensiontolls/ <comment><USER2> If you like this, as I do, you could make an extension to fix other subject/object confusion. That would be great for both you and I.</comment>


Show HN: Snipz (shareable code snippets with PRs) - <AUTHOR> https://cclwqvx4995d.deta.dev/ <comment><AUTHOR> Hey HN,

Snipz is a small app that lets you share code snippets.

These snippets aren't static, but can accept suggestions, which are merge-able via a 'merge password'.

The original link is a live demo, but the source code is here (Snipz is a WIP, comments / suggestions welcome):

[https://github.com/deta/programs/tree/master/snipz](https://github.com/deta/programs/tree/master/snipz)</comment>


Ask HN: This doesn't exist: GPS pet implant - <AUTHOR>

I've been researching the subject, and it appears there is no such thing as an implantable GPS locator for pets. The microchip which they commonly receive does not have GPS and can only be read using a special scanner at the vet. There are a lot of GPS collars available, but if the pet is stolen or the collar falls off, those are useless. Anyway just thought that someone looking for a useful project might want to think about it <comment><USER2> The reason they don't get implanted is you can't charge them under their skin. You also need more then a GPS receiver, but some form a transmitter I.E.: GSM, EDGE, etc. to push data back to the client looking for the animal.

Yes GSM/SMS+GPS transmitters can last for months, but normally your pet lasts longer then months.

<comment><USER3> What if you were to use wifi to pinpoint the location instead of actual GPS? Would that make the hardware less bulky? Can you use inductive wireless charging to recharge the device?

</comment></comment><comment><USER4> Nice idea, and I'm sure there are a bunch of people keeping an eye on it, but I don't think it's going to work in practice with currently-available technology.

The smallest GPS module I've seen while looking is the Micro Hornet ([http://www.origingps.com/?post_type=products&p=78](http://www.origingps.com/?post_type=products&p=78)) and that's still fairly chunky at ~6mL - and that's without cell radio, battery etc.

So a good idea, but probably not practical with COTS technology yet.

</comment><comment><USER5> That's a really interesting idea.

I would buy one. My dog was stolen from me (I had her tied up outside a store, and when I came out she had been taken). Witnesses helped me track down the thieves (just some crackheads) and I got the dog back... but I was very very lucky. I would love to implant something like this in her.

I would imagine that kinetic energy could be harnessed to power the unit.

And for those who are wondering: Yes the thieves took her collar off immediately. That was probably the first thing they did, I found it on the ground.

</comment><comment><USER6> I saw an article here on HN once mentioning tech that generates power based on constant motion, &/or body heat. My thought would be to utilize that to power whatever chip would do this.

Sorry but I can't seem to find the story or I'd reference it.

</comment><comment><USER7> What's the use case?

GPS collars meet most common needs such as for hunting dogs. Pets that are let run, by definition return else they would be feral not pets. The standard RFID chip improves the lost pet case significantly and cheaply and without having to plug the cat into a USB charger at night.

</comment><comment><USER8> Another problem with the GPS component is that it's extremely sensitive to antenna coupling, and might not work if entirely submerged in (what is essentially) water.</comment>


Project Jacquard - <AUTHOR> https://www.google.com/atap/project-jacquard/ <comment><USER3> Sage advice from Peter Molyneux:

 _" The bizarre thing is a huge amount of effort and time and money goes into researching the tech, like the Kinect tech and scanning the bodies, and there's always this one line that hardware manufacturers - whether it be Microsoft or anyone else - say and that's 'we can't wait to see what happens when it gets into the hands of developers.' Now if Apple had said that when they introduced the iPhone, I don't think we'd ever end up with the iPhone! What really should happen is that they put a similar amount of money into researching just awesome real world applications that you'll really use and that work robustly and smoothly and delightfully._

 _" They should spend as much money doing that rather than just on hardware tech and saying, 'Okay developers, we'll leave it to you.' If you look at the cases where technology has worked well - touch is one of those, and Wii Sports and motion control; Nintendo didn't introduce motion control until they had Wii Sports. You weren't just playing a few demos. I just hope that for the Holo stuff that they really choose an application and make that sing. That is what transforms a piece of tech from awe inspiring gadget that you try a few times and show off to friends into something that you use as part of your life, and that's really what we want technology to be. And that requires just an awesome amount of design to be put into the software, not just the hardware."_

Source: [http://www.gamesindustry.biz/articles/2015-01-22-molyneux- wa...](http://www.gamesindustry.biz/articles/2015-01-22-molyneux-warns- microsoft-dont-overpromise-on-hololens) via [http://daringfireball.net/linked/2015/01/23/mololens- molyneu...](http://daringfireball.net/linked/2015/01/23/mololens-molyneux)

<comment><USER4> This is why Glass failed IMHO. Google spent a bunch of time on the hardware, but just wiffed it with obvious demo software. Then they just put it out in the world "hey developers, figure out what to do with this, because we can't be bothered".

Instead of a new computing paradigm, it turned into a very expensive head- mounted camera and not much else. Something GoPro had nailed at 1/10th the price point and without the creepy factor.

<comment><USER5> I've also heard the idea of glass was about demoing AND getting the public conversation started about wearables so that when they have a product ready, the dialogue has been running.

<comment><USER4> That's even worse! Now the dialog centers around creepy voyeurism. Google has single-handedly salted the market so nobody can enter it. It will take a decade at least before somebody tries again.

<comment><USER6> After the Glass fiasco, I'll be thinking twice before buying/taking Google's variant of FUD seriously. That was a waste of over 1.5K for me. Too bad there is no accountability (oh wait ... all the Google fans would just say I should have known it was unproven tech and I was an explorer .. blah blah blah).

I haven't been dissuaded from buying all unproven tech gear thankfully! Preordered the Apple Watch (as I have had wonderful experiences with the iPad on launch day and the iPhone) ... very satisfied with it.

I'm on the fence about HoloLens. While I have full faith in Apple and zero in Google, Microsoft is in the middle. The tech is extremely compelling but I Microsoft is known for incremental improvements .. I'd rather not get stuck with gen 1/demo hardware when a lot better stuff may be around the corner.

</comment></comment></comment></comment></comment><comment><USER7> Along with a collaborator from MIT,(1) I helped create rSkin, a multi-touch stretchable textile sensor for robotics.(2)

Here are some really interesting things I learned about e-textiles during my project

\- The hard/soft interface is really hard.

At some point you need to interface with electronics and in many cases this will be a failure point. Also, normal electrical contact methods like soldering just don't work.

\- Stretch is really hard.

Most of the fabrics shown don't look like they have much stretch, but I wanted something that could wrap around robot joints. Turns out that calibrating a sensor for this task is very hard to model. Even without stretch calibrating and maintaining calibration can be hard.

\- Metal oxidizes

I'm hoping Google has taken care of this but many of the thread types I had at the time were silver based and would degrade (become much more resistive) over just a few months.

\- Getting high resolution sensors is tricky.

Getting a ton of conductive threads wired up in a matrix means you're trying to do lots and lots of hard/soft interfaces. Automating bringing all those threads from one grid direction into a tight layout to match with a board or other metal conductor will be a very interesting manufacturing challenge.

I'm surprised and excited to see Google take this on as I still feel there is huge potential for e-textiles in softer and more sensitive robotics.

(1) Hannah Perner-Wilson (who did all the hard work)

(2) Check out the instructable ([http://www.instructables.com/id/rSkin-Open- Source-Robot-Skin...](http://www.instructables.com/id/rSkin-Open-Source-Robot- Skin/))

<comment><USER8> The hard/soft boundary is indeed very difficult, especially when you have bundles of leads in all directions!

I did some work with stick-on stretch conductive textiles, both silver and polymer-based (Eeonyx), and something I always wished I'd had was a high bit- depth A/D converter so that I could work with a ton of headroom to account for the inevitable swings due to environmental changes, degradation, etc. in software.

I'd love to see someone produce a 16bit+ A/D converter front-end for Arduino or something. I actually purchased all the parts for wiring up one of these, but didn't have time to finish: [http://www.linear.com/product/LTC2444](http://www.linear.com/product/LTC2444). Looks like some people have been working on it: [http://dangerousprototypes.com/2012/07/02/interfacing-the- lt...](http://dangerousprototypes.com/2012/07/02/interfacing-the- ltc2440-24bit-adc-with-the-arduino/).

</comment></comment><comment><USER9> This is amazing for card counting. Discreet swipes to add/remove count and double tap to have your phone/watch buzz the current count.

Maybe not the most ethical use of the tech, but sounds fun!

<comment><USER10> Yeah, this definitely takes "Android Wear" to the next level. Integrating pieces of your outfit into your phone/watch will allow for a lot of subtle little tweaks to every day life:

* Leaving work but forgot your keys? The electromagnetic sensor in your pocket will vibrate your phone to let you know the moment you step out of the office.

* No more "three tap check" for keys, wallet, phone. Every time you leave the house your clothes will check that for you.

* Two-factor auth is a lot easier when you can authenticate by wearing special underwear

* Feeling cold? Your clothes can probably detect that and adjust the thermostat in your car or home automatically (including heated seats!)

Lots of cool ideas, but these ideas have been floating around for a while now. Every piece of wearable clothing I've seen that had integrated electronics has been both bulky and gaudy. Maybe a concentrated focus like this will bring it to the next level.

<comment><USER11> I don't see a single one of these applications actually being possible with this. The thread enables touch sensitivity on clothing; nothing more. There are no temperature sensors, RFID chips, electromagnetic sensors etc.

It's interesting that even Google didn't post a single use case for it...I can't think of one off the top of my head either.

<comment><USER12> The project Jacquard site describes some output:

"We developed innovative techniques to attach the conductive yarns to connectors and tiny circuits, no larger than the button on a jacket... LEDs, haptics, and other embedded outputs provide feedback to the user, seamlessly connecting them to the digital world."

[https://www.google.com/atap/project- jacquard/](https://www.google.com/atap/project-jacquard/)

</comment></comment></comment></comment><comment><USER13> In case there's a chance someone doesn't know, the name comes from the inventor of the first programmable loom.

[https://en.wikipedia.org/wiki/Jacquard_loom](https://en.wikipedia.org/wiki/Jacquard_loom)

<comment><USER14> It really bothers me that Google hijacks Jacquard's name for their own project. In the future the Google search engine will bury Jacquard's innovation in /dev/Internet/dustbin

With decency, they could at a minimum have acknowledged his existence, creations, influence, and inspiration.

<comment><USER15> While I don't agree with mkempe, I don't see why this kind of messages should be downvoted... Choosing a name is a difficult task, and honoring someone with their name in a new creation is a noble gift, but the page does not explain why it was named like that, and so it remains elusive. Google could have take the time to explain it. But it's not like it's a shame, mkempe.

Also, if you could see who downvoted you, you could perhaps start a little war, so I don't think that such a conversation system would be better.

<comment><USER16> > _While I don 't agree with mkempe, I don't see why this kind of messages > should be downvoted._

Because mkempe is accusing Project Jacquard of appropriating a historical figure's name for their own gain. Somehow, it seems mkempe figures that the act of paying homage cannot be done without a citation or fair use disclaimer.

It's one thing to suggest adding a note about the historical Jacquard, another to take umbrage at an innocent name. I really don't think that sort of response should be encouraged.

Otherwise, I suppose someone should tell Project Euler that they need to explain who Euler is on their homepage.

<comment><USER17> They do have a picture of Euler on the homepage. I thought it was pretty explicit the project was an homage to them.

<comment><USER16> It's not explicitly stated, but I agree that if you've heard of Euler the homage is obvious.

Likewise, if you've heard of Jacquard or his invention, then the homage here is obvious as well. Neither case requires a footnote explaining the reference.

</comment></comment></comment></comment></comment></comment><comment><USER18> This is definitely not a joke. The guy in the video, Ivan Poupyrev (I'm super proud about graduating from the same university and department he has graduated from), is a world-class authority on UIs that are integrated into physical world.

His website lists lots of English-language materials about him, here's one interview with him in Russian, for Russian-speaking HNers: [http://vozduh.afisha.ru/technology/vy-budete-zhit-vnutri- kom...](http://vozduh.afisha.ru/technology/vy-budete-zhit-vnutri-kompyutera-i- vse-vokrug-budet-ego-interfeysom/)

</comment><comment><USER19> If nothing else, this is immediately useful to the sport of fencing.

If you're not aware, competitive fencers already wear metallic jackets to detect when one has been hit by the other's weapon. If this could make them cheaper/lighter/more durable/more accurate or improve them in any way, that would be pretty cool. I'm guessing you could even track the specific place that they hit.

<comment><USER20> Fencing electronics are, at least last I looked, suuuuuper janky.

</comment></comment><comment><USER21> Here goes my dream of being the first to create a CPS suit from Continuum.

It's actually a weird feeling - on the one hand I love the progress we have; on the other hand, I feel sad that I can't get to be a part of it. It also seems to me that any cool idea I have tend to become a mass-market product before I can get around to start prototyping.

Yeah, I know, the real world. Real world sucks :(.

<comment><USER22> If you are predicting these things, and people are doing mass market products before you can even prototype, it just means that people had this idea before you did, and it isn't that unique any more.

<comment><USER21> I'm painfully aware of that, and I didn't want to suggest that I have _unique_ ideas. Honestly, I don't believe there _are_ unique ideas anymore, not for the last 200-300 years. Even scientific breakthroughs tend to be independently developed in different places simultaneously.

I guess I'm just whining about the hardware world equivalent of "every idea I have has already been done ten times on the Internet by people smarter than me" sentiment, which - from what I learned over the years - is shared by many people here on HN.

<comment><USER23> You just need to be a little more focused, and less concerned about what others are doing (so-called FOMO, "fear of missing out"). So what if someone beats you to the punch? You're striving will _not_ be in vain, and you'll be right at the very forefront when either of you finish your projects - <USER2> even a bit beyond.

Remember, 1% inspiration, 99% perspiration, etc.

<comment><USER21> Thanks for words of reassurance :).

I always considered FOMO to be a fear of missing out parties or Facebook status updates, both of which I fortunately don't have [i.e. fears, not parties and updates]. I never thought about looking at my emotions related to projects from this angle.

</comment></comment></comment></comment></comment><comment><USER24> Reading this on the heels of talking with a colleague about (relatively near) future of TV advertising when marketers will know how many people are in the room (and possibly who these people are) and can deliver hyper-targetted ads, my initial reaction was "oh, crap... my couch will now know I'm sitting on it, for how long, etc... my t-shirt will know the last time I wore it and where..."

This future is inevitable and all the AMAZING use cases such advances bring, but I can't help but wonder how we can keep these operating for the "good" and not the "ugly" of tech and monetization.

<comment><USER25> Don't use bad tech.

Some people will, but that's their loss.

As long as it's a free society, we'll each individually have the choice to stay away from bad tech.

Paying one of my local telco monopolies too much money to watch TV full of ads is _already_ a losing value proposition for me, so I don't have cable TV.

I sure as _hell_ am not going to get a TV that is connected to the Internet and has a microphone, much less shares information with advertisers. Same thing for a couch.

<comment><USER26> The problem arises when the bad tech crowds the good tech out of the market altogether.

I would like to have a smartphone that doesn't spy on me. I can't, because nobody makes one. So my personal preference doesn't matter; my only choice is between either accepting the spying, or not having a smartphone at all.

Now I get to look forward to enjoying this exact same dilemma when I buy furniture! Hooray.

<comment><USER27> What about the Jolla smartphone? [https://jolla.com/jolla/](https://jolla.com/jolla/)

<comment><USER24> Well, there's this: [http://www.jollausers.com/2015/05/sailfish-os-to-become- russ...](http://www.jollausers.com/2015/05/sailfish-os-to-become-russias- official-operating-system-for-mobile/)

My personal bias tells me that can't be without some compromises...

<comment><USER27> It's an open source operating system... what compromises are you suggesting? Maybe the compromise is that they don't sell Russian info out to American interests.

</comment></comment></comment></comment></comment></comment><comment><USER28> If you're interested in this kind of thing, Becky Stern with Adafruit is a pretty great source for DIY wearables. Lots of tutorials and a regular Youtube series that keeps you updated on the latest products and tools.

</comment><comment><USER29> This is the missing part of Google Glass. For interacting with the Glass you don't have to touch the Glass itself. You can just perform gestures on your jeans.

<comment><USER30> You mean, for those rare occasions when Google Glass just doesn't cut it to make you the nerdiest guy in the room, you can now get an extra-boost? Well, sign me up!

<comment><USER21> Like being a nerd is a bad thing :). Wear it as a badge of honour!

<comment><USER31> This feels appropriate.

Wired (1994)/Mondo 2000 R.U. A Cyberpunk? : [https://i1.wp.com/craphound.com/images/R_U_cyberpunk.jpg](https://i1.wp.com/craphound.com/images/R_U_cyberpunk.jpg)

Funny to think of a modern 'cyber-punk' extolling the values of paper currency. Guess Wired was off the mark a bit.

</comment></comment></comment></comment><comment><USER32> I get annoyed with the business of Google on occasion -- I was very upset with the closure of Reader and IG, with choices they've made with Android; but I really appreciate the amount of unicorn ideas they push after.

</comment><comment><USER33> It's pretty funny that this hits HN the day after this did:

[http://www.foxbusiness.com/technology/2015/05/27/what- heck-h...](http://www.foxbusiness.com/technology/2015/05/27/what-heck- happened-to-google/)

> It's almost as if Page walked right into that corner office and flipped the > switch marked "Fiscal Responsibility" from the "on" to the "off" position. > At that point, Page abandoned Google's second core philosophy, "It's best to > do one thing really, really well," and started doing just about everything.

<comment><USER34> Since when has google followed that philosophy? I always thought they were the mad scientist of tech companies and that was more Apple's cup of tea.

<comment><USER35> Yea, the counterexample is pretty much all of their products. Gmail, Translate, pretty much every product was either acquired or created through internal experimentation afaik.

</comment></comment></comment><comment><USER36> Appears to be still cooking in the lab. Similar to Ara and also Glass. Sounds like a research project that needs not answer the business question of how to make money. IBM, Microsoft, Apple likes to keep theirs secretive. Google likes to showcase.

<comment><USER37> Advertising. Wearing a specific brand of clothing will impact what your Google search results contain.

Edit: To the downvoters: Why? Am I wrong? Are you Google employees?

<comment><USER38> I am an employee, but I down voted it because it's dumb.

</comment></comment></comment><comment><USER39> OK, but what exactly does this achieve? Bad to worse touch sensitivity on my sleeves? Why? I wish they could have come up with at least one genuine show- stopper application to get people excited about this tech. Reading through this thread the only semi-reasonable application is surreptitious counting of cards.. and even that is useless as cleanly pointed out by the most upvoted comment-on-comment by downandout.

<comment><USER40> I'm a little surprised at the negativity in this thread. They've announced flexible, soft touch interfaces which can be produced at scale using existing production methods. Isn't that at least really cool? Do you not think there are places this could be used?

I don't know if I can think of many "showstoppers" but is it really that hard to imagine places where a new input device could be used?

Soft, invisible, cheap (?) touch sensors that are flexible and easy to work with.

Things I'd use this for / would like to play around with:

1\. Touchpad on the side of my sofa, so I can use gestures to control TV and media. 2\. Touchpad on the side of my headboard in the same material as the rest with a subtle marking on which I can control / dim my lights. Similar things for controlling alarms. 3\. Improving children's toys that require buttons now but do so by having hard things surrounded by some padding. I imagine "tickle me elmo" that was able to say "you're tickling my feet!" would be popular. 4\. Would this detect my feet through socks? Run a bunch through my carpets, I'm sure I can do some fun stuff with home automation with that by knowing which room I'm currently in. Similarly for that, I'd like to track some of my habits, how long do I actually spend just sitting on the sofa or how often do I really get up from my desk and go somewhere else? 5\. Make some board games. Fabric + some metal pieces, all the complex logic could sit on your phone. 6\. Better sleep tracking? Do I curl into a ball, starfish, keep rolling about a lot?

Those are mostly just things I'd like to do at home. What about interfaces where you want to present something to other people? I've seen touchscreens at restaurants/bars, would a soft less delicate one work well?

To be honest, I think that you could make an absolute killing selling a t-shirt that had a touch sensitive star-trek looking badge that answers the phone. Not world changing, but I can definitely see that this could be used.

<comment><USER40> Ah damn, missed the edit window and forgot this wasn't markdown.

Formatting fix:

1\. Touchpad on the side of my sofa, so I can use gestures to control TV and media.

2\. Touchpad on the side of my headboard in the same material as the rest with a subtle marking on which I can control / dim my lights. Similar things for controlling alarms.

3\. Improving children's toys that require buttons now but do so by having hard things surrounded by some padding. I imagine "tickle me elmo" that was able to say "you're tickling my feet!" would be popular.

4\. Would this detect my feet through socks? Run a bunch through my carpets, I'm sure I can do some fun stuff with home automation with that by knowing which room I'm currently in. Similarly for that, I'd like to track some of my habits, how long do I actually spend just sitting on the sofa or how often do I really get up from my desk and go somewhere else?

5\. Make some board games. Fabric + some metal pieces, all the complex logic could sit on your phone.

6\. Better sleep tracking? Do I curl into a ball, starfish, keep rolling about a lot?

</comment></comment></comment><comment><USER41> I know the team at Knyttan ([http://www.knyttan.com](http://www.knyttan.com)) which has awesome tech to enable industrial-size looms to do knitting on- demand.

If Jacquard fabric was used on Knyttan-enabled looms, anyone (designers, anyone else) could effectively print/knit one-off pieces of connected clothing.

The future is awesome. :)

</comment><comment><USER42> Outside of a fashion week couture fashion tech concept house like Anrealage[1], what will this do for us? Project Jacquard strikes me as a solution to a problem, but I can't think of a single problem it solves. A smart watch tells time, streamlines notifications, and maybe keeps me in shape, but this? What will this do for me?

[1]: [http://www.kaltblut-magazine.com/anrealage- aw15-16/](http://www.kaltblut-magazine.com/anrealage-aw15-16/)

<comment><USER43> If your display is in your contact lens, how are you going to dismiss a notification or reject a phone call? Well maybe you just have to swipe the right way on your jacket sleeve like they did at the key note.

</comment></comment><comment><USER44> It's a neat idea, and one I think people won't be able to appreciate until the killer app hits, possibly in fitness or high-end suits. As far as I'm concerned, it's just neat research being backed by Google with no obvious ulterior motive, and that works fine for me.

<comment><USER45> Google's business is targeted advertising. Its competitive advantage is knowing more about you than other advertisers.

Obviously, embedding clothing sensors could collect and deliver tremendous amounts of information about a person and their habits. It's aligned with Google's interests in an obvious way, and it would be naive to think this is lost on the decision makers at Google.

That's not to say it's bad. Google's ATAP program is modeled on DARPA, which has funded many military-oriented research programs that have delivered advancements that extend beyond military applications. Yet all DARPA programs have some obvious or non-obvious military value. I imagine ATAP works the same way, funding ambitious projects that have high potential value for Google's primary business, but also have potential for broader impact.

<comment><USER46> That's bullshit and you know it.

Google is a large company with many businesses. How is Google Cloud Platform related to advertising? Nest? Liftware? Google Docs?

Fact is advertising is cyclical, and Google is aggressively diversifying away from it.

<comment><USER45> _> Google is a large company with many businesses._

Yes, many tiny, unprofitable "businesses" that contribute little to nothing to Google's bottom line, except through direct or indirect support of the advertising business that generates the vast majority of its revenue.

<comment><USER38> You have it exactly backwards. Google's Ads business throws off massive amounts of cash to spend on R&D diversifying away from Ads.

The Ads business is maxing out, you cant generate 20% revenue growth per year by continuing to have a 97% ads business model.

This "oh, but they're going to use it for ads" meme is pure lazy and sloppy thinking.

</comment></comment></comment></comment></comment><comment><USER47> I'm so amazed with the new wave of projects Google are working on. Definetively, the sensation I had about Apple as a innovation company has changed once I seen these new projects. This is innovation, this is a nice approach to future and not iphone and iwatch iterations.

<comment><USER48> This is more invention than innovation.

</comment></comment><comment><USER49> For people wondering about use cases, a friend of mine has been working in this area for a decade and is now starting to get traction in the fashion industry: [http://www.lara-grant.com/](http://www.lara-grant.com/)

</comment><comment><USER50> After reading about this, I realized that as always, battery tech might become somewhat of an issue for this application. However, nearly all of us have a cellphone that has a wireless charging mechanism; what if we were able to reverse that mechanism, so that something like a pant pocket was able to collect a small amount of energy from this process? Easier still, phones could be manufactured with small copper contacts on the back to do this the old- fashioned way. I realize that phone batteries are quite terrible in many cases, but this could change... or perhaps the process could be optimized to use such an irrelevant amount of energy required to keep the garment charged?

</comment><comment><USER51> I hadn't thought about conductive threads. What a neat idea. The applications could be really interesting here. I'm not sure what would be initially compelling but I'm interested in seeing what people come up with using this tech.

</comment><comment><USER52> Reminds me of the wearable computers in Vernor Vinge's novel Rainbow's End.

</comment><comment><USER53> I wonder if this could be used to log a person's activities?

If it was in their clothing and if movements of peoples' limbs -- brushing against the fabric -- generated data that could be used to determine what they're doing.

E.g. 80% chance they're currently sitting typing at the computer. Or at another moment, that they're probably washing some dishes. Or what particular task a factory worker is working on.

</comment><comment> TD-Linux The most obvious problem is that capacitive interfaces like this detect on both sides. Which means rejecting false touches from the clothing moving on your body is going to be very difficult - unless it's integrated into outerwear or something farther away.

<comment><USER54> Not at all. The fabric can be woven to specifically avoid this problem.

<comment> TD-Linux How? The most common method I've seen is to put a ground plane behind the sense wires, but that would require 2 layers of fabric.

<comment><USER55> Many garments above casual streetwear have multiple layers. Your typical blazer has several.

</comment></comment></comment></comment><comment><USER56> If there is one thing that is in for a softrapture with augmented reality, its fashion. The designers still will be there- but i can imagine a world were visuals and physical reality are completely disjunct.

</comment><comment><USER57> I imagine it would be great to sit through my commute, while typing something on my knees, with the touchscreen keyboard integrated into the fabric of my trousers.

</comment><comment><USER58> This would be great to integrate into the leg of my jeans so I can change my music while riding my motorcycle. I'll be following this project.

</comment><comment><USER59> It's interesting if you look at this from Google's perspective, as a data collection project.

<comment><USER60> Are you implying they want to do big data on how people touch themselves? or because, therefore, implication, ads?

<comment><USER59> I was thinking more about how people move, and how the motion capture data would be amazing for many purposes such as person identification, activity identification, learning what cultures/sports/injuries/ailments/etc. correlate with what styles of motion, learning "tells," as in poker, about how people are feeling... the list of applications of this data could go on for quite a while. It also could feed into research on some styles of robot locomotion.

</comment></comment></comment><comment><USER61> How will these fabrics be disposed of? Can they be recycled?

</comment><comment><USER62> Wait! What all did the Jackie Chan's Tuxedo do?

</comment><comment><USER63> Best application of this tissue : a head cover with electrodes to do electro encephalograms and read your thoughts. What a powerful source of info to target ads...

</comment><comment><USER64> ah fuck i got rugburn on my finger again.

</comment><comment><USER65> WHAT.

<comment><USER65> y the downvtoz? dis proadukt iz amayzni

</comment></comment><comment><USER66> Dear Google,

Please stop. I do not want you or your technology in my life.

Thanks!

</comment><comment><USER67> I'm having a hard time to understand if it's some kind of joke or a true project. Could someone explain what's it all about? It's also interesting that the parent path [https://www.google.com/atap](https://www.google.com/atap) redirects to project tango, [https://www.google.com/atap/project- tango/](https://www.google.com/atap/project-tango/)

<comment><USER68> Just watch the ATAP keynote on Google IO 2015 web site.

</comment></comment><comment><USER69> This is really cool, but at first glance one of their images really freaked me out: [https://www.google.com/atap/project- jacquard/static/img/maki...](https://www.google.com/atap/project- jacquard/static/img/making-clothes-intelligent-1.jpg)

Who's hand is that!

<comment><USER51> > Who's hand is that!

Someone's hand. It was someone's hand. Now it belongs to the fabric.</comment></comment>


Startup & Investors - <AUTHOR>

I am planning for a startup, I am almost completed my ground work which i have been doing for 2 years. It is all about finding a cheapest deal on internet. We have done complete research on this area.<p>I have following queries. 1) How to write startup funding? 2) If i am planning to with investor how much and when i should repay the money.
   EX: If investor is investing 20,000$ when i should repay the profit 3) Once after investing if the investor is not profitable. Should i need to repay the money or investor invested on his own risk. <comment><AUTHOR> Can some one reply for my query</comment>


Can Humans Help Trees Outrun Climate Change? - <AUTHOR> https://www.nytimes.com/2019/04/25/climate/trees-climate-change.html <comment><USER2> In Ontario (Canada), that's not gonna happen now that the provincial government has shamefully decided it isn't worth spending money on.

[https://www.ctvnews.ca/canada/ontario-cancels-program- that-a...](https://www.ctvnews.ca/canada/ontario-cancels-program-that-aimed- to-plant-50-million-trees-1.4394233)</comment>


Behold: The Water-Powered Jetpack - <AUTHOR> http://buzz.yahoo.com/buzzlog/94271 <comment><USER2> <http://www.youtube.com/watch?v=m4xb1NXvE_w> <\- this link shows of the jetpack including a demo of a 'shark-attack' maneuver, as well as gratuitous girls in bikinis.

<comment><USER3> Yeah, but I found it a bit disappointing that those girls actually don't fly the jetlev. Maybe it requires an enormous amount of muscle power?

</comment></comment><comment><USER4> It's a real-life version of FLUDD from Super Mario Sunshine!

</comment><comment><USER5> Last summer, I met the guy who does the R&D on these. Is that the coolest job ever, or what?

</comment><comment><USER6> Without taking anything from Raymond Li, who did something awesome, is this really a brand new thing, as the article seems to say? I think I remember seeing water-powered jetpacks on TV (Discovery, I think) years back. Does anyone remember any previous attempts on devices like that?

<comment><USER7> Well reddit had a link to this same jetpack 2 years back. I think the news part is that it's about to launch commercially so you can actually buy one.

</comment></comment><comment><USER8> The hose seems to act as a kite's tail, providing stability.

It is cool, but I wonder if the 'tail' reduces the feeling of free flight. It certainly tethers you, restricting your range. Could this be useful for work on oil spills? Marine biology? Coast guard?

</comment><comment><USER9> Any one else notice the motor/pump trailer spewing white smoke? I assume it's a souped-up reorganized pwc, with a 2-stroke engine?

Clever hack, though.

<comment><USER10> Yep, it looks like it's on some kind of buoy and you just sort of lug it around. It looks very fun. Although, I don't know why an engine, a hose and a nozzle cost 136k. I guess R&D, so I expect the price to drop to $500 eventually?

<comment><USER11> I'm sure the price will drop if they catch on but, assuming it's basically a hacked jet-ski with a hose & harness attached to it, they still won't be cheap. A jet ski can set you back anywhere from $10k - $50k around here, so it's still a luxury item for most.

<comment><USER10> Ah. The engine is from a jet ski, you mean? You might not be able to buy one for cheap, but you will be able to rent one for $20, so it's still good.

</comment></comment></comment></comment><comment><USER12> Looks like a fun toy, but not a practical mode of transportation. Might as well just use a jet ski.

<comment><USER13> So long as it's marketed as a fun toy and not a practical transport there's nothing wrong with that.

Recreation is full of inefficent ways of doing things just because they are fun.

</comment></comment><comment><USER14> I wonder how much noise it makes.

</comment><comment><USER15> I want that REALLY HARD!</comment>


Ask HN: What are good projects to understand CUDA and GPU Programming? - <AUTHOR> I have taken an Introduction to GPU Programming Course in my college and I want to do a project which covers all the details that I have learned. Something in the image processing field would be nice. <comment><USER2> I wrote a CUDA/GPU based 2D electromagnetic simulation a while ago. The code is open-source and (hopefully) not too complicated:

[https://github.com/adewes/fdtd-ml](https://github.com/adewes/fdtd-ml)

Here's an example video of what the results look like (it shows how EM waves are reflected by a parabolic mirror):

[https://www.youtube.com/watch?v=ZPSzAaxkg5c](https://www.youtube.com/watch?v=ZPSzAaxkg5c)

I used mostly the PyCUDA documentation and examples as well as the official CUDA documentation ([https://docs.nvidia.com/cuda/](https://docs.nvidia.com/cuda/)) to learn. I think what's most important is to first understand what blocks, grids and threads are and how they work (see e.g. here: [https://docs.nvidia.com/cuda/cuda-c-programming- guide/index....](https://docs.nvidia.com/cuda/cuda-c-programming- guide/index.html)). With that knowledge you can start thinking about how you can structure your problem to solve it efficiently on the GPU. For the simulation, I have basically two 2D blocks of memory for each variable of interest (e.g. electric and magnetic fields in X,Y direction, current density, material properties) that I transfer the to the GPU. There, I use the discretized differential equation for the electromagnetic field to update the field values using the values from the first buffer (and the material properties + currents). I store the result in the second buffer. I then swap the buffer references (without copying any memory) for the next step of the simulation. I perform this step e.g. n times and then transfer some of the buffers back to the main memory to e.g. plot them. That's mostly it! Of course there are many intricacies and ways to optimize code, but getting a basic program running inside your GPU isn't that hard actually.

BTW, here's some really cool research work by Microsoft on GPU-based FDTD (finite difference time domain) simulations of wind instruments in two dimensions:

[https://www.youtube.com/watch?v=7Kf- rlUZAaU](https://www.youtube.com/watch?v=7Kf-rlUZAaU)

<comment><USER3> [https://wiki.tiker.net/PyCuda/Examples](https://wiki.tiker.net/PyCuda/Examples) I agree about the PyCUDA examples

</comment></comment><comment><USER4> Since you mentioned image processing in particular, I'd recommend looking into Halide instead of (or as well as) CUDA. Few reasons:

1\. It allows for easy experimentation with the order in which work is done (which turns out to be a major factor in performance) —- IMO, this is one of the trickier parts of programming (GPU or not), so tools to accelerate experimentation accelerate learning also.

2\. It allows you to write your algorithm once and emit code to run on OpenGL, OpenCL, CUDA, Metal, various SIMD flavors, and a bunch more exotic targets. CUDA effectively limits you to desktop/laptop computers, and at this point I'd rather bet on needing a mobile version at some point than not.

3\. It eliminates a ton of boilerplate code, so you can get started quickly.

4\. It's what the pros use. Much of Adobe's image processing code is in Halide now, for instance (source: pretty much any presentation extolling the virtues of Halide). The Halide authors cite a particular algorithm — the Local Laplacian Filter - where an intern, in one afternoon, beat out a hand optimized C++ implementation that had taken months to develop with a Halide implementation. I don't know if the specifics of that have been exaggerated, but directionally I believe it. It was pretty transformational in the codepath I used it for.

I feel like developing an intuition for the "shape" of algorithms that will perform well before diving into the specifics of low-level tools like CUDA will serve you well.

[http://halide-lang.org/](http://halide-lang.org/)

<comment><USER5> Would halide be a good option for writing a pathtracing engine?

</comment></comment><comment><USER6> You should escalate in difficulty levels. GPU Programming is infinite and will always take more of your time than you plan. With escalation you could get positive feedback fast. 2D image filtering is extremely complex for a beginner.

Start drawing a graph of thousands of numbers with the CPU. Easy enough, but harder than it looks.

Accelerate the graph with the GPU so it has smooth animation, moving, zooming... Easy enough but way harder that it looks.

Take a sound sample, uncompress it and visualize in your graph system. Easy?

Take the sample and filter it with CUDA. Way easier filtering a 1D sample than 2D samples.

Play the filtered sound to "feel it".

Then you can filter 2D images if you want.

I recommend the graphic interface Dear Imgui: [https://github.com/ocornut/imgui](https://github.com/ocornut/imgui) [https://github.com/ocornut/imgui/issues/1902](https://github.com/ocornut/imgui/issues/1902)

Way faster development time than any other (states)interface with the disadvantage that it continuously draws in the screen consuming energy. Well worth it for rapid prototyping.

</comment><comment><USER7> An image blur is a good place to start! Read horizontally from many pixels in parallel, sum them up as parallel as you can, normalize, write back. Repeat for vertical blur - and here it might be best to rotate the image by a quarter of a turn so vertical is horizontal!, because memory access is usually faster that way.

<comment> Const-me Did it couple of times.

One trick is write output pixels transposed. This way both passes will be identical, and they both read image linearly. Two transposes cancel each other.

Another one is use local memory.

Finally, the right place for the kernel values is compiled into the code, in immediate values. Everything else is slower.

</comment></comment><comment><USER8> Learning to write raymarchers on shadertoy.com! It's a wonderful platform for gpu programming because you'll spend 100% of your time writing gpu code and 0% on installation, drivers, and build systems.

<comment><USER9> Do you have any resources for the same? I learnt the basics from the Book of Shaders and other tutorials but can't seem to find find any advanced lessons.

<comment><USER10> Íñigo Quílez's (Shadertoy's creator) articles should be a start point.

[http://iquilezles.org/www/index.htm](http://iquilezles.org/www/index.htm)

He's got a YouTube channel with step by step explanations too.

</comment></comment></comment><comment><USER11> Try to write Floyd-Steinberg dithering on the GPU. ;)

I've learned a lot by trying to port branchy code & recursive algorithms to the GPU, then trying to figure out why the performance is terrible and how to fix it. Specifically, I learned a bunch trying to write custom primitive intersection shaders for OptiX ([https://developer.nvidia.com/optix](https://developer.nvidia.com/optix)).

I like ShaderToy as well, but since it's so easy and hides the abstractions from you, you have to really look around for the amazing tricks other people there have used. Also write code that slows down your GPU and then improve it. Just getting pretty things to render and/or writing shaders that start out at 60fps won't help you learn as fast.

<comment><USER12> Yeah, an algorithm that makes every pixel dependent on the previous one is pretty much the worst-case for GPU computation :)

</comment></comment><comment><USER10> Conway's Game of Life.

Easily paralellizable, visually attractive, fun to code and use, has a narrow scope but can be improved with goodies (e.g. color for cell age). If you implement realtime interactivity, it forces you to bridge the gap between GPU and CPU world, which is a skill on its own.

<comment><USER13> There is caching CPU implementation that is _very_ fast and it is not trivial to implement on GPU [https://en.wikipedia.org/wiki/Hashlife](https://en.wikipedia.org/wiki/Hashlife)

Naive implementation should be good problem for start.

</comment></comment><comment><USER14> Super-million particle engine. Draw more than a million squares to the screen and move them according to some logic.

I've implemented one on almost every hardware I've touched (including the browser).

It looks amazing, relatively easy to do but has some great bits of learning along the way.

Good luck.

</comment><comment><USER15> Lots of great suggestions here. The real prize may be something like getting real-time gpu-accelerated image and video filters on mobile devices. As an alternative to OpenCL / CUDA you can try Vulkan GLSL compute shaders targeting an Android GPU. See NDK docs.

Another possibility arises with active development from the JuliaLang GPU team. As far as I know there is no GPU-accelerated image processing library for the language yet, but all the popular image format encoders exist.

Intro to JuliaGPU Ecosystem

[https://www.youtube.com/watch?v=6ntJ_al4oXA](https://www.youtube.com/watch?v=6ntJ_al4oXA)

Best of luck ;)

</comment><comment><USER16> I learned a little OpenCL a few years ago just because I wanted to see how GPUs were programmed. I tried several books:

\- Heterogeneous Computing with OpenCL ([http://www.hds.bme.hu/~fhegedus/C++/Heterogeneous_computing_...](http://www.hds.bme.hu/~fhegedus/C++/Heterogeneous_computing_OpenCL.pdf)) - informative but not many examples

\- The Art of Multiprocessor Programming ([https://www.amazon.com/Art- Multiprocessor-Programming-Revise...](https://www.amazon.com/Art- Multiprocessor-Programming-Revised-Reprint/dp/0123973376)) - I had a hard time getting traction with this book.

\- OpenCL Parallel Programming Development Cookbook ([https://www.amazon.com/dp/B00ESX1AH2/ref=dp-kindle- redirect?...](https://www.amazon.com/dp/B00ESX1AH2/ref=dp-kindle- redirect?_encoding=UTF8&btkr=1)) - Not a great reference but it had some easy to follow examples.

\- Actually a few other books you might find when searching for parallel processing or parallel algorithms which just turn out to be entirely abstract math books.

People would ask my why I wanted to learn to program on a GPU and I didn't have an answer. Surely I would find an answer in one of those books. I saved a few of the projects:

\- Edge detection ([https://mega.nz/#!LJUwmLSa!dRijnB1xVhI9RAC1Xac_xRhT2IsfDG2sJ...](https://mega.nz/#!LJUwmLSa!dRijnB1xVhI9RAC1Xac_xRhT2IsfDG2sJLT3nD4Q1Pc)) - fun!

\- GPU template ([https://mega.nz/#!yAsxATzb!Y4-9zRMCTSYHX1pKxWPQPl8WNDgnWkSAU...](https://mega.nz/#!yAsxATzb!Y4-9zRMCTSYHX1pKxWPQPl8WNDgnWkSAUIbIFqfwekQ)) - write GPU code with JavaScript

I have another one for bitonic sort somewhere (a parallel sort that sadly isn't even as good as quick sort).

The projects I enjoyed most were image filters (like edge detection). You could do a project that implements various image filters. If you did that you would not only get experience writing CUDA but you would learn how a lot of different filters are done.

<comment><USER17> I've been delving into OpenCL to parallelize some algorithmic trading stuff I have been doing. One thing I did a few days ago was to thread the way I load data into a MySQL Server. What took over an hour normally is down to under 10 mins.

I'd be interested in knowing is what GPU's you were/are using. I'm using a Sonnet eGFX Breakaway Box 550 (with Radeon RX Vega 56 Card).

<comment><USER16> Oh, you mean the bottleneck was on some processing you were doing before sending it to the database? That's cool.

It was mostly on a low-end laptop with integrated graphics lol. I was more interested in learning how parallel algorithms work than anything. Now I feel like an idiot.

<comment><USER17> Nah don't feel that way! We all have different goals or reasons for doing things. I had a specific reason to learn. You had one too. They were just different.

Yup my bottleneck was before hitting the database server so I used the GPU to take care of it.

</comment></comment></comment></comment><comment><USER18> Solvers for linear and differential equations are very interesting. Look at geometric multigrid or asymmetric grid solvers.

Graph processing, sorting and histograms can also be very interesting.

Ray Tracing is also a classic application.

</comment><comment><USER19> You can create a program that calculates the histogram of an image or write a sobel filter for an image. Sobel is fairly simple as it's just matrix multiplication. Get familiar with how to manage memory between the CPU and GPU first and the different types of memories you have available on a GPU

</comment><comment><USER20> Abstract answer: Find FPGA class notes and lab notes online

Very specific answer: I always wanted to do the FPGA lab where you simulate the vibrating parts of a percussion instrument like a drum head live in real time with a push button to hit the drum and an audio out. I suppose a CUDA GPU version would output a .wav file. I suppose if you can get Game Of Life working this is a logical next step where you're simulating a 2-D structure under load rather than an abstract 2-D automaton. I wonder what a drum head looks like as a topo-map slowed down by a factor of 10K or so, probably interesting looking with nodes and reflections all over.

</comment><comment><USER21> You may want to look into Cupy. It is replicating the Numpy API on GPUs. It is not too complicated but fun to add missing functions. Picking easier parts first guides you closer and closer to becoming fluent in GPU programming.

</comment><comment><USER22> My experience: just make sure you're already confident implementing it on a CPU first. GPU coding is hard enough without _actual_ difficulty.

If you want to cover "all the details that [you] have learned", it'll help to state what you learned. Also, what exercises you've done already - what level are you at?

1\. a shadertoy (web, desktop or app) for GPU programming, with comveniences for image processing. That deals with all the BS boilerplate you learnt, from a general point of view, and will be useful.

2\. Fluid simulation (but, there's a _lot_ of non-GPU maths to understand).

</comment><comment><USER23> I just started working through "Professional CUDA C Programming": Ty McKercher , Max Grossman , John Cheng, and am finding it very interesting. It's from 2014, so I'd think there'd be something newer, but it's the best thing I could find on Safari Books. There's a lot of newer stuff that focuses on specific topics (like AI), but it's the best thing I could find that was general purpose.

</comment><comment><USER24> WebGL is surprisingly easy once you have some boiler-plate code to load the textures and shaders, and has the advantage that you can shove the result on a web site to show others.

Here is a very simple project I did last year:

[https://sheep.horse/2017/9/crossfading_photos_with_webgl_- _b...](https://sheep.horse/2017/9/crossfading_photos_with_webgl_- _boston_bridge_proj.html)

</comment><comment><USER25> An unconventional suggestion: If you are fluent in C & C++, the Tensorow codebase is decent. The kernels are implemented in both CPU & CUDA, so you can have a side-by-side comparison in code and performance without writing the boilerplate. You can fork your own branch to implement your own extensions and play around. Tensorflow isn't only for deep learning.

</comment><comment><USER26> Cuda sha256

[https://github.com/Sean-Bradley/CUDALookupSHA256](https://github.com/Sean- Bradley/CUDALookupSHA256)

Cuda ripemd160

[https://github.com/Sean-Bradley/CUDALookupRipeMD60](https://github.com/Sean- Bradley/CUDALookupRipeMD60)

</comment><comment><USER27> don't waste your time on cuda. Wait until an open artitecture replaces this proprietary clusterf*ck

<comment><USER28> I disagree partly. Cuda is defacto in DL at the moment, and is very well designed. It has academic roots and the neat ideas shine out.

Why did I say partly? So many optimization layers exist already (e.g. BLAS/cuBLAS). One may not really need to get down to the CUDA level.

<comment><USER29> What if anything does Cuda do better/differently than OpenCL?

<comment><USER30> CUDA itself does only one thing better - it lets you write kernels in C++ rather than a fairly restrictive subset of C. Far more importantly, it has a large ecosystem of tooling (including excellent profiling tools), libraries, documentation and open source projects out there. Comparatively speaking, OpenCL is a barren landscape.

<comment><USER31> SYCL layer/standard adds "C++ Single-source Heterogeneous Programming" for OpenCL: [https://www.khronos.org/sycl/](https://www.khronos.org/sycl/)

<comment><USER30> That it does and there's also plenty of convenience wrappers of various kinds for different languages. Unfortunately, none of that can address the ecosystem issue, which is the one that really matters.</comment></comment></comment></comment></comment></comment>