After the tour-de-force of Serverlessconf in October, I decided my entire company would be going serverless. I spent the first couple of months beating my head against the wall trying to migrate a Python Flask app to Lambda — these efforts helped me find a better way.
Six months later, we are now deploying our fourth major project serverlessly. This is how we did it — including the lessons learned (and strong opinions) formed along the way.
Lesson #1 — Ditch Python
Flask is a nice little framework for the old-time request-response style of a website with a session managed by the server. That’s quaint — but in the new world of the interactive web, it’s like trying to build a house with a rubber band and a squeegee.
The old way: Python Flask app runs on Elastic Beanstalk, storing data in RDS
As you start to move more work to the client-side to support interactions, you’ll have no choice but to use JavaScript. This usually leads to inlining into your Python templates while the Demons of Technical Debt open another line of credit for you.
Increasingly, Flask solutions become a kluge of different languages. I concluded fairly quickly that this approach was a horrific mess — and I wasn’t sure why I was using Python anymore.
After switching over to Node, everything was much more maintainable and logical, and there was no need to use more than one language. With a simple Node/Express configuration on Webpack, you can also use ES6 to eliminate the terrible JavaScript constructs poked fun at by Python developers.
Trying the same thing in Zappa/Flask was worse than doing my taxes. But in about 5 minutes, you can build a fully-fledged Node/Express app that works on Lambda like it’s the 1040EZ — it’s no big deal. So we ditched Python and joined the cool kids in the JavaScript camp.
Lambda Function As Monolith
What did we give up? Pythonistas will wax lyrically about all the cool language features, but these are mere toys compared with the practical async charms of JavaScript. And now we no longer worry about Python version 2 or 3 (is it ever upgrading?). At least for our projects, it was a very easy switch.
It took us a surprising amount of time to realize an obvious benefit of serverless — possibly because we’ve been building web apps forever, or maybe it’s just that I’m getting old.
Some of our first web apps still had a Node Express layer that remembered session state either (1) by accident hoping the user hit the same Lambda container over and over, or (2) by tragedy of design where we abused DynamoDB to make it remember session IDs. What the hell were we doing?
In phase one of “The Transition”, our middle layer acted like a web server on Lambda, which is both wrong and terrible. Then we ended up with html pages filled with JavaScript calling REST APIs. This approach was thrillingly raw, desperately unmaintainable, and quickly became brittle — but we’d killed the middle layer. In serverless, the middle layer has to go.
State moves to the client, logic moves to Lambda
Lesson #3 — Enjoy the Vue
It’s great being able to jam everything into the front-end, but it’s quickly an appalling mess. You eventually stop checking in code because you’re too embarrassed to share the Rube Goldberg machine magic you’ve been building. And ‘not checking in code’ is not a good job objective for developers.
Entering the world of Single Page Applications (SPAs) exposed me to React — the most popular approach to building user interfaces. React is great but comes with a steep learning curve, lots of Webpack/Babel set up, and the introduction of JSX. While it might be something we eventually use, it was too heavyweight for our immediate needs so explore the alternatives.
Fortunately, I soon discovered Vue.js and my serverless life turn to absolute bliss. Here’s the thing: You can learn Vue in a day!
Vue’s approach to design fits nicely with our design model — everything is a component that manages its own content, design and code. This makes it very easy to manage our multiple client-projects and dispersed teams, and also work very well for a serverless mindset.
The open-source JavaScript framework gives you powerful debugging tools, great organization, and a Webpack build out of the box that will save hours. Slap on the router and store management plugins — and you can churn out realtime sexy apps like you’re a Facebook engineer. Who knew Single Page Apps could be so easy?
From a serverless perspective, Vue compiles all your goodness into an index.html and bundle.js files, primed for uploading to S3. Typing npm run build is the new compile command.
Take a moment to consider this — in the old world, we would be deploying apps via Elastic Beanstalk and monitoring for utilization, autoscaling when needed, and managing a reasonable chunk of infrastructure.
The true magic of SPAs is when you “deploy” an application, you’re simply copying index.html, bundle.js, and a handful of file dependencies to an S3 bucket front-ended by a CloudFront distribution. This gives you rock-steady distribution and loading behavior, and also enables multi-version management and any deployment methodology you prefer — just by managing text files.
We have effectively unlimited scale and only pay for what we use — there is zero app infrastructure management.
Vue essentially allows you to build a desktop application within the browser — which means you can dramatically improve the user experience. All the state can be managed here without endless request/response, you can hide latency with standard UI tricks like transition effects, and the whole application now behaves properly.
Lesson #4 — Learn to love DynamoDB
In many respects, the hardest part of getting to serverless has been truly coming to grips with DynamoDB. You definitely make a few mistakes in the first few iterations, and its tempting to ditch the whole thing and go back to RDS where everything is known and comfortable.
SQL has been my crutch for a long time, and I’ll confess to putting way too much business logic into databases. But RDMS systems are just another monolith — failing to scale well and they don’t support the idea of organically evolving agile systems.
DynamoDB is a completely different animal. When you get it right, the NoSQL database provides blistering performance, massive scale, and practically no administrative overhead. But you really have to invest the time in exploring how it works — and the initial phases are full of gotchas aplenty.
Dynamo table fields can’t contain empty strings. The point in time backup isn’t automatic. If you get the partition and sort keys wrong, you have to start from scratch with your tables. You can go from having too few tables to way too many if you try to emulate SQL queries too closely. And all the while it just feels very alien coming from RDS.
After many tutorials, trying, failing and eventually succeeding with DynamoDB, I learned …
You need to understand the way DynamoDB works, spend some time to understand indexing strategies, and how you intend to query the data. It’s very easy to jump into it without knowing all you need to know, so many people get burned and then move back to RDMS at exactly the wrong moment. Make mistakes and push through them.
One of the least-discussed joys of DynamoDB is the way you can attach code to table events using streams — like an SQL trigger that can do anything. These are extremely powerful. A very simple pattern we use is to always push table updates to an SNS topic where the changes can be ingested by other serverless code you might not have written yet.
Don’t forget that DynamoDB can feed other storage systems (RDMS, Redshift or just flat text files) and can be used to effectively smooth out the traffic spikes or protect another database from huge volumes of data. DynamoDB has a TTL feature which allows you to expire rows — which is great for staging data you want to push somewhere else.
Lesson #5 — Serverless Framework FTW
My early experimentation with Lambda was a clunky affair of coding directly into the AWS console and getting frustrated that it took a lot of work and error messages to do some trivial things. The bridge that connects your IDE to a production environment is missing.
Well, its’ missing until you discover serverless framework which is honestly the most exciting thing I’ve found in ages.
A simple sls deploy wields enormous power, bundling up your precious code and shipping it directly to Amazon’s brain in the sky. And if you need to check logs because your code is misbehaving just type sls logs -f functionname -t and you can tail your CloudWatch logs like a pro without ever opening a browser.
This. Changes. Everything. The serverless people should be showered with accolades for doing something that every cloud provider should have offered from day one. Simply brilliant. And so much win.
Lesson #6 — Authorization is the new sheriff in town
In traditional apps, you authenticate a user once and then track this person by following around a session ID. We like it because you only need to do the hard work once, and then the ID lets you cheat for the lifetime of the user’s login for however long you want that to be.
In the old world, the session ID controls access
But this approach has problems. It only works if you have that server in the middle — and we we just burned that server to the ground. It also potentially exposes you to some nasty attacks — like Cross-Site Request Forgeries (CSRF) — and doesn’t let you pass around identity to other services very easily. So this approach basically Supports The Monolith (boooo!).
We hate the Monolith and CSRF attacks — but we do like our new friend, the JWT token. I had a moment of zen-like euphoria when I learned how this works but I need a diagram to do it justice.
Step 1, get a JWT, step 2, use it to communicate with any service you write:
The first step looks familiar: the authorization process gets a JWT tokenThe second step is magic: any lambda function can accept and validate the token
The basic nut is that every single request is authenticated, and the client can even talk to multiple serverless activities. It’s wickedly secure, it’s anti-monolith and CSRF doesn’t even exist in JWT-land. All that’s required from your serverless code is use a Custom Authorizer to check if the JWT in the header is valid (using boilerplate code) and we are done.
JWT makes all other types of auth look overcomplicated. We switched everything to Auth0 (and Cognito in some cases) and never looked back. Serverless auth is both beguilingly simple and insanely effective, so yeah, go team.
It’s a brave new world
While I’ve worked with AWS for a long time, I’ve never been this close to the ground floor. Even in EC2 land, there was plenty of help because I was comparatively late to the party. After leaving A Cloud Guru’s serverless conference, this felt like genuinely unexplored territory and there was significantly more discovery in the dark.
In our first few experiments, we had some misfires trying to use existing tools and techniques — and the results weren’t great. After a few months getting the right stack in place, we have officially started delivering projects in a 100% serverless way. I’m confident that our migration hiccups and early exploring were well worth the journey.
We are building slick, real-time SPA apps that use exclusively serverless infrastructure, scale effortlessly and cost 70–90% less. I’m both delighted and shocked by the payoff. I’ve never been more convinced that serverless tech is going to revolutionize application delivery in the cloud.
With jobs that have been so tied to secure software design and government compliance, I constantly fall back on the assumption “if it’s insecure, you’ll eventually be hacked”. But what does being hacked actually look like? If I set up a server and don’t make myself an obviously vulnerable target (i.e. not going to show up in common shodan.io searches) what would actually happen?
Queue the honeypot concept. A “honeypot” is an intentionally vulnerable “thing” that can be used to study malicious traffic and activity on a network. This “thing” can be anything, a single port on a server, an HTML element on a webpage, or even a network with multiple servers. Once it’s set up, any malicious traffic towards the server can be studied and turned into actionable intel.
So I went searching for honeypot software that I could run myself. I ended up using Cowrie, a Python based SSH/Telnet emulator that is based on the prior work of the Kippo project. I was attracted to it for a few reasons: it had a lot of support articles, it was written in Python, and the Cowrie worked with Kippo’s lightweight visualization software Kippo-Graph. With Kippo-Graph I could keep an eye on things from my phone without having to SSH into the server.
So, I fired up the honeypot software and set the SSH emulator on port 22 to allow the usernames root and admin with the passwords changeme and 1234567, respectively. I sat back and watched and…
Access Attempts on the Honeypot
People tried to guess my SSH password a lot. Anywhere from 200 to just over 1200 times per day. The tries mostly came from:
And with the passwords set at what I thought were very insecure (remember, passwords were just changeme and 1234567) only 4 attempts were successful. I was hacked by:
Feb 11th: An IP in Hefei, Anhui, China that tried 42 times before guessing user root and password changeme. After the success, it stopped and I was immediately compromised by an IP in Seoul (I assume the same actor changing IP’s). The IP attempted to run the Linux command “uname -srmo” and the command worked, but the emulated honeypot command didn’t handle the “-srmo” options and the actor disconnected.
Feb 20th: An IP in Haarlem North Holland, Netherlands that tried 15 times with user root and password changeme. It mimicked the same behavior as the last actor.
Feb 24th: A Tor node using user root and password changeme. It only tried once and then immediately disconnected without running a command. Since it guessed the username/password combination on the first try I assume it was one of the prior actors checking back in on its access.
All of this was honestly pretty anti-climactic and boring. My job is to tell people if they do insecure things they’ll be hacked! And yet here I was, using bad username/password combinations and barely getting compromised. So, I decided to turn it up.
I looked at the graphic that Kippo-Graph provides of the username-password combinations.
I was still a little weary about the consequences of a lot of action in my honeypot, so I avoided all of these default IoT credential-looking passwords and chose two new combinations to add. The first was admin/admin1 (I saw a few attempts on these) and the second was one I thought was very interesting, pi/raspberryraspberry993311.
Pi is the default user for the popular Raspbian distro that is used widely with the Raspberry Pi systems. However, the default password is raspberry not raspberryraspberry993311. A quick Google search of the password brought up a lot of raw honeypot data but no explanation! So, I decided to accept it and see what the deal was.
And right away I was hacked by the French! Well, someone coming from a French IP. And it curiously used that raspberryraspberry993311 password. The threat actor immediately uploaded a bash script and attempted to run it. The bash script was a worm that configured the server to:
Periodically report back to a Undernet IRC Channel for command and control
Change the password to raspberryraspberry993311 (so that’s why we were seeing these attempts!)
Start scanning public IP space to attempt to spread the worm further. When it was doing this scanning, it would try both pi/raspberry and pi/raspberryraspberry993311 presumably as a way to spread updates if command and control went down.
This Raspberry Pi Botnet malware did quite quite a few other things and I plan to get around to an entire post dedicated to dissecting that.
After the French, I was hacked by an IP in Switzerland that switched to an IP in Ireland after it found successful credentials. The threat actor attempted to load malware onto the machine that used the phrase “gweerwe323f” throughout. The malware mostly contained shellcode, and I haven’t had the time to really pick that apart either. But based on further compromises, this was definitely another botnet running through scripted actions.
Finally I wanted to see what would happen if I just set the credentials to accept username admin and password admin. Over the next day I just kept getting hacked by the same gweerwe323f botnet over and over.
At this point the fun had started to dwindle so I killed the honeypot. For those interested, here are the top 10 passwords attempted:
And here are the top 10 username/password combinations that were attempted on my honeypot:
They all felt extremely Internet of Things oriented at first glance. It absolutely shocked me that it is worth the time of these drive-by attacks to try combinations like root/password, root/root, or root/admin. Apparently they have enough successes using those incredibly insecure combinations that it is worth their time.
I also did a quick analysis of my Apache access log to see what was attempted on my password protected web-server. Since the web-server wasn’t vulnerable there was not much malicious activity to dissect, but I did see a lot of requests to access the path /manager/html that would exist by default for an ApacheTomcat installation. Otherwise, it was just the classic attempts to find phpMyAdmin.
I wouldn’t feel like this post is complete without suggesting the open source software Fail2Ban. For those of you who got to the bottom of this and was wondered “well, why don’t I just block those IPs”, you are absolutely correct. Software like Fail2Ban can monitor your log files for malicious activity like this and block future attempts from those IPs. There’s also plenty more you could do with this data or a honeypot. Put a honeypot internally on your company network and watch for malicious activity such as network scanning. Put it in your company’s Public IP space and see if there’s any targeted attacks unique to your company or industry.
Maybe in the future I’ll revisit the data and search for more interesting patterns like what lead me to the Raspberry Pi botnet. For now, my honeypot is turned off and I’d call it a successful experiment.
Hacker Newshttps://news.ycombinator.com/Links for the intellectually curious, ranked by readers.Our Approach to Employee Security Traininghttps://www.pagerduty.com/blog/security-training-at-pagerduty/Sat, 5 May 2018 15:21:41 +0000https://news.ycombinator.com/item?id=17002168Comments]]>The United States of Japanhttps://www.newyorker.com/culture/culture-desk/the-united-states-of-japanSat, 5 May 2018 00:03:37 +0000https://news.ycombinator.com/item?id=16999407Comments]]>Troubled Times for Alternatives to Einstein™s Theory of Gravityhttps://www.quantamagazine.org/troubled-times-for-alternatives-to-einsteins-theory-of-gravity-20180430/Sat, 5 May 2018 08:14:34 +0000https://news.ycombinator.com/item?id=17000903Comments]]>CPY “ Code C/C++ with no redundancyhttps://github.com/vrsperanza/CPYSat, 5 May 2018 14:08:15 +0000https://news.ycombinator.com/item?id=17001853Comments]]>Establishing identity without certification authorities. (1996)http://citeseerx.ist.psu.edu/viewdoc/summary?doi.1.1.31.7263Sat, 5 May 2018 18:43:02 +0000https://news.ycombinator.com/item?id=17003143Comments]]>Particle physicists turn to AI to cope with CERN™s collision delugehttps://www.nature.com/articles/d41586-018-05084-2Sat, 5 May 2018 08:42:22 +0000https://news.ycombinator.com/item?id=17000950Comments]]>Google, please fix Android's slow, bloated share UIhttps://www.androidpolice.com/2018/05/05/google-please-fix-androids-slow-bloated-share-ui/Sat, 5 May 2018 18:00:05 +0000https://news.ycombinator.com/item?id=17002885Comments]]>Prevalence of vitamin D deficiency in adults admitted to psychiatric hospitalhttps://www.cambridge.org/core/journals/bjpsych-bulletin/article/prevalence-of-vitamin-d-deficiency-in-adult-patients-admitted-to-a-psychiatric-hospital/5BE0942DB69C2F9BAB7083C08D2319C8#Sat, 5 May 2018 13:18:50 +0000https://news.ycombinator.com/item?id=17001681Comments]]>In ˜Elastic,™ a Physicist Argues That the Mind Needs Time to Playhttps://undark.org/article/book-review-mlodinow-elastic/Sat, 5 May 2018 16:02:07 +0000https://news.ycombinator.com/item?id=17002369Comments]]>Is Prefix of String in Table?http://trent.me/is-prefix-of-string-in-table/Sat, 5 May 2018 18:07:21 +0000https://news.ycombinator.com/item?id=17002927Comments]]>Are interruptions worse for programmers than for other knowledge workers?https://dev.to/_bigblind/are-interruptions-really-worse-for-programmers-than-for-other-knowledge-workers-2ij9Sat, 5 May 2018 14:06:07 +0000https://news.ycombinator.com/item?id=17001842Comments]]>Comprehending Ringads (2016) [pdf]http://www.cs.ox.ac.uk/jeremy.gibbons/publications/ringads.pdfSat, 5 May 2018 12:15:11 +0000https://news.ycombinator.com/item?id=17001478Comments]]>NSA collected 500M U.S. call records in 2017, a sharp rise: official reporthttps://www.reuters.com/article/us-usa-cyber-surveillance/spy-agency-nsa-collected-500-million-u-s-call-records-in-2017-a-sharp-rise-official-report-idUSKBN1I52FRFri, 4 May 2018 20:24:01 +0000https://news.ycombinator.com/item?id=16997962Comments]]>Show HN: Arraymancer v0.4, Nim tensor library now with OpenCL and Keras-like APIhttps://github.com/mratsim/ArraymancerSat, 5 May 2018 17:30:28 +0000https://news.ycombinator.com/item?id=17002759Comments]]>Yale physicists find signs of a time crystalhttps://news.yale.edu/2018/05/02/yale-physicists-find-signs-time-crystalThu, 3 May 2018 22:14:33 +0000https://news.ycombinator.com/item?id=16990495Comments]]>GNU Mcronhttps://www.gnu.org/software/mcron/Sat, 5 May 2018 15:05:46 +0000https://news.ycombinator.com/item?id=17002098Comments]]>NiftyNethttp://www.niftynet.io/Sat, 5 May 2018 17:14:35 +0000https://news.ycombinator.com/item?id=17002677Comments]]>Show HN: ~200 byte in-browser, no js, private notepadhttps://jjjjjjjjjjjjjjjjjjjj.github.io/new-note/Sat, 5 May 2018 17:08:23 +0000https://news.ycombinator.com/item?id=17002648Comments]]>Alan Turing™s chemistry hypothesis turned into a desalination filterhttps://arstechnica.com/science/2018/05/alan-turings-contribution-to-chemistry-used-to-filter-salt-water/#p3Sat, 5 May 2018 12:42:19 +0000https://news.ycombinator.com/item?id=17001568Comments]]>OpenFL 8.0.0 Releasedhttps://github.com/openfl/openfl/blob/develop/CHANGELOG.md#800-03042018Sat, 5 May 2018 12:30:21 +0000https://news.ycombinator.com/item?id=17001527Comments]]>You don™t actually need a co-founder (2016)https://techcrunch.com/2016/08/26/co-founders-optional/Sat, 5 May 2018 06:00:58 +0000https://news.ycombinator.com/item?id=17000574Comments]]>Debtors in China Shamed on Highway Billboard Featuring Their Faces and Nameshttp://www.scmp.com/news/china/society/article/2144690/chinese-debtors-shamed-broadcast-names-and-faces-giant-screensSat, 5 May 2018 06:47:36 +0000https://news.ycombinator.com/item?id=17000685Comments]]>ZSH, tmux, Emacs and SSH: A copy-paste storyhttps://blog.d46.us/zsh-tmux-emacs-copy-paste/Sat, 5 May 2018 16:38:47 +0000https://news.ycombinator.com/item?id=17002527Comments]]>Please Stop Using Adblock (But Not Why You Think)https://medium.com/@trybravery/please-stop-using-adblock-but-not-why-you-think-13280e76c8e7Fri, 4 May 2018 18:59:52 +0000https://news.ycombinator.com/item?id=16997272Comments]]>Show HN: Clojure Redis pubsub client with keep-alive heart beatshttps://github.com/aravindbaskaran/redis-pubsubSat, 5 May 2018 16:18:26 +0000https://news.ycombinator.com/item?id=17002446Comments]]>Building an object store with FoundationDBhttps://fabianlindfors.se/blog/building-an-object-store-with-foundation-dbSat, 5 May 2018 16:16:02 +0000https://news.ycombinator.com/item?id=17002432Comments]]>Akin's Laws of Spacecraft Design (2003)http://spacecraft.ssl.umd.edu/akins_laws.htmlFri, 4 May 2018 17:20:50 +0000https://news.ycombinator.com/item?id=16996306Comments]]>Graphpath: generate ASCII network diagram from Unix/Linux route tablehttps://github.com/ocochard/graphpath#graphpathSat, 5 May 2018 16:12:05 +0000https://news.ycombinator.com/item?id=17002416Comments]]>Ask HN: What resources do you use to pick stocks to invest in?https://news.ycombinator.com/item?id=17002894Sat, 5 May 2018 18:01:46 +0000https://news.ycombinator.com/item?id=17002894Comments]]>What SSH Hacking Attempts Look Likehttps://medium.com/@dmrickert/what-ssh-hacking-attempts-look-like-8f698e70a4f5Sat, 5 May 2018 05:33:18 +0000https://news.ycombinator.com/item?id=17000489Comments]]>Reg S: How ICOs Avoid the SEChttps://www.cryptocurrentsblog.com/cryptocurrents/reg-s-how-icos-avoid-the-secSat, 5 May 2018 15:54:29 +0000https://news.ycombinator.com/item?id=17002314Comments]]>The epic mistake about manufacturing that™s cost Americans millions of jobshttps://qz.com/1269172/the-epic-mistake-about-manufacturing-thats-cost-americans-millions-of-jobsSat, 5 May 2018 17:42:51 +0000https://news.ycombinator.com/item?id=17002800Comments]]>Report: Chinese government is behind a decade of hacks on software companieshttps://arstechnica.com/information-technology/2018/05/researchers-link-a-decade-of-potent-hacks-to-chinese-intelligence-group/Sat, 5 May 2018 16:28:37 +0000https://news.ycombinator.com/item?id=17002487Comments]]>What happens before main() is executed in C and why is it important?http://mymicrocontroller.com/2018/04/03/what-happens-before-main-function-is-executed-in-c-and-why-is-it-important/Fri, 4 May 2018 16:24:56 +0000https://news.ycombinator.com/item?id=16995811Comments]]>Never Write Your Own Database (2017)https://medium.com/@terrycrowley/never-write-your-own-database-736f704c780Fri, 4 May 2018 16:01:45 +0000https://news.ycombinator.com/item?id=16995612Comments]]>Seven Puzzles You Think You Must Not Have Heard Correctly (2006) [pdf]https://www.math.dartmouth.edu/~pw/solutions.pdfFri, 4 May 2018 22:13:12 +0000https://news.ycombinator.com/item?id=16998823Comments]]>Waymo releases dashcam footage of Arizona Crashhttps://www.youtube.com/watch?v=KhcyTOaHdv4Sat, 5 May 2018 18:19:49 +0000https://news.ycombinator.com/item?id=17003014Comments]]>Life, the universe, and everything “ 42 fundamental questionshttps://arxiv.org/abs/1804.08730Sat, 5 May 2018 15:18:25 +0000https://news.ycombinator.com/item?id=17002150Comments]]>Quartzy (YC S11) Is Hiring Software Engineers (Palo Alto / Remote-US)https://grnh.se/7sdpn2og1Sat, 5 May 2018 14:27:08 +0000https://news.ycombinator.com/item?id=17001930Comments]]>The economics of artificial intelligencehttps://www.mckinsey.com/business-functions/mckinsey-analytics/our-insights/the-economics-of-artificial-intelligenceSat, 5 May 2018 16:38:22 +0000https://news.ycombinator.com/item?id=17002526Comments]]>A Mirage unikernel running on an ESP32https://www.lortex.org/posts/mirage/esp32/2018/05/04/success.htmlSat, 5 May 2018 15:12:49 +0000https://news.ycombinator.com/item?id=17002131Comments]]>Moving Fast and Securing Thingshttps://slack.engineering/moving-fast-and-securing-things-540e6c5ae58aFri, 4 May 2018 13:18:19 +0000https://news.ycombinator.com/item?id=16994341Comments]]>Harvard's Insane Attack on Policehttps://nypost.com/2018/05/04/harvards-insane-attack-on-cops/amp/Sat, 5 May 2018 18:10:22 +0000https://news.ycombinator.com/item?id=17002949Comments]]>AT&T explains why it blocked Cloudflare DNS: It was just an accidenthttps://arstechnica.com/information-technology/2018/05/att-is-blocking-cloudflares-privacy-focused-dns-calls-it-an-accident/Fri, 4 May 2018 16:31:31 +0000https://news.ycombinator.com/item?id=16995856Comments]]>Fuck You Startup Worldhttps://medium.com/startup-grind/fuck-you-startup-world-ab6cc72fad0eSat, 5 May 2018 17:08:55 +0000https://news.ycombinator.com/item?id=17002651Comments]]>Decomposing real estate prices into land, improvement, and zoning effects [pdf]https://www.rba.gov.au/publications/rdp/2018/pdf/rdp2018-03.pdf?a=Sat, 5 May 2018 14:41:02 +0000https://news.ycombinator.com/item?id=17001996Comments]]>Walmart to buy 73% of Flipkart for up to $16 bn; Alphabet might put in $3 bnhttps://factordaily.com/walmart-to-buy-73-per-cent-of-flipkart/Sat, 5 May 2018 14:39:19 +0000https://news.ycombinator.com/item?id=17001989Comments]]>Computational Foundations of Natural Intelligence (2017)https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5770642/Sat, 5 May 2018 14:36:44 +0000https://news.ycombinator.com/item?id=17001978Comments]]>California has surpassed the UK as world's 5th largest economyhttps://www.cnbc.com/2018/05/04/california-has-surpassed-the-uk-as-worlds-5th-largest-economy.htmlSat, 5 May 2018 17:56:40 +0000https://news.ycombinator.com/item?id=17002860Comments]]>Former top official says Fed should ˜Maybe™ create ˜FedCoin™ to rival Bitcoinhttps://www.nytimes.com/2018/05/04/upshot/should-the-fed-create-fedcoin-to-rival-bitcoin-a-former-top-official-says-maybe.htmlSat, 5 May 2018 02:57:56 +0000https://news.ycombinator.com/item?id=17000085Comments]]>Two centuries on, Karl Marx feels more revolutionary than everhttps://www.theguardian.com/commentisfree/2018/may/05/karl-marx-200th-birthday-communist-manifesto-revolutionarySat, 5 May 2018 17:49:17 +0000https://news.ycombinator.com/item?id=17002827Comments]]>Ask HN: Have you lived abroad for an extended period of time? Was it valuable?https://news.ycombinator.com/item?id=17002758Sat, 5 May 2018 17:30:24 +0000https://news.ycombinator.com/item?id=17002758Comments]]>NASA, ULA Launch Mission to Study How Mars Was Madehttps://mars.nasa.gov/insight/news/8333/nasa-ula-launch-mission-to-study-how-mars-was-madeSat, 5 May 2018 17:46:09 +0000https://news.ycombinator.com/item?id=17002813Comments]]>Version 6 of Angular Now Availablehttps://blog.angular.io/version-6-of-angular-now-available-cc56b0efa7a4Fri, 4 May 2018 18:33:32 +0000https://news.ycombinator.com/item?id=16997059Comments]]>Say yes to the progressive webhttps://www.hpe.com/us/en/insights/articles/say-yes-to-the-progressive-web-1805.htmlFri, 4 May 2018 19:29:53 +0000https://news.ycombinator.com/item?id=16997499Comments]]>Learning Erlang as an Experienced Developerhttps://jonalmeida.com/posts/2018/05/01/erlang/Fri, 4 May 2018 22:44:12 +0000https://news.ycombinator.com/item?id=16999034Comments]]>3 Black Teenage Scientists Had a Breakthrough, Then Came the Trollshttps://www.npr.org/2018/05/05/608558338/3-black-teenage-scientists-had-a-breakthrough-then-came-the-trollsSat, 5 May 2018 13:48:38 +0000https://news.ycombinator.com/item?id=17001768Comments]]>Twitter urges users to change passwords after computer 'glitch'https://www.reuters.com/article/us-twitter-passwords/twitter-says-glitch-exposed-substantial-number-of-users-passwords-idUSKBN1I42JG?il=0Thu, 3 May 2018 20:19:16 +0000https://news.ycombinator.com/item?id=16989534Comments]]>Judge the value of what you have by what you had to give up to get ithttp://timharford.com/2018/05/judge-the-value-of-what-you-have-by-what-you-had-to-give-up-to-get-it/Fri, 4 May 2018 17:08:25 +0000https://news.ycombinator.com/item?id=16996191Comments]]>The Question of Quantum Supremacyhttps://research.googleblog.com/2018/05/the-question-of-quantum-supremacy.htmlFri, 4 May 2018 18:50:12 +0000https://news.ycombinator.com/item?id=16997198Comments]]>The Problem with Threads (2006) [pdf]https://www2.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdfFri, 4 May 2018 17:55:26 +0000https://news.ycombinator.com/item?id=16996668Comments]]>Neural Networks and Primeshttps://repl.it/site/blog/guest-op-nnFri, 4 May 2018 17:55:41 +0000https://news.ycombinator.com/item?id=16996671Comments]]>Why Men Love War (1984)https://www.esquire.com/news-politics/news/a28718/why-men-love-war/Sat, 5 May 2018 00:12:15 +0000https://news.ycombinator.com/item?id=16999449Comments]]>The rise of the pointless jobhttps://www.theguardian.com/money/2018/may/04/i-had-to-guard-an-empty-room-the-rise-of-the-pointless-jobFri, 4 May 2018 15:38:02 +0000https://news.ycombinator.com/item?id=16995389Comments]]>SCOXENIX 2.2 FLOPPIES disk imageshttps://archive.org/details/SCOXENIX2.2FLOPPIESSat, 5 May 2018 03:10:53 +0000https://news.ycombinator.com/item?id=17000126Comments]]>How to sell your apphttps://medium.com/user-camp/how-to-sell-your-app-811d07dce2b4Sat, 5 May 2018 16:11:22 +0000https://news.ycombinator.com/item?id=17002410Comments]]>A 1970s Teenager's Bedroom (1998)http://www.rocketroberts.com/stereo/stereo.htmFri, 4 May 2018 04:06:51 +0000https://news.ycombinator.com/item?id=16992112Comments]]>12 œManager READMEs” from Silicon Valley™s Top Tech Companieshttps://hackernoon.com/12-manager-readmes-from-silicon-valleys-top-tech-companies-26588a660afeSat, 5 May 2018 12:28:22 +0000https://news.ycombinator.com/item?id=17001521Comments]]>Ask HN: If you mine crypto, what cables/hardware do you wish they made?https://news.ycombinator.com/item?id=17002440Sat, 5 May 2018 16:17:20 +0000https://news.ycombinator.com/item?id=17002440Comments]]>California is now the world's fifth-largest economy, surpassing United Kingdomhttp://www.latimes.com/business/la-fi-california-economy-gdp-20180504-story.htmlSat, 5 May 2018 13:11:21 +0000https://news.ycombinator.com/item?id=17001664Comments]]>China smartphone market suffers hard-landing, shipments decline 21% in Q1 2018https://www.canalys.com/newsroom/chinese-smartphone-market-suffers-hard-landing-shipments-decline-21-q1-2018Fri, 4 May 2018 14:05:41 +0000https://news.ycombinator.com/item?id=16994687Comments]]>The End of Intelligencehttps://www.nytimes.com/2018/04/28/opinion/sunday/the-end-of-intelligence.htmlSat, 5 May 2018 01:20:07 +0000https://news.ycombinator.com/item?id=16999720Comments]]>Canada facing ˜brain drain™ as tech talent leaves for Silicon Valleyhttps://www.theglobeandmail.com/business/technology/article-canada-facing-brain-drain-as-young-tech-talent-leaves-for-silicon/Fri, 4 May 2018 17:32:24 +0000https://news.ycombinator.com/item?id=16996420Comments]]>Pocket Casts acquired by NPRhttps://www.npr.org/about-npr/607823388/pocket-cast-acquiredThu, 3 May 2018 20:16:11 +0000https://news.ycombinator.com/item?id=16989505Comments]]>De-Googling my phonehttps://piware.de/post/2018-05-01-android-degoogle/Thu, 3 May 2018 22:11:36 +0000https://news.ycombinator.com/item?id=16990475Comments]]>Flashpoint is archiving Flash games before they disappear foreverhttps://www.gamasutra.com/view/news/317466/Flashpoint_is_archiving_Flash_games_before_they_disappear_forever.phpSat, 5 May 2018 12:56:10 +0000https://news.ycombinator.com/item?id=17001609Comments]]>AT&T updates firmware to block access to 1.1.1.1https://www.dslreports.com/forum/r31901625-New-BGW-210-700-Firmware-1-5-11Wed, 2 May 2018 19:20:57 +0000https://news.ycombinator.com/item?id=16980292Comments]]>How the Manhattan Project™s Nuclear Suburb Stayed Secrethttps://www.atlasobscura.com/articles/how-to-build-secret-nuclear-cityThu, 3 May 2018 21:51:25 +0000https://news.ycombinator.com/item?id=16990312Comments]]>Ask HN: What problem in your industry is a potential startup?https://news.ycombinator.com/item?id=16995260Fri, 4 May 2018 15:24:11 +0000https://news.ycombinator.com/item?id=16995260Comments]]>Programming Language Theory in Agdahttps://wenkokke.github.io/sf/Fri, 4 May 2018 17:23:56 +0000https://news.ycombinator.com/item?id=16996335Comments]]>First impressions about Graal VMhttps://blog.frankel.ch/first-impressions-graalvm/Fri, 4 May 2018 16:42:23 +0000https://news.ycombinator.com/item?id=16995967Comments]]>Vapor 3.0.0 released - Swift web frameworkhttps://medium.com/@codevapor/vapor-3-0-0-released-8356fa619a5dSat, 5 May 2018 11:20:16 +0000https://news.ycombinator.com/item?id=17001340Comments]]>Things I™ve learned using serverlesshttps://read.acloud.guru/six-months-of-serverless-lessons-learned-f6da86a73526Fri, 4 May 2018 19:51:04 +0000https://news.ycombinator.com/item?id=16997669Comments]]>Stripe to donate $1M to California Yimbyhttps://nytimes.com/2018/05/03/us/california-today-stripe-yimby-housing.htmlThu, 3 May 2018 16:12:21 +0000https://news.ycombinator.com/item?id=16987229Comments]]>Open Sourcing Seurat: bringing high-fidelity scenes to mobile VRhttps://developers.googleblog.com/2018/05/open-sourcing-seurat.htmlFri, 4 May 2018 20:53:50 +0000https://news.ycombinator.com/item?id=16998237Comments]]>A secondary market has emerged for buying and selling Telegram tokens earlyhttps://techcrunch.com/2018/05/03/telegrams-billion-dollar-ico-has-become-a-mess/Fri, 4 May 2018 19:06:44 +0000https://news.ycombinator.com/item?id=16997328Comments]]>Ask HN: Startup to enterprise and back to startups “ how?https://news.ycombinator.com/item?id=16991101Fri, 4 May 2018 00:04:30 +0000https://news.ycombinator.com/item?id=16991101Comments]]>FoundationDB community highlights, two weeks inhttps://www.foundationdb.org/blog/foundationdb-community-highlights-two-weeks-in/Fri, 4 May 2018 13:50:17 +0000https://news.ycombinator.com/item?id=16994579Comments]]>How online algorithms reshape people's personalitieshttp://noblackmirrorthanks.blogspot.com/2018/05/how-social-media-algorithms-shape.htmlSat, 5 May 2018 16:47:12 +0000https://news.ycombinator.com/item?id=17002556Comments]]>Extracting Structured Data from Recipes Using Conditional Random Fields (2015)https://open.blogs.nytimes.com/2015/04/09/extracting-structured-data-from-recipes-using-conditional-random-fields/Fri, 4 May 2018 05:02:48 +0000https://news.ycombinator.com/item?id=16992306Comments]]>How a Medieval Society Withstood Nearly 60 Years of Droughthttps://www.theatlantic.com/science/archive/2018/05/how-a-medieval-society-survived-nearly-60-years-of-drought/559616/?single_page=trueFri, 4 May 2018 17:26:28 +0000https://news.ycombinator.com/item?id=16996359Comments]]>Mecanum wheelhttps://en.wikipedia.org/wiki/Mecanum_wheelFri, 4 May 2018 02:23:06 +0000https://news.ycombinator.com/item?id=16991756Comments]]>The Kruskal Count Card Trickhttp://faculty.uml.edu/rmontenegro/research/kruskal_count/kruskal.htmlFri, 4 May 2018 05:42:06 +0000https://news.ycombinator.com/item?id=16992448Comments]]>Pulling the Plug on GeForce Partner Programhttps://blogs.nvidia.com/blog/2018/05/04/gpp/Fri, 4 May 2018 19:13:34 +0000https://news.ycombinator.com/item?id=16997365Comments]]>Ask HN: How long does it take you to learn a new language?https://news.ycombinator.com/item?id=17002567Sat, 5 May 2018 16:50:13 +0000https://news.ycombinator.com/item?id=17002567Comments]]>Oni “ Modern Modal Editinghttps://www.onivim.io/Fri, 4 May 2018 16:32:44 +0000https://news.ycombinator.com/item?id=16995876Comments]]>Google Advanced Technology and Projectshttp://atap.google.com/Sat, 5 May 2018 16:22:30 +0000https://news.ycombinator.com/item?id=17002464Comments]]>High Speed Networking: Open Sourcing our Kernel Bypass Workhttps://www.bbc.co.uk/rd/blog/2018-04-high-speed-networking-open-source-kernel-bypassThu, 3 May 2018 14:02:14 +0000https://news.ycombinator.com/item?id=16986100Comments]]>The extraordinary life and death of the world™s oldest known spiderhttps://www.washingtonpost.com/news/speaking-of-science/wp/2018/05/01/the-extraordinary-life-and-death-of-the-worlds-oldest-known-spider/Fri, 4 May 2018 06:25:57 +0000https://news.ycombinator.com/item?id=16992596Comments]]>Jupyter Receives the ACM Software System Awardhttps://blog.jupyter.org/jupyter-receives-the-acm-software-system-award-d433b0dfe3a2Wed, 2 May 2018 13:51:49 +0000https://news.ycombinator.com/item?id=16976830Comments]]>The first mobile-native media format: Storieshttps://www.theatlantic.com/technology/archive/2018/05/smartphone-stories-snapchat-instagram-facebook/559517/?single_page=trueSat, 5 May 2018 16:10:38 +0000https://news.ycombinator.com/item?id=17002406Comments]]>One space between each sentence, they said.ƒScience just proved them wronghttps://www.washingtonpost.com/news/speaking-of-science/wp/2018/05/04/one-space-between-each-sentence-they-said-science-just-proved-them-wrong-2/Sat, 5 May 2018 16:08:49 +0000https://news.ycombinator.com/item?id=17002396Comments]]>How to Train and Build a Conversational News Chatbothttps://github.com/tzano/wren/blob/master/docs/news_assistant.mdFri, 4 May 2018 15:24:23 +0000https://news.ycombinator.com/item?id=16995262Comments]]>Swedish Academy Won™t Award Nobel Prize in Literature This Yearhttps://www.wsj.com/articles/swedish-academy-wont-award-nobel-prize-in-literature-this-year-1525419104Fri, 4 May 2018 07:38:18 +0000https://news.ycombinator.com/item?id=16992852Comments]]>7-Zip: From Uninitialized Memory to Remote Code Executionhttps://landave.io/2018/05/7-zip-from-uninitialized-memory-to-remote-code-execution/?hnThu, 3 May 2018 12:47:59 +0000https://news.ycombinator.com/item?id=16985460Comments]]>Python startup time: milliseconds matterhttps://mail.python.org/pipermail/python-dev/2018-May/153296.htmlWed, 2 May 2018 17:00:41 +0000https://news.ycombinator.com/item?id=16978932Comments]]>PagerDuty makes their security training publichttps://sudo.pagerduty.com/Fri, 4 May 2018 14:59:58 +0000https://news.ycombinator.com/item?id=16995028Comments]]>100 prisoners problemhttps://en.wikipedia.org/wiki/100_prisoners_problemThu, 3 May 2018 11:00:48 +0000https://news.ycombinator.com/item?id=16984815Comments]]>C Primerhttps://www.enlightenment.org/docs/c/startFri, 4 May 2018 11:23:27 +0000https://news.ycombinator.com/item?id=16993689Comments]]>Masterminding the largest lottery scam in American historyhttps://www.nytimes.com/interactive/2018/05/03/magazine/money-issue-iowa-lottery-fraud-mystery.htmlFri, 4 May 2018 11:57:58 +0000https://news.ycombinator.com/item?id=16993835Comments]]>Why Happiness Is Hard to Find“in the Brainhttp://nautil.us/issue/60/searches/why-happiness-is-hard-to-findin-the-brainSat, 5 May 2018 10:10:27 +0000https://news.ycombinator.com/item?id=17001148Comments]]>The Ethical Minefield of Studying Ancient Civilizationshttps://motherboard.vice.com/en_us/article/9kgxjp/ebay-organized-crime-and-evangelical-christians-the-ethical-minefield-of-studying-ancient-civilizations-hobby-lobby-irisagrig-iraqThu, 3 May 2018 19:26:18 +0000https://news.ycombinator.com/item?id=16989015Comments]]>What if 99% of the World was Illiterate?https://steemit.com/datascience/@marketstack/what-if-99-of-the-world-was-illiterateSat, 5 May 2018 15:49:28 +0000https://news.ycombinator.com/item?id=17002286Comments]]>Proton Native “ React Native for the desktophttps://proton-native.js.org/Wed, 2 May 2018 16:57:16 +0000https://news.ycombinator.com/item?id=16978901Comments]]>Testing distributed systemshttps://asatarin.github.io/testing-distributed-systems/Fri, 4 May 2018 07:05:57 +0000https://news.ycombinator.com/item?id=16992739Comments]]>Sinister parasites that control their hosts' mindshttp://www.bbc.com/earth/story/20150316-ten-parasites-that-control-mindsFri, 4 May 2018 12:43:42 +0000https://news.ycombinator.com/item?id=16994098Comments]]>A new model for communication in plant cellshttps://phys.org/news/2018-05-cells.htmlFri, 4 May 2018 00:43:40 +0000https://news.ycombinator.com/item?id=16991297Comments]]>Ask HN: Is a React Native like approach to desktop apps better than Electron?https://news.ycombinator.com/item?id=16996877Fri, 4 May 2018 18:17:45 +0000https://news.ycombinator.com/item?id=16996877Comments]]>REST vs. GraphQL APIs, the Good, the Bad, the Uglyhttps://dev.to/xngwng/rest-vs-graphql-apis-the-good-the-bad-the-ugly-34i8Sat, 5 May 2018 15:42:31 +0000https://news.ycombinator.com/item?id=17002251Comments]]>The hell that is filename encoding (2016)http://beets.io/blog/paths.htmlFri, 4 May 2018 00:36:43 +0000https://news.ycombinator.com/item?id=16991263Comments]]>How salad became a major source of food poisoning in the UShttps://www.vox.com/science-and-health/2018/4/26/17282378/romaine-lettuce-recall-ecoli-yumaThu, 3 May 2018 19:03:29 +0000https://news.ycombinator.com/item?id=16988826Comments]]>Show HN: The Lorem Ipsum Generator with a Cherry on Tophttp://www.icecreamipsum.comSat, 5 May 2018 09:19:18 +0000https://news.ycombinator.com/item?id=17001030Comments]]>15 Years in 28 Minutes: GPUs Speed Up Simulation of Oil Reservoirshttps://blogs.nvidia.com/blog/2018/05/03/gpus-simulation-supercomputing-eni-srt-echelon-deep-learning/?ncid=so-fac-dplg-40319Sat, 5 May 2018 09:17:30 +0000https://news.ycombinator.com/item?id=17001026Comments]]>NASA completes full-power tests of small, portable nuclear reactorhttps://www.engadget.com/2018/05/02/nasa-completes-full-power-tests-small-nuclear-reactor/Thu, 3 May 2018 09:48:10 +0000https://news.ycombinator.com/item?id=16984551Comments]]>Crypko: Cryptocollectible Game Empowered by GANs [pdf]https://crypko.ai/static/files/crypko-whitepaper.pdfThu, 3 May 2018 21:55:45 +0000https://news.ycombinator.com/item?id=16990347Comments]]>Searching for a Future Beyond Facebookhttps://longreads.com/2018/05/01/searching-for-a-future-beyond-facebook/Fri, 4 May 2018 03:28:11 +0000https://news.ycombinator.com/item?id=16992001Comments]]>Scaleway “ NVMe SSD Servers and Hot Snapshothttps://blog.online.net/2018/05/03/introducing-scaleway-nextgen-nvme-cloud-servers-with-hot-snapshots/Fri, 4 May 2018 04:58:40 +0000https://news.ycombinator.com/item?id=16992295Comments]]>15 mins of car ride costed me 21500 INR Zoomcar Indiahttp://anurag-maher.blogspot.com/2018/05/15-mins-of-car-ride-costed-me-21500-inr.htmlSat, 5 May 2018 08:58:47 +0000https://news.ycombinator.com/item?id=17000987Comments]]>'Anti-authority' tech rebels take on ISPs, connect NYC with cheap Wi-Fihttp://www.cbc.ca/news/technology/wifi-nyc-mesh-new-york-city-1.4617106Wed, 2 May 2018 16:23:31 +0000https://news.ycombinator.com/item?id=16978544Comments]]>Team Silverblue: Fedora as an image and container-based desktop OShttps://teamsilverblue.org/Sat, 5 May 2018 08:50:25 +0000https://news.ycombinator.com/item?id=17000963Comments]]>Fake it till you make it: the wolves of Instagramhttps://www.theguardian.com/news/2018/apr/19/wolves-of-instagram-jordan-belmont-social-media-tradersThu, 3 May 2018 15:08:04 +0000https://news.ycombinator.com/item?id=16986701Comments]]>Impact “ HTML5 Game Enginehttps://github.com/phoboslab/impactThu, 3 May 2018 10:06:56 +0000https://news.ycombinator.com/item?id=16984605Comments]]>Show HN: A color-accurate Instagram-like filters reconstruction for appshttps://github.com/homm/color-filters-reconstruction#accurate-instagram-filters-reconstructionFri, 4 May 2018 17:53:00 +0000https://news.ycombinator.com/item?id=16996644Comments]]>The illusion of control in web designhttp://alistapart.com/article/the-illusion-of-control-in-web-designThu, 3 May 2018 22:49:35 +0000https://news.ycombinator.com/item?id=16990726Comments]]>Biology Will Be the Next Great Computing Platformhttps://www.wired.com/story/biology-will-be-the-next-great-computing-platform/Fri, 4 May 2018 04:00:30 +0000https://news.ycombinator.com/item?id=16992085Comments]]>Ascii Art Generatorhttps://asciiartgen.now.sh/Fri, 4 May 2018 06:06:08 +0000https://news.ycombinator.com/item?id=16992527Comments]]>The 8000th Busy Beaver number eludes ZF set theory (2016)https://www.scottaaronson.com/blog/?p=2725Thu, 3 May 2018 18:42:45 +0000https://news.ycombinator.com/item?id=16988612Comments]]>GitHub provides an RSS feed for all user-facing changes made on the platformhttps://blog.github.com/changelog/Thu, 3 May 2018 18:32:07 +0000https://news.ycombinator.com/item?id=16988494Comments]]>The tragedy of FireWire: Collaborative tech torpedoed by corporations (2017)https://arstechnica.com/gadgets/2017/06/the-rise-and-fall-of-firewire-the-standard-everyone-couldnt-quite-agree-on/Sat, 5 May 2018 09:04:06 +0000https://news.ycombinator.com/item?id=17001000Comments]]>The Hobo Ethical Code of 1889http://www.openculture.com/2016/11/the-hobo-ethical-code-of-1889.htmlWed, 2 May 2018 07:32:37 +0000https://news.ycombinator.com/item?id=16974878Comments]]>VSCode still sends search keystrokes to Microsoft with telemetry disabledhttps://mstdn.io/@taoeffect/99968111410687610Fri, 4 May 2018 11:44:43 +0000https://news.ycombinator.com/item?id=16993777Comments]]>Performance analysis of cloud applicationshttps://blog.acolyer.org/2018/05/04/performance-analysis-of-cloud-applications/Fri, 4 May 2018 05:34:37 +0000https://news.ycombinator.com/item?id=16992418Comments]]>Asylo: an open-source framework for confidential computinghttps://cloudplatform.googleblog.com/2018/05/Introducing-Asylo-an-open-source-framework-for-confidential-computing.htmlThu, 3 May 2018 17:24:14 +0000https://news.ycombinator.com/item?id=16987862Comments]]>Show HN: Serverless Components “ easiest way to build apps with cloud serviceshttps://github.com/serverless/componentsFri, 4 May 2018 18:31:47 +0000https://news.ycombinator.com/item?id=16997036Comments]]>A Dangerous Question: Does Internet Advertising Work at All? (2014)https://www.theatlantic.com/business/archive/2014/06/a-dangerous-question-does-internet-advertising-work-at-all/372704/?single_page=trueSat, 5 May 2018 14:54:09 +0000https://news.ycombinator.com/item?id=17002039Comments]]>Breaking a myth: Data shows you don™t actually need a co-founderhttps://techcrunch.com/2016/08/26/co-founders-optional/amp/Sat, 5 May 2018 07:49:58 +0000https://news.ycombinator.com/item?id=17000844Comments]]>Active vs. Passive Investment managementhttps://medium.com/@notifinio/active-vs-passive-invesment-8a5d0dcaf993Sat, 5 May 2018 14:47:16 +0000https://news.ycombinator.com/item?id=17002017Comments]]>Ask HN: Building a game for AI Researchhttps://news.ycombinator.com/item?id=16991591Fri, 4 May 2018 01:43:52 +0000https://news.ycombinator.com/item?id=16991591Comments]]>Show HN: I spent 8 months building a self-hosted web analytics apphttps://321analytics.comFri, 4 May 2018 14:20:05 +0000https://news.ycombinator.com/item?id=16994770Comments]]>GitHub's online schema migration for MySQLhttps://github.com/github/gh-ostThu, 3 May 2018 02:44:00 +0000https://news.ycombinator.com/item?id=16982986Comments]]>Lisp, Jazz, Aikidohttp://programming-journal.org/2018/2/10/Fri, 4 May 2018 09:47:45 +0000https://news.ycombinator.com/item?id=16993330Comments]]>A Spiral Model of Software Development and Enhancement [pdf]http://csse.usc.edu/TECHRPTS/1988/usccse88-500/usccse88-500.pdfSat, 5 May 2018 06:58:31 +0000https://news.ycombinator.com/item?id=17000719Comments]]>Bonobo and chimpanzee gestures overlap extensively in meaninghttp://journals.plos.org/plosbiology/article?id=10.1371/journal.pbio.2004825Wed, 2 May 2018 11:50:20 +0000https://news.ycombinator.com/item?id=16976014Comments]]>Some Perspective on Self-Sovereign Identityhttps://www.kuppingercole.com/blog/guest/some-perspective-on-self-sovereign-identityThu, 3 May 2018 14:53:32 +0000https://news.ycombinator.com/item?id=16986550Comments]]>Nabokov™s Dreamshttps://www.lrb.co.uk/v40/n09/john-lanchester/nabokovs-dreamsFri, 4 May 2018 17:47:37 +0000https://news.ycombinator.com/item?id=16996581Comments]]>How Strenuous Exercise Affects Our Immune Systemhttps://www.nytimes.com/2018/04/25/well/move/how-strenuous-exercise-affects-our-immune-system.htmlFri, 4 May 2018 14:01:58 +0000https://news.ycombinator.com/item?id=16994662Comments]]>Show HN: Generate colored ASCII art from imageshttp://www.asciiator.comFri, 4 May 2018 12:59:02 +0000https://news.ycombinator.com/item?id=16994214Comments]]>The life cycle of HIV in 3D [video]https://blogs.scientificamerican.com/observations/watch-the-life-cycle-of-hiv-in-colorful-new-detail/Thu, 3 May 2018 00:38:54 +0000https://news.ycombinator.com/item?id=16982396Comments]]>Show HN: LayerJS “ A simple UI composition and navigation libraryhttps://layerjs.orgThu, 3 May 2018 12:16:57 +0000https://news.ycombinator.com/item?id=16985250Comments]]>Open-sourcing gVisor, a sandboxed container runtimehttps://cloudplatform.googleblog.com/2018/05/Open-sourcing-gVisor-a-sandboxed-container-runtime.htmlWed, 2 May 2018 10:50:21 +0000https://news.ycombinator.com/item?id=16975706Comments]]>Lobe “ Deep Learning Made Simplehttps://lobe.aiWed, 2 May 2018 13:36:59 +0000https://news.ycombinator.com/item?id=16976697Comments]]>Is there a fix for impostor syndrome?http://interactions.acm.org/archive/view/may-june-2018/is-there-a-fix-for-impostor-syndromeThu, 3 May 2018 03:42:01 +0000https://news.ycombinator.com/item?id=16983195Comments]]>Facebook announces Clear History featurehttps://www.facebook.com/zuck/posts/10104899855107881Tue, 1 May 2018 17:40:56 +0000https://news.ycombinator.com/item?id=16969325Comments]]>A growing number of philosophers are conducting experiments to test argumentshttps://aeon.co/essays/beyond-the-armchair-must-philosophy-become-experimentalThu, 3 May 2018 07:27:34 +0000https://news.ycombinator.com/item?id=16984017Comments]]>Drive-by Rowhammer attack uses GPU to compromise an Android phonehttps://arstechnica.com/information-technology/2018/05/drive-by-rowhammer-attack-uses-gpu-to-compromise-an-android-phone/Thu, 3 May 2018 10:23:00 +0000https://news.ycombinator.com/item?id=16984663Comments]]>Extreme mobility of mantis shrimp eyeshttps://phys.org/news/2018-05-extreme-mobility-mantis-shrimp-eyes.htmlWed, 2 May 2018 00:33:23 +0000https://news.ycombinator.com/item?id=16973102Comments]]>California Now World's 5th Largest Economy, Surpassing UKhttps://www.nytimes.com/aponline/2018/05/04/us/ap-us-california-economy.htmlFri, 4 May 2018 21:17:31 +0000https://news.ycombinator.com/item?id=16998444Comments]]>Facebook to Research Ad-Free Subscription-Based Versionhttps://www.bloomberg.com/news/articles/2018-05-04/facebook-is-said-to-research-ad-free-subscription-based-versionFri, 4 May 2018 11:31:50 +0000https://news.ycombinator.com/item?id=16993720Comments]]>The Helium Factor and Hard Drive Failure Rateshttps://www.backblaze.com/blog/helium-filled-hard-drive-failure-rates/Thu, 3 May 2018 18:31:48 +0000https://news.ycombinator.com/item?id=16988491Comments]]>PicoLisphttps://picolisp.com/wiki/?homeWed, 2 May 2018 20:01:20 +0000https://news.ycombinator.com/item?id=16980640Comments]]>You Can™t Opt Out of Sharing Your Data, Even If You Didn™t Opt Inhttps://fivethirtyeight.com/features/you-cant-opt-out-of-sharing-your-data-even-if-you-didnt-opt-in/Sat, 5 May 2018 13:49:13 +0000https://news.ycombinator.com/item?id=17001771Comments]]>Show HN: WhatsApp Web Bothttps://github.com/aalsuwaidi/wabotSat, 5 May 2018 05:34:39 +0000https://news.ycombinator.com/item?id=17000496Comments]]>Yippies vs. Zippies: New book reveals ™70s counterculture feudhttp://thevillager.com/2018/02/25/yippies-vs-zippies-new-jerry-rubin-book-reveals-70s-counterculture-feud/Thu, 3 May 2018 22:34:20 +0000https://news.ycombinator.com/item?id=16990640Comments]]>Monome Nornshttps://monome.org/norns/Sat, 5 May 2018 05:21:09 +0000https://news.ycombinator.com/item?id=17000466Comments]]>An Introduction to A/B Testinghttps://blog.emberbase.com/2018/05/05/introduction-ab-testing/Sat, 5 May 2018 05:20:53 +0000https://news.ycombinator.com/item?id=17000464Comments]]>SquirrelMail is being removed from cPanelhttps://blog.cpanel.com/the-death-of-squirrelmail/Fri, 4 May 2018 20:10:17 +0000https://news.ycombinator.com/item?id=16997862Comments]]>Akin's Laws of Spacecraft Designhttp://spacecraft.ssl.umd.edu/akins_laws.htmlThu, 3 May 2018 18:06:47 +0000https://news.ycombinator.com/item?id=16988261Comments]]>We™re happy with SQLite and not urgently interested in a fancier DBMS (2016)http://beets.io/blog/sqlite-performance.htmlFri, 4 May 2018 16:02:36 +0000https://news.ycombinator.com/item?id=16995622Comments]]>The Pain Hustlershttps://www.nytimes.com/interactive/2018/05/02/magazine/money-issue-insys-opioids-kickbacks.htmlWed, 2 May 2018 11:47:32 +0000https://news.ycombinator.com/item?id=16976001Comments]]>Eltoo: A Simplified Update Mechanism for Lightning and Off-Chain Contractshttps://blockstream.com/2018/04/30/eltoo-next-lightning.htmlWed, 2 May 2018 20:49:09 +0000https://news.ycombinator.com/item?id=16981023Comments]]>GitHub repository.Learning algorithm and data structureshttps://github.com/bakhodir10/AlgoCSSat, 5 May 2018 05:00:40 +0000https://news.ycombinator.com/item?id=17000400Comments]]>Philosophy of Softwarehttps://news.ycombinator.com/item?id=17000846Sat, 5 May 2018 07:50:33 +0000https://news.ycombinator.com/item?id=17000846Comments]]>Craftsman, Craftswoman, Craftspersonhttp://blog.cleancoder.com/uncle-bob/2018/05/02/Craftsman-Craftswoman-Craftsperson.htmlSat, 5 May 2018 10:48:14 +0000https://news.ycombinator.com/item?id=17001265Comments]]>How Often Do Freelancers Get Paid Late? It Depends If You™re a Woman or Manhttps://priceonomics.com/how-often-do-freelancers-get-paid-late-it-depends/Sat, 5 May 2018 13:25:03 +0000https://news.ycombinator.com/item?id=17001701Comments]]>What Happened to the Book Herman Melville Wrote After ˜Moby-Dick™?https://www.thedailybeast.com/whatever-happened-to-the-book-herman-melville-wrote-after-moby-dickThu, 3 May 2018 05:36:01 +0000https://news.ycombinator.com/item?id=16983571Comments]]>Technique to manipulate electrons with light could make computers much fasterhttp://www.opli.net/opli_magazine/eo/2018/light-could-make-semiconductor-computers-a-million-times-faster-or-even-go-quantum-may-news/Fri, 4 May 2018 00:10:02 +0000https://news.ycombinator.com/item?id=16991127Comments]]>Moving Fast and Securing Thingshttps://slack.engineering/moving-fast-and-securing-things-540e6c5ae58aThu, 3 May 2018 23:33:09 +0000https://news.ycombinator.com/item?id=16990955Comments]]>UK regulator orders Cambridge Analytica to release data on US voterhttps://www.theguardian.com/uk-news/2018/may/05/cambridge-analytica-uk-regulator-release-data-us-voter-david-carrollSat, 5 May 2018 13:20:24 +0000https://news.ycombinator.com/item?id=17001691Comments]]>Yubikey/Smartcard backed TLS servershttps://blog.benjojo.co.uk/post/tls-https-server-from-a-yubikeyThu, 3 May 2018 11:52:06 +0000https://news.ycombinator.com/item?id=16985081Comments]]>Ask HN: What is the good time to move out of AWS?https://news.ycombinator.com/item?id=17000368Sat, 5 May 2018 04:46:47 +0000https://news.ycombinator.com/item?id=17000368Comments]]>Everest: A lightweight REST API client written in JavaFXhttps://github.com/RohitAwate/EverestThu, 3 May 2018 18:22:59 +0000https://news.ycombinator.com/item?id=16988401Comments]]>How Algolia Built Their Realtime Search as a Servicehttps://stackshare.io/posts/how-algolia-built-their-realtime-search-as-a-service-productWed, 2 May 2018 11:46:55 +0000https://news.ycombinator.com/item?id=16976000Comments]]>TIC-80, a fantasy computer to learn programminghttps://tic.computer/Tue, 1 May 2018 15:12:34 +0000https://news.ycombinator.com/item?id=16967664Comments]]>Adding BigInts to V8https://v8project.blogspot.com/2018/05/bigint.htmlWed, 2 May 2018 16:30:30 +0000https://news.ycombinator.com/item?id=16978624Comments]]>Google open sources Seurat, a tool for reducing mobile VR complexityhttps://techcrunch.com/2018/05/04/google-open-sources-seurat-a-tool-for-reducing-mobile-vr-complexity/Sat, 5 May 2018 04:16:23 +0000https://news.ycombinator.com/item?id=17000280Comments]]>Findings from the Imagenet and CIFAR10 competitionshttp://www.fast.ai/2018/04/30/dawnbench-fastai/Wed, 2 May 2018 16:58:51 +0000https://news.ycombinator.com/item?id=16978914Comments]]>LinkMiner: Find backlinks of your competitors you can replicate easilyhttps://siftery.com/stories/find-backlinks-of-your-competitors-you-can-replicate-easilySat, 5 May 2018 13:09:35 +0000https://news.ycombinator.com/item?id=17001660Comments]]>How to Raise a Unicornhttps://medium.com/@MTorygreen/how-to-raise-a-unicorn-4fb1cb4cddabSat, 5 May 2018 13:07:42 +0000https://news.ycombinator.com/item?id=17001652Comments]]>Water filter inspired by Alan Turing passes first testhttps://www.nature.com/articles/d41586-018-05055-7Sat, 5 May 2018 04:03:48 +0000https://news.ycombinator.com/item?id=17000255Comments]]>Why NASA's Next Mars Lander Will Launch from California Instead of Floridahttps://gizmodo.com/why-nasas-next-mars-lander-will-launch-from-california-1825695493Wed, 2 May 2018 19:34:31 +0000https://news.ycombinator.com/item?id=16980412Comments]]>Randomized responsehttps://www.dartmouth.edu/~chance/teaching_aids/RResponse/RResponse.htmlFri, 4 May 2018 04:43:44 +0000https://news.ycombinator.com/item?id=16992249Comments]]>An Introduction to Deep Learning for Tabular Datahttp://www.fast.ai/2018/04/29/categorical-embeddings/Sat, 5 May 2018 03:53:59 +0000https://news.ycombinator.com/item?id=17000229Comments]]>Show HN: Interceptor “ mock AJAX requests at the browser levelhttps://crypt.codemancers.com/posts/2018-04-24-intro-to-interceptor/Wed, 2 May 2018 11:26:11 +0000https://news.ycombinator.com/item?id=16975873Comments]]>A Call of Duty exploithttps://momo5502.com/blog/?p=34Thu, 3 May 2018 05:33:50 +0000https://news.ycombinator.com/item?id=16983567Comments]]>Envy™s Hidden Handhttps://aeon.co/essays/why-inequality-bothers-people-more-than-povertyThu, 3 May 2018 22:32:54 +0000https://news.ycombinator.com/item?id=16990627Comments]]>Apple iMac Pro and Secure Storagehttps://duo.com/blog/apple-imac-pro-and-secure-storageWed, 2 May 2018 21:25:14 +0000https://news.ycombinator.com/item?id=16981280Comments]]>Free SSL on Github Pages with a custom domain: Part 2 “ Let's Encrypthttps://bart.degoe.de/github-pages-and-lets-encrypt/Wed, 2 May 2018 22:05:15 +0000https://news.ycombinator.com/item?id=16981557Comments]]>Running FFmpeg on AWS Lambda for 1.9% the Cost of AWS Elastic Transcoderhttps://intoli.com/blog/transcoding-on-aws-lambda/Wed, 2 May 2018 12:26:40 +0000https://news.ycombinator.com/item?id=16976238Comments]]>Introduction to Go Programminghttp://shop.oreilly.com/product/0636920035305.doSat, 5 May 2018 12:50:10 +0000https://news.ycombinator.com/item?id=17001595Comments]]>How your web browser affects your online reality, explained in one imagehttps://www.vox.com/2018/5/3/17309078/digital-art-diana-a-smith-francine-coded-browser-artSat, 5 May 2018 12:49:57 +0000https://news.ycombinator.com/item?id=17001593Comments]]>Slacktyping: A program that says I'm typing when anyone else is typinghttps://github.com/will/slacktypingSat, 5 May 2018 03:28:10 +0000https://news.ycombinator.com/item?id=17000169Comments]]>Altair: Declarative Visualization in Pythonhttps://altair-viz.github.io/Thu, 3 May 2018 15:10:55 +0000https://news.ycombinator.com/item?id=16986718Comments]]>Zoopraxiscopehttps://en.wikipedia.org/wiki/ZoopraxiscopeWed, 2 May 2018 05:41:16 +0000https://news.ycombinator.com/item?id=16974366Comments]]>PostgreSQL's fsync surprisehttps://lwn.net/Articles/752063/Wed, 2 May 2018 04:20:46 +0000https://news.ycombinator.com/item?id=16974033Comments]]>Elon Musk hung up on NTSB chief during call about Tesla crash probehttps://arstechnica.com/tech-policy/2018/05/elon-musk-hung-up-on-ntsb-chief-during-call-about-tesla-crash-probe/Sat, 5 May 2018 11:46:11 +0000https://news.ycombinator.com/item?id=17001409Comments]]>The Curse of Konzohttps://www.damninteresting.com/the-curse-of-konzo/Wed, 2 May 2018 17:50:16 +0000https://news.ycombinator.com/item?id=16979456Comments]]>City as Characterhttps://www.laphamsquarterly.org/roundtable/city-characterWed, 2 May 2018 22:26:10 +0000https://news.ycombinator.com/item?id=16981702Comments]]>Cities from the sea: the true cost of reclaimed landhttps://www.theguardian.com/cities/2018/may/02/cities-from-the-sea-the-true-cost-of-reclaimed-land-asia-malaysia-penang-dubaiWed, 2 May 2018 11:24:20 +0000https://news.ycombinator.com/item?id=16975860Comments]]>Design for an Audiencehttp://style.org/ku/Thu, 3 May 2018 21:15:31 +0000https://news.ycombinator.com/item?id=16990059Comments]]>A Criminal Gang Used a Drone Swarm to Obstruct an FBI Hostage Raidhttps://www.defenseone.com/technology/2018/05/criminal-gang-used-drone-swarm-obstruct-fbi-raid/147956/Fri, 4 May 2018 03:50:41 +0000https://news.ycombinator.com/item?id=16992058Comments]]>Google embraces, extends, and extinguisheshttps://drewdevault.com/2018/05/03/Google-embraces-extends-extinguishes.htmlFri, 4 May 2018 11:30:30 +0000https://news.ycombinator.com/item?id=16993715Comments]]>Introducing .app, a more secure home for apps on the webhttps://www.blog.google/topics/developers/introducing-app-more-secure-home-apps-web/Tue, 1 May 2018 15:30:23 +0000https://news.ycombinator.com/item?id=16967865Comments]]>Crab crisis: Maryland seafood industry loses 40% of workforce in visa lotteryhttps://www.washingtonpost.com/local/crab-crisis-md-seafood-industry-loses-40-percent-of-workforce-in-visa-lottery/2018/05/03/bf397874-4ef0-11e8-af46-b1d6dc0d9bfe_story.htmlFri, 4 May 2018 17:46:28 +0000https://news.ycombinator.com/item?id=16996564Comments]]>Innovative Leadership Allows the People to Ask, œWhat If?”http://bradhansononleadership.blogspot.com/2018/05/innovative-leadership-allows-people-to.htmlSat, 5 May 2018 02:34:42 +0000https://news.ycombinator.com/item?id=17000025Comments]]>Can contributing to Open Source lead to Consulting gigs?https://news.ycombinator.com/item?id=17002278Sat, 5 May 2018 15:47:46 +0000https://news.ycombinator.com/item?id=17002278Comments]]>The bureaucracy of US science: Researchers spend weeks on clinical trial formshttp://www.sciencemag.org/news/2018/05/basic-scientists-still-feel-pinch-new-nih-clinical-trial-policySat, 5 May 2018 12:24:07 +0000https://news.ycombinator.com/item?id=17001509Comments]]>Akaunting 1.2 Released “ Free Accounting Softwarehttps://akaunting.com/blog/akaunting-12-releasedFri, 4 May 2018 07:01:31 +0000https://news.ycombinator.com/item?id=16992727Comments]]>Grand Pwning Unit: Accelerating Microarchitectural Attacks with the GPU [pdf]https://www.vusec.net/wp-content/uploads/2018/05/glitch.pdfThu, 3 May 2018 11:08:41 +0000https://news.ycombinator.com/item?id=16984868Comments]]>MrWint's GBC Pokémon: Yellow Version œArbitrary Code Execution” (2017)http://tasvideos.org/5384S.htmlWed, 2 May 2018 05:32:41 +0000https://news.ycombinator.com/item?id=16974316Comments]]>A Dying Scientist and His Rogue Vaccine Trialhttps://www.wired.com/story/infectious-rogue-vaccine-trialThu, 3 May 2018 10:46:09 +0000https://news.ycombinator.com/item?id=16984744Comments]]>Exodus “ Painless relocation of Linux binaries without containershttps://github.com/intoli/exodusWed, 2 May 2018 22:40:40 +0000https://news.ycombinator.com/item?id=16981784Comments]]>Don the Talking Doghttps://www.smithsonianmag.com/history/when-don-talking-dog-took-nation-storm-180968867/?no-istThu, 3 May 2018 07:30:20 +0000https://news.ycombinator.com/item?id=16984033Comments]]>Is Prefix of String in Table? a Journey into SIMD String Processinghttp://trent.me/is-prefix-of-string-in-table/Fri, 4 May 2018 18:52:28 +0000https://news.ycombinator.com/item?id=16997219Comments]]>Why Silicon Valley can™t fix itselfhttps://www.theguardian.com/news/2018/may/03/why-silicon-valley-cant-fix-itself-tech-humanismFri, 4 May 2018 05:19:23 +0000https://news.ycombinator.com/item?id=16992357Comments]]>Ex-Volkswagen C.E.O. Charged with Fraud Over Diesel Emissionshttps://www.nytimes.com/2018/05/03/business/volkswagen-ceo-diesel-fraud.htmlThu, 3 May 2018 20:28:47 +0000https://news.ycombinator.com/item?id=16989616Comments]]>Humpback Whale Baby Boom Near Antarcticahttps://www.nytimes.com/2018/05/01/science/humpback-whale-antarctica.htmlWed, 2 May 2018 11:23:01 +0000https://news.ycombinator.com/item?id=16975853Comments]]>Approving cattlemen™s petition would have a œchilling” effect on food innovationhttps://www.foodnavigator-usa.com/Article/2018/05/02/Approving-cattlemen-s-petition-would-have-a-chilling-effect-on-food-innovation-says-Memphis-MeatsSat, 5 May 2018 01:35:31 +0000https://news.ycombinator.com/item?id=16999792Comments]]>Apple hits all-time high on news of Buffett buying 75M shareshttps://www.cnbc.com/2018/05/04/apple-aapl-stock-warren-buffett-is-keeping-shares-above-water.htmlFri, 4 May 2018 15:01:40 +0000https://news.ycombinator.com/item?id=16995048Comments]]>Wikipedia: List of lists of listshttps://en.wikipedia.org/wiki/List_of_lists_of_listsThu, 3 May 2018 17:46:57 +0000https://news.ycombinator.com/item?id=16988081Comments]]>I've spent the last two years building a new email clienthttps://ivelope.com/invite/InviteHNv0914Wed, 2 May 2018 08:48:27 +0000https://news.ycombinator.com/item?id=16975096Comments]]>May 2, 2018 œI am leaving llvm” emailhttp://nondot.org/sabre/2018-05-02-Rafael.htmlSat, 5 May 2018 01:11:21 +0000https://news.ycombinator.com/item?id=16999690Comments]]>Stack Overflow for Teamshttps://stackoverflow.com/teamsThu, 3 May 2018 12:00:02 +0000https://news.ycombinator.com/item?id=16985125Comments]]>Physically stronger Norwegian men are more likely to be marriedhttps://www.sciencedirect.com/science/article/pii/S2352827317302549Wed, 2 May 2018 19:32:22 +0000https://news.ycombinator.com/item?id=16980396Comments]]>Facebook employee fired over bragging about access to user informationhttps://www.reuters.com/article/us-facebook-privacy-firing/facebook-employee-fired-over-bragging-about-access-to-user-information-idUSKBN1I334EThu, 3 May 2018 07:04:35 +0000https://news.ycombinator.com/item?id=16983913Comments]]>Linux System Monitoring with eBPFhttps://www.circonus.com/2018/05/linux-system-monitoring-with-ebpf/Thu, 3 May 2018 15:30:23 +0000https://news.ycombinator.com/item?id=16986873Comments]]>HaxeFlixel 4.4.0https://haxeflixel.com/blog/12-HaxeFlixel-4-4-0/Sat, 5 May 2018 00:57:38 +0000https://news.ycombinator.com/item?id=16999646Comments]]>My OTP 21 Highlightshttp://blog.erlang.org/My-OTP-21-Highlights/Wed, 2 May 2018 17:00:42 +0000https://news.ycombinator.com/item?id=16978934Comments]]>How to send local files to Chromecast with Pythonhttps://rinzewind.org/blog-en/2018/how-to-send-local-files-to-chromecast-with-python.htmlTue, 1 May 2018 22:58:58 +0000https://news.ycombinator.com/item?id=16972526Comments]]>Facebook is launching a dating featurehttps://www.cnbc.com/2018/05/01/facebook-is-launching-a-dating-app.htmlTue, 1 May 2018 17:28:20 +0000https://news.ycombinator.com/item?id=16969189Comments]]>Taking back controlhttps://bitsofsimplicity.com/blog/2018/04/19/taking-back-controlSat, 5 May 2018 00:38:50 +0000https://news.ycombinator.com/item?id=16999566Comments]]>A Brilliant 1895 Novel on the Emptiness of Literary Famehttps://www.newyorker.com/culture/cultural-comment/brilliant-1895-novel-on-the-emptiness-of-literary-fameWed, 2 May 2018 19:46:30 +0000https://news.ycombinator.com/item?id=16980503Comments]]>Over 400 Startups Are Trying to Become the Next Warby Parkerhttps://www.inc.com/magazine/201805/tom-foster/direct-consumer-brands-middleman-warby-parker.htmlFri, 4 May 2018 05:01:03 +0000https://news.ycombinator.com/item?id=16992301Comments]]>A puzzle that tiles infinitely across both sides, based on the Klein Bottlehttps://n-e-r-v-o-u-s.com/blog/?p=7613Tue, 1 May 2018 16:22:55 +0000https://news.ycombinator.com/item?id=16968484Comments]]>Show HN: Instabug for Product Managers “ #1 ProductHunt of the Dayhttps://try.instabug.com/product-managersFri, 4 May 2018 17:00:47 +0000https://news.ycombinator.com/item?id=16996131Comments]]>An Overview of Micron™s Automata Processor (2016) [pdf]https://www.cs.virginia.edu/~skadron/Papers/wang_APoverview_CODES16.pdfThu, 3 May 2018 11:13:21 +0000https://news.ycombinator.com/item?id=16984895Comments]]>Three-day no-meeting schedule for engineershttps://medium.com/@Pinterest_Engineering/three-day-no-meeting-schedule-for-engineers-fca9f857a567Thu, 3 May 2018 12:14:08 +0000https://news.ycombinator.com/item?id=16985228Comments]]>20 Years of Crunch Take Their Toll on a Game Developerhttps://steamed.kotaku.com/he-thought-he-was-done-with-80-hour-workweeks-then-he-1825728038Thu, 3 May 2018 02:14:27 +0000https://news.ycombinator.com/item?id=16982858Comments]]>LaGuardia Airport™s security robot is giving women the creepshttps://nypost.com/2018/05/03/laguardia-airports-security-robot-is-giving-women-the-creeps/Sat, 5 May 2018 11:19:50 +0000https://news.ycombinator.com/item?id=17001339Comments]]>Swift expands continuous integration system to support more platformshttps://swift.org/blog/swift-community-hosted-ci/Thu, 3 May 2018 22:27:28 +0000https://news.ycombinator.com/item?id=16990584Comments]]>C Is Not a Low-Level Languagehttps://queue.acm.org/detail.cfm?id=3212479Tue, 1 May 2018 15:13:35 +0000https://news.ycombinator.com/item?id=16967675Comments]]>Over 30? Too Old for Tech Jobs in Chinahttps://www.bloomberg.com/news/features/2018-05-02/china-s-tech-industry-wants-youth-not-experienceWed, 2 May 2018 16:06:18 +0000https://news.ycombinator.com/item?id=16978342Comments]]>C64 Keyboard Prototypehttp://www.breadbox64.com/blog/c64-keyboard-prototype/Thu, 3 May 2018 15:20:03 +0000https://news.ycombinator.com/item?id=16986784Comments]]>Gaymanhttps://github.com/sthyselzsh/zsh-gaymanFri, 4 May 2018 23:53:21 +0000https://news.ycombinator.com/item?id=16999363Comments]]>YouTube Stars Being Paid to Sell Academic Cheatinghttp://www.bbc.com/news/education-43956001Tue, 1 May 2018 17:21:03 +0000https://news.ycombinator.com/item?id=16969089Comments]]>Magnitude 6.9 Earthquake “ 16km SW of Leilani Estates, Hawaiihttps://earthquake.usgs.gov/earthquakes/eventpage/us1000dyad#executiveFri, 4 May 2018 23:51:39 +0000https://news.ycombinator.com/item?id=16999354Comments]]>Amazon threatens to suspend Signal's AWS account over censorship circumventionhttps://signal.org/blog/looking-back-on-the-front/Tue, 1 May 2018 18:55:01 +0000https://news.ycombinator.com/item?id=16970199Comments]]>Warnings over fresh processor security flawshttp://www.bbc.com/news/technology-44003850Fri, 4 May 2018 23:46:43 +0000https://news.ycombinator.com/item?id=16999337Comments]]>Mus.jshttps://github.com/ineventapp/musjsFri, 4 May 2018 23:42:50 +0000https://news.ycombinator.com/item?id=16999325Comments]]>Waymo van involved in serious collision in Arizonahttps://techcrunch.com/2018/05/04/waymo-van-involved-in-serious-collision-in-arizona/Fri, 4 May 2018 23:38:04 +0000https://news.ycombinator.com/item?id=16999303Comments]]>Grass: a functional grass planting programming languagehttp://www.blue.sky.or.jp/grass/Wed, 2 May 2018 21:59:10 +0000https://news.ycombinator.com/item?id=16981520Comments]]>DigitalOcean Introduces Kubernetes Producthttps://www.digitalocean.com/press/releases/digitalocean-introduces-kubernetes-product/Wed, 2 May 2018 13:10:59 +0000https://news.ycombinator.com/item?id=16976505Comments]]>Google Maps Platformhttps://cloud.google.com/maps-platform/Wed, 2 May 2018 19:05:50 +0000https://news.ycombinator.com/item?id=16980166Comments]]>Show HN: Ping.gy “ An app to connect with people within 1km from youhttps://ping.gyWed, 2 May 2018 07:31:55 +0000https://news.ycombinator.com/item?id=16974877Comments]]>Joint 3D Face Reconstructionhttps://github.com/YadiraF/PRNetWed, 2 May 2018 15:01:28 +0000https://news.ycombinator.com/item?id=16977516Comments]]>Show HN: Million Dollar App “ Games, Camera, Actionhttp://www.milliondollarapp.comFri, 4 May 2018 23:14:27 +0000https://news.ycombinator.com/item?id=16999186Comments]]>GTA V “ Graphics Study (2015)http://www.adriancourreges.com/blog/2015/11/02/gta-v-graphics-study/Wed, 2 May 2018 08:54:25 +0000https://news.ycombinator.com/item?id=16975117Comments]]>Building an Optimistic User Interface in Reacthttps://blog.bitsrc.io/building-an-optimistic-user-interface-in-react-b943656e75e3Thu, 3 May 2018 16:16:47 +0000https://news.ycombinator.com/item?id=16987272Comments]]>Amazon Offers Retailers Discounts to Adopt Payment Systemhttps://www.bloomberg.com/news/articles/2018-05-02/amazon-said-to-offer-retailers-discounts-to-adopt-payment-systemWed, 2 May 2018 19:12:52 +0000https://news.ycombinator.com/item?id=16980214Comments]]>How much does Apple know about me? The answer surprised mehttps://www.usatoday.com/story/tech/talkingtech/2018/05/04/asked-apple-everything-had-me-heres-what-got/558362002/Fri, 4 May 2018 13:02:46 +0000https://news.ycombinator.com/item?id=16994236Comments]]>'Next generation' flaws found on computer processors: magazinehttps://www.reuters.com/article/us-cyber-intel/next-generation-flaws-found-on-computer-processors-magazine-idUSKBN1I42BZFri, 4 May 2018 23:05:08 +0000https://news.ycombinator.com/item?id=16999146Comments]]>The Internals of Postgres “ Concurrency Controlhttp://www.interdb.jp/pg/pgsql05.htmlTue, 1 May 2018 19:39:40 +0000https://news.ycombinator.com/item?id=16970686Comments]]>Travis merges private and open source repositories into one platformhttps://blog.travis-ci.com/2018-05-02-open-source-projects-on-travis-ci-com-with-github-appsWed, 2 May 2018 15:04:39 +0000https://news.ycombinator.com/item?id=16977556Comments]]>Breaking your mind currying functions in rubyhttps://blog.browntreelabs.com/breaking-your-mind-currying-functions-in-ruby/Fri, 4 May 2018 22:52:55 +0000https://news.ycombinator.com/item?id=16999086Comments]]>AI revives in-memory processorshttps://www.eetimes.com/document.asp?doc_id=1333238Wed, 2 May 2018 20:02:58 +0000https://news.ycombinator.com/item?id=16980655Comments]]>Ask HN: Storing millions and billions of URLs?https://news.ycombinator.com/item?id=16997903Fri, 4 May 2018 20:16:08 +0000https://news.ycombinator.com/item?id=16997903Comments]]>GnuTLS and TLS 1.3https://nikmav.blogspot.com/2018/05/gnutls-and-tls-13.htmlFri, 4 May 2018 22:43:33 +0000https://news.ycombinator.com/item?id=16999029Comments]]>Qualcomm to depose Apple services chief Eddy Cuehttps://www.reuters.com/article/us-apple-qualcomm/qualcomm-to-depose-apple-services-chief-eddy-cue-idUSKBN1I52I4Fri, 4 May 2018 22:42:39 +0000https://news.ycombinator.com/item?id=16999023Comments]]>Show HN: SpringZKAuth “ Spring project utilizing zero-knowledge password proofhttps://github.com/maxamel/SpringZKAuthFri, 4 May 2018 14:36:36 +0000https://news.ycombinator.com/item?id=16994873Comments]]>Rancher 2.0 GAhttps://rancher.com/blog/2018/2018-05-01-rancher-ga-announcement-sheng-liang/Wed, 2 May 2018 14:02:20 +0000https://news.ycombinator.com/item?id=16976934Comments]]>A Map of Radical Bewildermenthttps://placesjournal.org/article/a-map-of-radical-bewilderment/Thu, 3 May 2018 00:05:58 +0000https://news.ycombinator.com/item?id=16982228Comments]]>Linux RNG flawshttps://bugs.chromium.org/p/project-zero/issues/detail?id=1559Tue, 1 May 2018 23:50:00 +0000https://news.ycombinator.com/item?id=16972827Comments]]>Air Canada joins WestJet in severing ties with Hopper over 'secret fares' Claimhttp://www.cbc.ca/news/business/westjet-hopper-1.4648493Fri, 4 May 2018 22:33:05 +0000https://news.ycombinator.com/item?id=16998960Comments]]>New Optical Form Factors for 400 Gigabit Ethernethttp://www.lightwaveonline.com/articles/2017/12/surveying-the-new-optical-form-factors-for-400-gigabit-ethernet.htmlWed, 2 May 2018 14:11:05 +0000https://news.ycombinator.com/item?id=16977027Comments]]>Can You Overdose on Happiness?http://nautil.us/issue/60/searches/can-you-overdose-on-happinessThu, 3 May 2018 10:19:38 +0000https://news.ycombinator.com/item?id=16984654Comments]]>My name is Wil Wheaton. I live with chronic Depression, and I am not ashamedhttp://wilwheaton.net/2018/05/my-name-is-wil-wheaton-i-live-with-chronic-depression-and-i-am-not-ashamed/Sat, 5 May 2018 04:22:31 +0000https://news.ycombinator.com/item?id=17000293Comments]]>Towards λ-calculushttp://lambdaway.free.fr/workshop/?view=lambdacode_inside_minTue, 1 May 2018 18:48:37 +0000https://news.ycombinator.com/item?id=16970131Comments]]>A standards-based PDF viewer created using Electron and Pdf.jshttps://github.com/praharshjain/Electron-PDF-Viewer/Thu, 3 May 2018 18:47:27 +0000https://news.ycombinator.com/item?id=16988671Comments]]>Ask HN: Should I œopen source” my projects?https://news.ycombinator.com/item?id=16996126Fri, 4 May 2018 17:00:36 +0000https://news.ycombinator.com/item?id=16996126Comments]]>A Debate Over the Physics of Timehttps://www.quantamagazine.org/a-debate-over-the-physics-of-time-20160719/Fri, 4 May 2018 22:03:11 +0000https://news.ycombinator.com/item?id=16998765Comments]]>Ask HN: Do you have a side project you want to sell (2018)?https://news.ycombinator.com/item?id=16995920Fri, 4 May 2018 16:36:50 +0000https://news.ycombinator.com/item?id=16995920Comments]]>
A struggle that will dictate the future of financial markets is brewing. Long beleaguered Libor is fighting to preserve its status as the premier global benchmark for dollar-based assets just as questions pile up over the credibility of its presumptive heir.
It’s a clash with few equals in financial history. In one corner, the much maligned set of London-based rates that, even after being tainted by rigging scandals, still underpin more than $370 trillion of instruments across various currencies. In the other, a potential successor, conceived over the past four years by the Federal Reserve Bank of New York and the Fed Board of Governors, as well as a who’s who of Wall Street titans, from JPMorgan Chase & Co. and Goldman Sachs Group Inc. to BlackRock Inc.
Replacing the London interbank offered rate “would be the most profound development in financial markets” for years to come, said Ward McCarthy, chief financial economist at Jefferies LLC. But “there are more than $300 trillion of financial assets tied to Libor, and if you’re going to transition from that to something else, that’s $300 trillion of potholes that are potentially coming.”
The timing of the ICE Benchmark Administration’s efforts to resurrect Libor could hardly come at a more critical juncture. Its most high-profile challenger, the Secured Overnight Funding Rate, or SOFR, is under mounting scrutiny after the erroneous inclusion of some transactions in settings marred its debut last month. And with futures tied to the benchmark set to start trading Monday in Chicago, any more damage to its credibility could discourage markets from embracing the upstart reference rate before it gets off the ground.
The Legacy of Libor
It's still used to benchmark over $370 trillion of financial products in five currencies
For decades, Libor provided a reliable way to determine the cost of everything from student loans and mortgages to complex derivatives. It’s calculated from a daily survey of more than 15 large banks that estimate how much it would cost to borrow from each other without putting up collateral. But the trading behind those estimates has dried up, and coupled with the post-crisis discovery of rampant manipulation, regulators felt compelled to take action. Last year, U.K. officials ostensibly signaled an end to the much maligned benchmark, saying they’ll stop compelling banks to submit quotes after 2021.
But IBA parent Intercontinental Exchange Inc., which took over administering Libor from the British Bankers Association in 2014, isn’t willing to just let the reference rate die without a fight. After all, more than $150 trillion of financial assets are tied to the dollar-denominated version alone, and ICE makes money from licensing it out. Over the coming weeks, the company has a plan to strengthen Libor, introducing new procedures for how global banks derive and submit the quotes used to generate the benchmark.
A shift to a so-called waterfall methodology will see firms begin basing submissions on eligible wholesale, unsecured funding transactions. If no eligible transactions are available, banks may use quotes from transactions in the secondary market. If there’s still no viable data available, broker quotes and other market observations can be used in the absence of eligible transactions.
“We are hearing significant feedback from banks and their clients that they would like to see a reformed Libor continue beyond 2021, alongside alternative risk free rates,” said Claire Miller, a spokeswoman for ICE.
Libor's Footprint
More than $150 trillion of financial products are tied to the dollar-based rate
Sources: BIS, Bloomberg, CME, DTCC, Federal Reserve, JPMorgan
It may be too little, too late, however. Amid mounting concerns about the reliability and robustness of the benchmark, regulators the world over started searching for replacements. The Federal Reserve in 2014 set up the Alternative Reference Rates Committee, or ARRC, bringing together representatives from the private sector, regulators and exchanges to identify an alternative to dollar-denominated Libor.
The result was SOFR, a rate that’s designed to be less vulnerable to exploitation, which is based on repurchase agreements -- transactions for overnight loans collateralized by Treasuries.
Libor versus SOFR: the key differences
Whereas Libor relied on the expectations of bankers, SOFR is based on real repurchase agreement transactions compiled by the New York Fed
SOFR is a secured rate, since the repo trades it’s derived from are collateralized, while Libor is unsecured
SOFR is an overnight rate, based specifically on overnight loans. Libor, by contrast, covers maturities ranging from one day to one year
The volume of trading underpinning SOFR is roughly $700-$800 billion daily, versus an estimated $500 million for three-month Libor
Last month SOFR made its long awaited debut. It didn’t go well.
Two weeks into its publication, the New York Fed announced that it had unintentionally included certain repo transactions in the source data used to calculate the rate. The bank investigated the readings after it received feedback from market participants about higher-than-expected transaction volumes underpinning the benchmark.
“The New York Fed was transparent on the issue when it occurred, as well as its implications on the SOFR, which were small,” said Andrew Gray, a spokesman for JPMorgan and co-chair of the ARRC Communication and Outreach Working Group. “This openness should provide comfort to market participants and other stakeholders as we move forward.”
Robust Volumes
Underlying transaction volume for SOFR dwarfs that of Libor
Sources: DTCC Solutions, Fed Board of Governors, FINRA, New York Fed
But the mistake also underscored a laundry list of concerns traders and strategists have raised since launch. Chief among them, the fact that SOFR is based on secured transactions, rather than unsecured, as Libor is. That decision strips out the credit element that served an important market function in hedging and securities pricing, according to McCarthy, making SOFR’s viability as a Libor replacement tenuous from the start.
Beyond that, SOFR appears significantly more volatile than Libor, and more susceptible to price swings tied to Treasury bill issuance as well as month- and quarter-end supply variations. Questions persist over why SOFR continues to print at or above overnight Libor and the Federal Reserve’s interest on excess reserves rate for banks, while some are challenging just how reliable the new reference rate will be in times extreme financial stress.
Last, but not least, is the fact SOFR is an overnight rate that lacks any sort of term structure. Monday’s introduction of monthly and quarterly futures is intended to be the first step in addressing this critical shortcoming. If all goes according to plan, there will be enough market activity to facilitate the creation of additional tenors.
“Libor will go away and we need a rate that hundreds of trillions of dollars of contracts can migrate to, New York Fed President William Dudley said Friday at an event at Bloomberg headquarters in New York. “Eventually we’ll get a term curve for SOFR, and then the heavy lifting will occur, which is when we move the existing set of contracts that we have today that reference Libor onto SOFR.”
No one’s expecting SOFR volumes to challenge Libor-based eurodollar futures -- which see about $100 billion to $300 billion of turnover a day -- or even the lesser traded fed funds complex, anytime soon. For now, trustworthy data is what’s needed most, investors say. Transitioning away from Libor will likely be an arduous process for most, even under the best of circumstances, and another stumble could significantly hamper its reception.
That has many market participants predicting something akin to a draw in the battle for global benchmark supremacy.
“They’re two separate highways, but both need to exist,” said John Coleman, managing director of the fixed-income group at R.J. O’Brien & Associates, a futures brokerage in Chicago. “There has to be a channel for unsecured lending. Libor must continue. Whether it continues as the A-list rate remains to be seen.”
‘Other Options’
Ultimately, the market will determine Libor’s successor. Coleman says a better replacement for the unsecured benchmark would be the average rate from the Federal Home Loan Bank system, where thousands of lenders already transact every day. Another option is Ameribor, the brainchild of Richard Sandor, an economist who pioneered interest-rate futures and derivatives at the Chicago Board of Trade. Ameribor is a new interbank rate that reflects borrowing costs based on the transactions of members of the American Financial Exchange.
Trading volume in Libor-based swaps is already being challenged by activity in contracts based on the overnight fed funds rate, as some companies start using the derivatives for financing activities in preparation for the demise of the ubiquitous reference rate.
In the meantime, the ARRC will keep working with market participants getting ready for life after Libor. ICE will continue rebuilding the fraught reference rate to keep it alive after 2021. And investors will continue searching for the benchmark that works best for them.
“For now Libor is still preferred as it’s the most liquid and deepest set of contracts that we have,” said Chris Sullivan, chief investment officer at the United Nations Federal Credit Union, which manages over $2 billion in U.S. fixed-income assets. “But we will be watching SOFR pretty closely just to see how its received, managed and traded. We want to see how it’s received and what the major risks are with it.”
— With assistance by John Glover, and Liz McCormick
Arriving on the tiny Micronesian island of Yap will fill even the most jaded traveller with a sense of awe. The single daily flight comes in over dense forests, taro swamp, shallow lagoons and a web of mangroves, all surrounded by fringing reef. But the real wonderment doesn’t come from the idyllic scenery, nor from the greeting by a Yapese girl in a traditional hibiscus skirt. It’s when you first come face-to-face with a piece of giant stone money.
Hundreds of these extraordinary, human-sized discs of rock are scattered all over the island; some outside the island’s few hotels, others in rows close to the beach or deep in the forests. Each village even has a stone money bank where pieces that are too heavy to move are displayed on the malal (dancing grounds).
“My family owns five stone money of a good size,” said Falmed (Yapese just use one name), a taxi driver I flagged down to take me to Mangyol stone money bank in Yap’s eastern province of Gagil.
Five, it turns out, is a good haul, since many islanders don’t own any stones.
The unique stone currency has been in use here for several centuries, although no-one is quite certain when the concept began. What is known is that each one is different, and they are as heavy with meaning as they are in volume of limestone, carved and voyaged by the Yapese all the way from Palau, an island nation 400km to the south-west. The very first pieces were used as gifts and shaped like a whale – thus named ‘rai’ stones – but they’ve evolved to become currency, including holes carved through the centre to make them more transportable across the oceans.
“My forefather Falmed, he is the one who started to go to Palau first by canoe, and make this connection between Palau and Yap. So I carry his name,” Falmed told me as we hurtled along dirt roads past the sleepy capital of Colonia. Despite his sun-worn T-shirt and rickety car, his lineage is surprisingly significant. His distant forefather Falmed was a high chief powerful enough to commission a boat to Palau where he met with locals and gained access to a quarry site.
“He came back and called a meeting where he told the village to gather tuba, the local alcohol, to trade,” Falmed said. Within a month, he was back in Palau to start carving the stone as money.
The issue was that Yap had no durable rock or precious metals with which to make coins. Instead, experienced Yapese sailors, commissioned mostly by wealthy high chiefs, would sail to Palau on bamboo rafts, and eventually, schooners, to load up with limestone from their quarries. Initially small, as techniques and tools improved, the coins became even larger than the people who would painstakingly carve them. When metal tools were introduced by European traders in the late 19th Century, quarrying was made easier, and reports from the 1880s claimed 400 Yapese men could be found working in just one quarry in Koror, Palau – a significant proportion of the population, which would have then been about 7,000 in total.
On their return from Palau, the sailors would give the carved stone money to the high chiefs who would gather from different villages to welcome back the sailors and the stones. The chiefs would keep the larger ones and two fifths of the smaller ones. They would also give names to some stones, usually choosing their own name or that of relatives, and confirm the stones as legitimate by giving a value based on an even older currency system: yar (pearl shell money). The stones could then enter circulation and be bought by anyone.
“If the chief says OK, 50 shell money for each stone money, if I have that I will make the trade and own one,” explained Edmund Pasan, a canoe builder from the northern province of Maap.
Today, shell money has been replaced by the almighty US dollar for day-to-day transactions like grocery shopping. But for more conceptual exchanges, like rights or customs, stones remain a vital currency for Yap’s 11,000 residents.
Falmed’s family has only used its money twice, and one was as an apology. “We used it for one of my brothers who made trouble for another family,” Falmed revealed remorsefully. His brother’s marriage had failed. “One of the chiefs, his daughter got one piece of stone money as an apology, and they accepted it. When it comes to high ranks, you have to use stone money.”
When it comes to high ranks, you have to use stone money
The value of stone money has always been fluid, challenging the Western concept that currency value is pre-determined and fixed. The coins are valued by their size – they range from 7cm to 3.6m in diameter – as well as their ornateness and even for the sheer difficulty in obtaining the rock. How much a coin is worth also depends on who you give it to, and what for.
In addition, Yapese factor oral history into each stone’s value, as there’s no written record of what belongs to who. Families rarely move from their villages, and the tribal elders from the around 150 villages pass down information of each piece, meaning they act as a reminder of the past and help to reinforce relationships and transactions that date back to times of warriors and clans. In some cases, the stones have engravings marking battles from more than 200 years ago.
Falmed and I finally arrived at the Mangyol stone money bank after a 40-minute drive from Colonia. From large to small, the few dozen stones were lined up in front of a p'ebay, an open structure in the village centre where the community comes together to do their trade, celebrations and sometimes their schooling too.
Falmed explained that the rai are specifically placed, each encoded with secret connections, village relationships, and stories of marriage, conflicts and deep apologies that have seen the stones change hands over centuries. It’s those stories that only the local villagers know that truly determine which is most valuable. There’s no need to make more rai since the island essentially has a permanent number in circulation, and few are ever moved. Even broken ones retain their oral history that give them more value than a new piece. New pieces are occasionally made, though, simply to ensure the skills of past generations are not forgotten.
It’s those stories that only the local villagers know that truly determine which is most valuable
But if the stones are so valuable and so public, I wondered, what’s to stop someone making their own, or simply stealing one?
“Most matters are common knowledge and secrets among local people are rare; thus theft of rai is relatively unknown,” writes Cora Lee C Gilliland of the Smithsonian Institution in her paper The Stone Money of Yap.
Not that some haven’t attempted it. “They tried to do that in Yap, and they laughed about it because they broke,” Pasan later told me with a chuckle. “Then they did it with the stones in Guam, but they are not that strong and are more difficult to get at – it’s much easier to quarry in Palau.”
Yap’s neighbours, Guam, Palau and Chuuk, are all heavily affected by European and American colonisation, and all bear conspicuous scars of World War II. Guam remains a US territory with a significant military base on the island that has shaped its culture, while Chuuk Lagoon is home to around 60 sunken wrecks, a result of the devastating Operation Hailstone in 1944.
Yap, though, was largely bypassed by US bombing as the early 20th-Century Japanese occupation came to an end, and the rai stone’s sturdiness and longevity seem to represent the long-lasting authenticity of Yapese culture over the centuries.
“In Yapese culture, if something [important] is going on, and there is nothing else suitable to use, then you use stone money,” said Falmed, who has already ensured the next generation retains his wealth by passing one piece to his son at his first-birthday ceremony.
“When my girlfriend was pregnant, we [came here] from Hawaii,” he explained. “On a child’s first birthday, if a clan is of high rank and has some small stone money, they will cut a chicken and drain the blood on the boy’s head to recognise the moment. It’s a gift, and a lot of people came [to the ceremony].”
Falmed’s son is 12 now and lives in Hawaii. But the stone is in his family house in Yap. And even without written record, everyone already knows whose name is on it.
Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.
If you liked this story, sign up for the weekly bbc.com features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Travel, Capital, Culture, Earth and Future, delivered to your inbox every Friday.
In response to a number of users who read my article re: the etymology of the "finger" command, I send mail to Les Earnest, who, according to ARPA RFC742, wrote the original finger command. Here is the reply I got, reproduced with his permission. I think you may find it quite amusing and enlightening.
[In reply to message sent Mon, 19 Feb 90 16:02:17 EST.]
I'm glad that you are enjoying the C3 articles. I need to write another one soon.
Here is a response to your conjectures, mostly regurgitated from an article that I posted on Human-nets in 1985. Feel free to forward it to alt.forklore.computers, or I can post it there if you prefer. I haven't been reading that newsgroup, but a quick look indicates that maybe I should.
Finger was named for the act of pointing. I recall that sometime after it became popular I received a message from a system administrator who thought that it should be renamed so that users would not have to use a "dirty" word. I gave his request all the consideration that it deserved.
I created Finger around 1971 to meet a local need at the Stanford Artifical Intelligence Lab. People generally worked long hours there, often with unpredictable schedules. When you wanted to meet with some group, it was important to know who was there and when the others would likely reappear. It also was important to be able to locate potential volleyball players when you wanted to play, Chinese food freaks when you wanted to eat, and antisocial computer users when it appeared that something strange was happening on the system.
The only tool then available for seeing who was running on our DEC-10 computer was a WHO program that showed IDs and terminal line numbers for people who were logged in. There was no information available on people who were not logged in. I frequently saw people running their fingers down the WHO display saying things like "There's Don and that's Pattie but I don't know when Tom was last seen." or "Who in hell is VVK and where does line 63 go?"
I wrote Finger and developed the supporting database to provide this information in traditional human terms -- real names and places. Because I preferred to talk face to face rather than through the computer or telephone, I put in the feature that tells how long the terminal had been idle, so that I could assess the likelihood that I would find them there if I walked down the hall.
The program was an instant hit. Some people asked for the Plan file feature so that they could explain their absence or how they could be reached at odd times, so I added it. I found it interesting that this feature evolved into a forum for social commentary and amusing observations.
Finger was picked up by a number of other groups with DEC-10 computers that were connected to Arpanet -- software flowed in all directions around the net in those days. It later migrated to Un*x, probably via U.C. Berkeley. Somewhere along the line the idea arose to provide a network Finger service. I don't remember who suggested that but it seemed like a good idea at the time so I stuck it in. Some other anxious people wanted to be able to verify that their mail was delivered to specific addressees, so the Mail feature was also added.
While I was somewhat surprised by the popularity of Finger, it has not been as successful as an earlier program that I invented -- the spelling checker. It too was created to fill a personal need that many others apparently share. We didn't think about commercial development and software protection in those days, but if we had we probably could have made something out of it. On the other hand, I enjoyed the comradery of those gentler times and have no regrets.
We’d love to hear from you, whether you’d like to submit a sound, have an idea for a collaboration or an article, or would simply like to know more about the project.
Please send us a message using the contact form below or email stuart (AT) citiesandmemory (DOT) com:
Submit your sounds
We’d love to have your submissions to Cities and Memory, wherever you are in the world. You can submit sounds directly to our Dropbox accountusing this link.
You can send us a field recording, a reimagined sound or both: submission guidelines are over here.
Email list
Join our email list if you’re interested in taking part in our upcoming, regular sound projects, and get a free album of some of our best sounds.
Social media:
Follow us on Twitter
Follow us on Facebook
Subscribe for the latest sounds
Subscribe to the latest Cities and Memory sounds via our iTunes podcast.
When Elon Musk and his team at SpaceX were looking to make their Falcon 9 rocket even more powerful, they came up with a creative idea — keep the propellant at super-cold temperatures to shrink its size, allowing them to pack more of it into the tanks.
But the approach comes with a major risk, according to some safety experts. At those extreme temperatures, the propellant would need to be loaded just before takeoff — while astronauts are aboard. An accident, or a spark, during this maneuver, known as "load-and-go," could set off an explosion.
The proposal has raised alarms for members of Congress and NASA safety advisers as the agency and SpaceX prepare to launch humans into orbit as early as this year. One watchdog group labeled load-and-go a "potential safety risk." A NASA advisory group warned in a letter that the method was "contrary to booster safety criteria that has been in place for over 50 years."
Concerns at NASA over the astronauts' safety hit a high point when, in September 2016, a SpaceX Falcon 9 rocket blew up while it was being fueled ahead of an engine test. No one was hurt, but the payload, a multimillion-dollar satellite, was lost. The question on many people's minds at NASA instantly became: What if astronauts were on board?
The fueling issue is emerging as a point of tension between the safety-obsessed space agency and the maverick company run by Musk, a tech entrepreneur who is well known for his flair for the dramatic and for pushing boundaries of rocket science.
In this culture clash, SpaceX is the daring, Silicon Valley-style outfit led by a man who literally sells flamethrowers on the Internet and wholeheartedly embraces risk. Musk is reigniting interest in space with acrobatic rocket-booster landings and eye-popping stunts, such as launching a Tesla convertible toward Mars.
His sensibilities have collided with a bureaucratic system at NASA that has been accused of being overly conservative in the wake of two shuttle disasters that killed 14 astronauts.
The concerns from some at NASA are shared by others. John Mulholland, who oversees Boeing's contract to fly astronauts to the International Space Station and once worked on the space shuttle, said load-and-go fueling was rejected by NASA in the past because "we never could get comfortable with the safety risks that you would take with that approach. When you're loading densified propellants, it is not an inherently stable situation."
SpaceX supporters say tradition and old ways of thinking can be the enemy of innovation and thwart efforts to open the frontier of space.
Greg Autry, a business professor at the University of Southern California, said the load-and-go procedures were a heated issue when he served on Trump's NASA transition team.
"NASA is supposed to be a risk-taking organization," he said. "But every time we would mention accepting risk in human spaceflight, the NASA people would say, 'But, oh, you have to remember the scar tissue' — and they were talking about the two shuttle disasters. They seemed to have become victims of the past and unwilling to try anything new, because of that scar tissue."
In a recent speech, Robert Lightfoot, the former acting NASA administrator, lamented in candid terms how the agency, with society as a whole, has become too risk-averse. He charged the agency with recapturing some of the youthful swagger that sent men to the moon during the Apollo era.
"I worry, to be perfectly honest, if we would have ever launched Apollo in our environment here today," he said during a speech at the Space Symposium last month, "if Buzz [Aldrin] and Neil [Armstrong] would have ever been able to go to the moon in the risk environment we have today."
NASA is requiring SpaceX and Boeing to meet a requirement that involves some complicated calculations: The chance of death can be no greater than 1 in every 270 flights.
One way to ensure that, as Lightfoot said during his speech, is to never fly: "The safest place to be is on the ground."
Still, the scar tissue runs deep.
NASA lost 14 astronauts in two space-shuttle disasters, the result of deep systematic problems of a once young and swashbuckling agency that many said had grown sclerotic.
In the investigation into the 2003 disaster, the Columbia Accident Investigation Board blasted NASA for failing to learn "the bitter lessons" from the Challenger explosion in 1986. Columbia was lost as much by a "broken safety culture" as much as the chunk of foam that broke off and damaged the shuttle's heat shield. That second disaster helped lead to the retirement of the shuttle in 2011, leaving NASA in the position of being unable to fly astronauts from U.S. soil.
Instead, NASA pays Russia to ferry its astronauts to the International Space Station, an arrangement that costs the agency millions. In 2006, Russia charged $21.3 million a seat. That jumped to $81.9 million by 2015.
To end the dependence on Russia, NASA has turned to the private sector, outsourcing the responsibility of flying astronauts to the space station to two companies — SpaceX and Boeing — that have been awarded $6.8 billion in contracts combined. Other private companies eventually could compete for other government launch contracts — including Blue Origin, which was founded by Washington Post owner Jeff Bezos — but none are expected to send people to the space station anytime soon.
The pivot to private companies is enabling NASA to focus on deep space. But SpaceX and Boeing have both faced challenges and delays. Now, as the drought in human spaceflight extends into its seventh year, NASA is facing the prospect of even more delays — and questions about whether the contractors it plans to rely on will have a better track record than the agency that put men on the moon.
"It really is a very, very difficult problem to do human spaceflight," said Phil McAlister, the director of NASA's commercial spaceflight development division. "You've got thousands of pounds of really highly energetic propellants on board. You've got mini controlled explosions going off. You've got to survive the rigors of space, which is not very friendly for the human body. And then you've got to reenter the atmosphere, and the spacecraft gets heated up to thousands of degrees."
SpaceX pulled off 18 successful launches last year, a record, and is aiming for more this year. But it has also lost two of its Falcon 9 rockets in explosions, and amid all its triumphs, it has never attempted flying humans.
The first failure happened in 2015, when a rocket blew up a couple of minutes after liftoff as it was flying cargo and supplies to the space station. No one was on board, and no one was injured. Then, just over a year later, another rocket exploded, this time on the launchpad while being fueled ahead of an engine test.
At the time, Musk declared that if crews had been aboard they would have been safely ferried away by the rocket's abort system. Still, that mishap is forcing the company to redesign bottles of pressurized helium that sit inside the rocket's fuel tanks.
Now SpaceX is getting ready to fly astronauts on an upgraded version of the same rocket. And its decision to add propellant to the rocket with astronauts on board is attracting scrutiny.
To get more power out of its rocket, SpaceX brings its propellants — liquid oxygen and refined kerosene — to unusually low temperatures. That causes them to become dense, meaning SpaceX can pack more fuel into its rockets.
To SpaceX, the approach is another example of how it is breaking the mold. The densified propellant "provides greater propellant margin for increased reliability," the company said in a statement. In other words, should something go wrong on the mission, the rocket would have more propellant to adjust to emergencies. SpaceX's dramatic booster landings also require additional propellant.
But to others it is an unnecessary risk. At a Capitol Hill hearing earlier this year, members of Congress pressed Hans Koenigsmann, SpaceX's vice president for build and flight reliability, about the safety of the load-and-go procedure.
Koenigsmann said that the fueling takes only about a half-hour, a "relatively quick procedure, and we believe that this exposure time is the shortest and therefore the safest approach."
And the company points out that if anything goes wrong during fueling, the rocket's launch abort system would allow the astronauts to escape safely. It also conducts a "static fire," a quick test firing of the engines in the days leading up to the launch to make sure the rocket is operating properly.
And since its rockets and its Dragon spacecraft are reusable, the company gets to inspect them after each flight, giving it an in-depth understanding of how the vehicles perform.
"As with all hazard analyses across the entire system and operations, controls against those hazards have been identified, and will be implemented and carefully verified prior to certification," the company said in a statement.
But in a 2015 letter to NASA, Thomas Stafford, a retired Air Force lieutenant general and then chairman of the agency's space-station advisory committee, wrote that "there is a unanimous, and strong, feeling by the committee that scheduling the crew to be on board the Dragon spacecraft prior to loading oxidizer into the rocket is contrary to booster safety criteria that has been in place for over 50 years, both in this country and internationally."
At the hearing this year, William Gerstenmaier, NASA's associate administrator for human exploration and operations, said the agency had not decided whether it would allow SpaceX to load crews before loading the fuel, but he did not rule it out.
He vowed that the agency would "make sure that we're really, really safe to go fly, and the system is ready for crew before we put them on board."
In an interview, Lightfoot, the former acting NASA administrator, said the agency is in deep discussions with SpaceX about the safest way to go. The agency has a long history with SpaceX, first hiring it to fly cargo to the station and now looking for it to send humans into space.
"It's a matter of having a good risk discussion so that we understand that," he said. "I would just say that instead of working it in the press, we work in the engineering review boards."
For all its push-the-envelope swagger, SpaceX says it is serious about flying people safely and is going to great lengths to study every aspect of the vehicle, down to individual valves, so that it will meet and surpass the 1-in-270 chance-of-death metric, said Benji Reed, the director of SpaceX's commercial crew program.
When Reed was down at Cape Canaveral, Florida, on a recent trip, he came across a room on a special tour where the astronauts' families from the shuttle program used to wait ahead of the rocket launch.
They were stunned to see that a whiteboard with drawings made by the children of the crew lost in the 2003 Columbia disaster was still there, preserved.
"That really drives it home," Reed said. "This isn't just the people that we're flying — these are all of their families. So we take this extremely seriously, and we understand that our job is to fly people safely and bring them back safely. To do that you have to humanize it. You have to see them as your friends and as your colleagues."
But even with some of the best engineering minds at NASA, calculating risk is an imperfect science. There are too many unknowns in systems that are inherently dangerous and complex.
"Even identifying all of the risks is impossible," Gerstenmaier said during a speech last year. "Also, risk cannot be boiled down to a single statistic."
Before the very first shuttle flight, NASA estimated that the chance of death was between 1 in 500 and 1 in 5,000. Later, after the agency had compiled data from shuttle flights, it went back and came up with a very different number.
There is so many bookmarking tools, why creating another one?
Sometimes I get a link to interesting article and I'd like to find what people think about it.
To do this I add it to RefJar, it's scanning Reddit and HackerNews to find all discussions about it and I can read them.
I can group links into lists, make them public and send them to my friends
How to use it?
Drag this link - Jar It
- to your bookmarks toolbar. Whenever you want to bookmark a page with Refjar just click it.
For many, Chrome is more than a browser—it’s also a TV, phone, radio, and jukebox for the wide range of media experiences the web has to offer. And when you hit your favorite pump-up playlist, you want to get right to it instead of having to hit “play” every time.
At the same time, you probably don’t like it when you click on a link, land on a website, and it automatically plays sound that you weren’t expecting. In fact, in Chrome a significant number of autoplays are paused, muted, or have their tab closed within six seconds by people who don’t want them. That’s why we’re announcing a new policy on Chrome desktop to block unwanted autoplays.
Chrome does this by learning your preferences. If you don’t have browsing history, Chrome allows autoplay for over 1,000 sites where we see that the highest percentage of visitors play media with sound. As you browse the web, that list changes as Chrome learns and enables autoplay on sites where you play media with sound during most of your visits, and disables it on sites where you don’t. This way, Chrome gives you a personalized, predictable browsing experience.
As you teach Chrome, you may find that you need to click “play” every now and then, but overall the new policy blocks about half of unwanted autoplays, so you will have fewer surprises and less unwanted noise when you first arrive at a website. The policy is enabled in the latest version of Chrome—update today and try it out.
Workers for SunPower Corp. install solar panels on the roofs new houses at KB Home’s Terramore development in Riverside County. Solar systems like these will become standard by 2020 on virtually all new California homes under a proposed new energy code up for review in Sacramento on May 9. (Photo by Will Lester- The Press-Enterprise/SCNG)
A hawk surveys the installation of solar panels at KB Home’s Terramore development south of Corona. Panels like these would be required for virtually all California homes by 2020 under a proposed new building code. “It may not be full zero net energy, but we have left the rest of the country in the dust,” said Bob Raymer, technical director for the California Building Industry Association. (Photo by Will Lester- The Press-Enterprise/SCNG)
Sound
The gallery will resume inseconds
Tiles await installation atop a new house in KB Home’s Terramore development in Riverside County while a SunPower Corp. employee installs new solar panels there. Many builders like KB Home have been offering solar packages for years. But solar would become standard by 2020 under energy provisions up for a vote in Sacramento on May 9. KB Home estimates it has built 6,000 “ZeroHomes” since 2012. (Photo by Will Lester- The Press-Enterprise/SCNG)
A SunPower employee completes installation of solar panels at KB Home’s Terramore development in western Riverside County. Solar systems like this would become standard at new homes throughout California if state officials adopt proposed new energy standards. “California is about to take a quantum leap in energy standards,” said Bob Raymer, senior engineer for the California Building Industry Association. (Photo by Will Lester- The Press-Enterprise/SCNG)
A SunPower employee installs rooftop solar panels on a new house under construction in KB Home’s Terramore development near the 15 freeway south of Corona. California is on the verge of becoming the first state in the nation mandating solar power be included in all new homes built after Jan. 1, 2020. “Innovations and sustainability has been at the heart of our business for many years,” said Jacob Atalla, KB Home’s vice president of sustainability initiatives. (Photo by Will Lester- The Press-Enterprise/SCNG)
Wearing a safety tether, a SunPower worker attaches wiring to a newly installed solar panel at a KB Home development in Riverside County. Homes like these already meet proposed state energy standards mandating virtually all new houses, condos and apartments up to three stories tall have solar power starting in 2020. A building industry official estimates that 20 perent or fewer new California houses now have solar. New standards adopted over the past eight years also increased the energy efficiency of California homes. (Photo by Will Lester- The Press-Enterprise/SCNG)
A worker sets a final photovoltaic panel in place atop a house in KB Home’s Caraway at Terramore development south of Corona. Virtually all new homes in California will have to have similar “PV” panels starting in 2020 under proposed rules state energy officials are expected to approve May 9. “It’s no surprise for us,” said Jacob Atalla, KB Home’s vice president of sustainability initiatives. State officials, Atalla said, “have been preparing for it for several years by ramping up the (building) code.” (Photo by Will Lester- The Press-Enterprise/SCNG)
SunPower workers install solar panels on the roofs of homes under construction at KB Home’s Terramore development south of Corona. Although state energy officials seek to mandate solar on virtually all new California homes starting in 2020, the state is backing away from a 10-year-old goal of making all new homes “net zero,” meaning they would generate as much energy as they consume. Net zero doesn’t focus on the need to reduce fossil fuel emissions, state officials said. “The next frontier should be near-zero net emissions rather than zero net energy, said Pierre Delforge, energy efficiency program director at the Natural Resources Defense Council. (Photo by Will Lester- The Press-Enterprise/SCNG)
Fewer solar panels will be required on new California homes by 2020 than originally planned under a proposed new building code. The state has abandoned the goal of making all new homes “zero net energy” by 2020, partly because it’s not cost-effective and partly because zero net energy is at odds with goals to reduce fossil fuel emissions. “Zero-net energy isn’t enough,” said Andrew McAllister, one of five state energy commissioners voting May 9 on new homebuilding energy standards mandating solar on new homes by 2020. (Photo by Will Lester- The Press-Enterprise/SCNG)
High atop a new house in KB Home’s Terramore development in Riverside County, a SunPower worker readies another solar panel for installation. The California Energy Commission is scheduled to vote May 9 on new standards mandating that virtually all new California homes have solar systems by 2020. But the state is abandoning a long-term goal of making homes “net zero.” Said KB Home sustainability Vice President Jacob Atalla: “You’ve got to start treating (solar) less as a luxury and more as a commodity.” (Photo by Will Lester- The Press-Enterprise/SCNG)
A SunPower employee completes installation of solar panels at KB Home’s Terramore development in Riverside County. Solar systems like this would become standard at new homes throughout California if state officials adopt proposed new energy standards. “California is about to take a quantum leap in energy standards,” said Bob Raymer, technical director for the California Building Industry Association. (Photo by Will Lester- The Press-Enterprise/SCNG)
A worker with SunPower Corp. installs solar panels on the roof of a house in KB Home’s Caraway at Terramore development south of Corona. State energy officials are expected to adopt new building standards making California the first state in the nation to mandate solar be installed on most new homes built in the state starting in 2020. (Photo by Will Lester- The Press-Enterprise/SCNG)
Photovoltaic panels like these would become standard on new California homes starting in 2020 under a proposed new energy code up for review in Sacramento on May 9. Currently about 15 percent to 20 percent of new houses in the state have solar power systems, a state building industry officials said. Here a SunPower Corp. employee finishes up installation of new solar panels at KB Home’s Terramore development in Riverside County. (Photo by Will Lester- The Press-Enterprise/SCNG)
Photovoltaic panels like these would become standard on new California homes starting in 2020 under a proposed new energy code up for review in Sacramento on May 9. Currently about 15 percent to 20 percent of new houses in the state have solar power systems, a state building industry officials said. Here a SunPower Corp. employee finishes up installation of new solar panels at KB Home’s Terramore development in Riverside County. (Photo by Will Lester- The Press-Enterprise/SCNG)
Proposed new energy standards up for review May 9 in Sacramento would mandate solar panels like these be installed on virtually all new California homes by 2020. However, the state is abandoning a long-term goal of requiring all new homes achieve “net zero” status, partly because it’s not cost-effective and partly because the goal is at odds with the need to reduce fossil fuel emissions, state officials said. “Net energy metering” rules also don’t require utilities to compensate customers for extra solar power generated to offset natural gas used in the home. (Photo by Will Lester- The Press-Enterprise/SCNG)
Photovoltaic panels like these would become standard on new California homes starting in 2020 under a proposed new energy code up for review in Sacramento on May 9. Currently about 15 percent to 20 percent of new houses in the state have solar power systems, a state building industry officials said. Here a SunPower Corp. employee finishes up installation of new solar panels at KB Home’s Terramore development in Riverside County. (Photo by Will Lester- The Press-Enterprise/SCNG)
Workers install solar panels at KB Home’s Caraway at Terramore housing development. The company has built about 6,000 “ZeroHomes,” most of them in California over the past six years. That represents about 12 percent of all KB Home residences sold. The California Energy Commission is expected to vote on May 6 on new standards mandating virtually all homes built in the state have solar panels starting in 2020. (Photo by Will Lester- The Press-Enterprise/SCNG)
For seven years, a handful of homebuilders offered solar as an optional item to buyers willing to pay extra to go green.
Now, California is on the verge of making solar standard on virtually every new home built in the Golden State.
The California Energy Commission is scheduled to vote Wednesday, May 9, on new energy standards mandating most new homes have solar panels starting in 2020.
If approved as expected, solar installations on new homes will skyrocket.
Just 15 percent to 20 percent of new single-family homes built include solar, according to Bob Raymer, technical director for the California Building Industry Association.
“California is about to take a quantum leap in energy standards,” Raymer said. “No other state in the nation mandates solar, and we are about to take that leap.”
The proposed new rules would deviate slightly from another much-heralded objective: Requiring all new homes be “net-zero,” meaning they would produce enough solar power to offset all electricity and natural gas consumed over the course of a year.
New thinking has made that goal obsolete, state officials say. True “zero-net-energy” homes still rely on the electric power grid at night, they explained, a time when more generating plants come online using fossil fuels to generate power.
“Zero net energy isn’t enough,” said Andrew McAllister, one of five state energy commissioners voting on the new homebuilding standards. “If we pursue (zero net energy) as a comprehensive policy, we’d be making investments that would be somewhat out of touch with our long-term goals.”
While environmentalists and homebuilders praised the new standards, the proposed rules have some detractors who still support net-zero goals.
“We’re happy they’re making good progress,” said Kelly Knutsen, technology advancement director for the California Solar and Storage Association, a solar-industry group. “We wish they would go further. There’s always compromises.”
All-electric homes
In addition to widespread adoption of solar power, the new provisions include a push to increase battery storage and increase reliance on electricity over natural gas. Among the highlights:
The new solar mandate would apply to all houses, condos and apartment buildings up to three stories tall that obtain building permits after Jan. 1, 2020.
Exceptions or alternatives will be allowed when homes are shaded by trees or buildings or when the home’s roofs are too small to accommodate solar panels.
Solar arrays can be smaller because homes won’t have to achieve true net-zero status.
Builders installing batteries like the Tesla Powerwall would get “compliance credits,” allowing them to further reduce the size of the solar system.
Provisions will encourage more electric use or even all-electric homes to reduce natural gas consumption. State officials say improved technology is making electric water heaters increasingly cost-effective.
The mandate dates back to 2007 when the state energy commission adopted the goal of making homebuilding so efficient “newly constructed buildings can be net zero energy by 2020 for residences and by 2030 for commercial buildings.”
Builders would prefer the state move slower in imposing the solar mandate, but most nonetheless should be prepared by mid-2020, said the Building Industry Association’s Raymer.
Meritage Homes currently installs solar on about 10 percent of its homes, and about 1 percent of them are net zero, a company official said. A KB Home official said his firm has built more than 6,000 solar homes in the past seven years, mostly in California. That’s 12 percent of the 49,600 homes KB Home sold in that period.
The new energy standards add about $25,000 to $30,000 to the construction costs compared with homes built to the 2006 code, said C.R. Herro, Meritage’s vice president of environmental affairs. Solar accounts for about $14,000 to $16,000 of that cost, with increased insulation and more efficient windows, appliances, lighting and heating accounting for another $10,000 to $15,000.
But that $25,000 to $30,000 will result in $50,000 to $60,000 in the owner’s reduced operating costs over the 25-year life of the home’s solar system, Herro said.
Bill Watt, a homebuilder and design consultant, said those added costs – on top of other building mandates like fire sprinklers – are pushing home prices further out of reach for many buyers.
“We’re not building enough housing already,” said Watt, former president of the Orange County Building Industry Association. “Why not just pause for a little while, focus on the affordability and housing issues, then circle back?”
Environmentalists, however, praised the new standards.
“The technology is developing so fast, we think the timeline was a bit slow,” said Kathryn Phillips, director of Sierra Club California.
Pierre Delforge, energy efficiency program director at the Natural Resources Defense Council, called the proposed update “another important step toward the environmentally-friendly, healthy and affordable home of the future.”
Why not zero?
While net-zero remains an admirable goal, getting there is not yet cost-effective, state officials and experts said. And it fails to address the state’s ultimate goal of curbing global warming.
Because electric utilities now rely on renewable energy for much of their power, daytime energy already is quite clean, said McAllister, the lead state commissioner on energy efficiency.
At night when there’s no solar power, people come home, turn on the lights, the TV and possibly the air conditioning and start pulling power from the grid, he said. Some gas-powered generating plants then are fired up to help meet that additional load, boosting carbon emissions.
“That additional (home-generated) solar kilowatt-hour isn’t worth very much because it’s displacing what is already clean energy,” McAllister said. “That net-zero home is not a net-carbon-zero home.”
Every time you deploy a piece of software, you’re unknowingly taking an infant on a crazy ride — you expect the deployed software to become an adult as soon as it hits all app servers — it works sometimes and sometimes it doesn’t.
Deployments are a central theme for any organisation. At GO-JEK, our deployments are completely automated. As of today, we can’t deploy a single service manually; the services complexities and inter-service communication is so complicated, it’s better for machines to sort that out for us. But even though we have completely automated deployment and we gear towards extreme automation, we still forget few things. “Deployment at wish” is main-stream, and hence the famous quote “with great power, comes great responsibility”. We modified it a bit ;)
“Great flexibility comes with great caution, then comes great power, and thus followed by great responsibility”
I tweeted about it a few weeks ago, and people asked about my checklist and why? Well, what can this checklist be apart from database changes? And why would you have a deployment checklist when everything is automated? There are two reasons for us to have some sort of sanity in our crazy world of pair programming, TDD and extreme hands on requirements.
We don’t restrict a deployment trigger to specific people. As soon as you are done, go ahead.
But sometimes multiple commits go to a single deploy. If we do deploy after few builds, we’ll have changes piled up and it’s easy for someone to omit the cache update change or some config change required by the previous build, which hasn’t been deployed yet. And this bundles up the present build. Well, we aren’t crazy all the time, and we try not to deploy during high traffic time. Sometimes within those two or three hours, we might end up with 2, 3 or even 5 builds, because developers are committing their daily work.
Given this, we started experiencing stupid mistakes, and every time we went “oh sh*t, why didn’t we think about that?” — When you have these “Oh sh*t” moments more than 2 times are per week, it was time for us to rethink the whole process.
GO-JEK is a classic product engineering org. We don’t believe in processes and hierarchies — they stay in CEOs offices and don’t ever see the light of the day. Introducing draconian approval processes goes against our very culture, but we also wanted to make sure we are far more disciplined.
“Forced practices are like the food you don’t like, but you are made to eat it, that kind of takes out whole fun of having food”
The same goes with developers/engineers. If they don’t like it, they will start delaying deployments — and I have experienced enough horror stories about monthly deploys.
So we came up with simple rule — here is a checklist, go answer all the questions in it — like a 15 minutes exam, file a deployment ticket, we will go over it and you will have a green signal to push the button. If your deploy fails, promptly follow up with RCA for that failure, and after reading RCA*, I would silently go and add that missing check into our deployment checklist. And once you fail a build, then every team member in your team has to do deployments and go through the deployment checklist.
Before we introduced checklist, we used to have around 80% success on our deployments; not because software was faulty, but because we forgot some small things — usually when two or three builds are combined.
But once the checklist was introduced, the results were astonishing. Across 300+ micro-services and some ~2500+ deploys a month, we have a maximum of 6 to 7 failures, compared to the earlier 75% success rate. We have now moved to have a 99.99% deployment success rate.
I am not going to put the entire checklist here, because this varies from business to business. But I would like to put a rough outline. Hope this helps.
I've found it was particularly hard to demystify the various kinds of IO that are now offered to software programmers. There is a lot of confusion out there about what are the differences between blocking, non-blocking, multiplexed and async IO. So I thought I'd give a shot at clarifying what each of these kind of IO entails.
In Hardware
On modern operating systems, IO, for input/output, is a way for data to be exchanged with peripherals. This includes reading or writing to disk, or SSD, sending or receiving data over the network, displaying data to the monitor, receiving keyboard and mouse input, etc.
The ways in which modern operating systems communicate with peripherals depends on the specific type of peripherals and their firmware and hardware capabilities. In general, you can assume that the peripherals are quite advanced, and they can handle multiple concurrent requests to write or read data. That is, gone are the days of serial communication. In that sense, all communications between the CPU and peripherals is therefore asynchronous at a hardware level.
This asynchronous mechanism is called hardware interrupt. Think of the simple case, where the CPU would ask the peripheral to read something, and it would then go in an infinite loop, where each time it would check with the peripheral if the data is now available for it to consume, looping until the peripheral gives it the data. This method is known as polling, since the CPU needs to keep checking on the peripheral. On modern hardware, what happens instead is that the CPU asks the peripheral to perform an action, and then forgets about it, continuing to process other CPU instructions. Once the peripheral is done, it will signal the CPU through a circuit interrupt. This happens in hardware, and makes it so the CPU never waits or checks on the peripheral, thus freeing it to perform other work, until the peripheral itself says it's done.
In Software
So now that we have an understanding of what happens in hardware, we can move on to the software side. This is where the IO is exposed in various kinds, such as blocking, non-blocking, multiplexed and async. Lets go over them one by one.
Blocking
Remember how a user program runs inside a process, and code is executed within the context of a thread? This is always the case, and thus say you are writing a program that needs to read from a file. With blocking IO, what you do is ask the operating system, from your thread, to put your thread to sleep, and wake it up only once the data from the file is available to be consumed by your thread.
That is, blocking IO is called blocking because the thread which uses it will block and sleep until the IO is done.
Non-blocking
The problem with blocking IO is that your thread is sleeping until the IO is done, and thus, it can't do anything else while it's waiting for the IO. Sometimes, there's nothing else your program could be doing, but if there was, it would be nice to be able to do that work concurrently, as it waits for the IO.
One way to do that is with was is called non-blocking IO. The idea is that when you make the call to read the file, instead of putting your thread to sleep, the OS simply returns to you either the file's content that it read, or a pending status that tells you the IO is not done. It will not block your thread, but it's still your job to check back at a later time to see if the IO is done. This means you are free to branch on the pending status, and go perform some other work, and when you need the IO again, you can call read for it once more, at which point if the IO is done, it will return the file's content, otherwise it will once again return a pending status, and you can again choose to go perform some other work.
Multiplexed
The problem with non-blocking IO is that it gets strange if the other work that you want to be doing while waiting for the IO is itself more IO.
In a good scenario, you ask the OS to read content from file A, and then you go perform some heavy computation, once you're done, you check if file A is done reading, if so, you do whatever you needed that file's content for, otherwise, you go do some more heavy processing, rinse and repeat. But in the bad scenario, you don't have heavy processing to do, in fact, you want to read file A, and you also want to read file B. So while you wait for file A's IO, you make a non-blocking call to read file B's. Now what will you do while waiting for both? There's nothing for you left to do, so your program has to go into an infinite polling loop, where you keep checking if A is done, and then if B is done, over and over. This will either consume the CPU simply to poll for the status of your non-blocking IO calls, or you'll have to manually add some arbitrary sleep time, meaning that you'll probably realize the IO is ready a little after it really was, slowing your program's throughput.
To avoid this problem, you can use multiplexed IO instead. What this does is that you will once again block on the IO, but instead of blocking on a single IO operation to be done and then the other, you are able to queue up all the IO operations you need done, and then block on all of them. The OS will wake you up when any one of them is done. Some implementations of multiplexed IO allow even more control, where you can specify that you want to be woken up only if some specified set of IO operations are done, like when file A and C or file B and D are done.
So you would make a non-blocking call to read file A, and then a non-blocking call to read file B, and finally you will tell the OS, put my thread to sleep, and wake it up when A and B's IO are both done, or when anyone of them is done.
Async
The problem with multiplexed IO is that you're still sleeping until IO is ready for you to handle. Once again, for many program that's fine, maybe you have nothing else to be doing while you wait for IO operations to be done. Sometimes though, you do have other things you could be doing. Maybe you're computing the digits of PI, while also summing up the values in a bunch of files. What you'd like to do is queue up all your file reads, and while you wait for them to be read, you would compute digits of PI. When a file is done reading, you'd sum up its values, and then go back to computing more digits of PI until another file is done reading.
For this to work, you will need a way for your digits of PI computation to be interrupted by the IO as it completes, and you'd need the IO to perform the interrupt when it completes.
This is done through event callbacks. The call to perform a read takes a callback, and returns immediately. On the IO completing, the OS will suspend your thread, and execute your callback. Once the callback is done executing, it will resume your thread.
Multi-threaded vs Single Threaded?
You'd have noticed that all kinds of IO that I described only speak of one single thread, which is your main application thread. The truth is, IO does not require a thread to be performed, because as I explained in the beginning, the peripherals all perform the IO asynchronously within their own circuitry. Thus it's possible to do blocking, non-blocking, multiplexed and async IO all within a single threaded model. Which is why concurrent IO can work without multi-threaded support.
Now, the processing that is done on the result of the IO operations, or which is requesting the IO operations can obviously be multi-threaded if you need it to be. This allows you to have concurrent computation on top of concurrent IO. So nothing prevents mixing multi-threaded and these IO mechanisms.
In fact, there is a very popular fifth kind of IO which does depend on multi-threading. It is often confusingly referred to as non-blocking IO or async IO also, because it presents itself with a similar interface as one or the other. In truth, it is faking true non-blocking or async IO. The way it works is simple, it uses blocking IO, but each blocking call is made in its own thread. Now depending on the implementation, it either takes a callback, or uses a polling model, like returning a Future.
In Closing
I hope this has clarified your understanding of the various kinds of IO. It's important to keep in mind that these are not all supported by all operating systems and for all peripherals. Similarly, not all programming languages expose an API for all kinds of IO the operating system supports.
I am not a system level programmer, and so I'm not an expert on all kinds of IO operating systems offer. This post is my best effort to sum up what I know, which I would say is probably intermediate level knowledge. Thus please correct me in the comments if you find that anything here is wrong.
A few months ago, I stumbled into the little cottage industry of media manipulation. I weaseled my way into international publication, collected accolades left and right, then moonwalked out. I wish I could credit all of it to cunning, but this is just another story of an idiot hero. It’s a convoluted story, so best to start at the very beginning.
The New Yorker is a literary lifestyle magazine founded in 1925. It focuses on a kind of snooty cosmopolitan sophistication that I, as an overly self-aware and anxious Brooklynite, eat up like candy. The magazine publishes a fine mix of short fiction and longform journalism, and stays loyal to its namesake by covering the goings-on in New York. Yet out of everything they publish, most are familiar with the cartoons. The irony is deep. Renowned for its prim words, we flip through The New Yorker to look at its screwball pictures.
Just in case you’re unfamiliar: the cartoons are typically a black-and-white illustration of two people in a bizarre situation speaking to each other.
Typeset underneath the drawing is a wry caption that undercuts the wackiness of the picture. Like so:
While the illustrations are great, the captions are the hook. There’s an overwhelming urge to rewrite the text, kind of like how advertising in public spaces inspires graffiti. It begs to be defiled, especially since it seems like it would really piss off the magazine.
But that simply isn’t the case: the staff encourages this kind of behavior. Each issue has a caption contest to find the best match for a lonely illustration. This invitation, of course, becomes an opportunity for impishness. There is a seedy underbelly of prospective New Yorker caption writers, and they have been working for years to define the ultimate caption, one that works for all New Yorker cartoons, ever.
Their efforts have delivered two famous über-captions. First, there is the descriptive, “What a misunderstanding!” by artist Cory Arcangel. Next, the suitably dry, “Christ, what an asshole!” by Charles Lavoie. Some other wooden options linger around the internet, but they lack the humor and timeliness of a great New Yorker caption. The über-captions on record are blissfully unaware of selfie sticks. They have no ennui about our hyper-connected society, no opinion of Drake. Clearly, we can do better.
I gave this situation about twelve seconds of thought, and stumbled upon a universal caption of my own. And, like any thought that takes twelve seconds to think, I put it on Twitter. Here it is:
If you’re laughing, you know of LinkedIn and its emails. If you haven’t heard of LinkedIn, you’re lucky. Just know this is the subject of an email many people get daily. It’s dubious in value, allowing the lazy, exploitative people you want to speak to the least to take up the most amount of space in your inbox. It is brazen idiocy that won’t quit.
Anywho, folks demanded evidence to back up my idea, so I did what any self-respecting designer would do: I dusted off my copy of Photoshop and got to work.
Of course, nonsense loves company, so folks sent me some examples of their own. This is one of my favorites:
All in all, a very good day of internetting. But, there’s more, and this is where things get wild.
Later that afternoon, Robinson Meyer, a writer at The Atlantic, sees my tweets, and decides he’d like to write a blog post about my dumb idea. And how could he not? Media organizations love pot shots against other media organizations. So, later that day, I found myself on The Atlantic website:
Best of all, Meyer wraps up the article by saying: “You’re a hero, Frank.”
Whoa. I don’t have a LinkedIn account, but if I did, you bet your ass that’d go on there. Just think of it:
(This is what a LinkedIn profile looks like, right?)
The cartoons kept moving. They were picked up by Slate. And then HuffPo. And then Time. It went viral. I don’t remember the exact number of shares and hits from Facebook and Twitter, but it is a number that seems to resemble the GDP of a small Micronesian nation. Everyone was apparently very bored at work that day. People were telling me that their dad shared the cartoons on Facebook, and before they weren’t sure if he knew of the magazine. Dear reader, we have infiltrated Dad Facebook.
LinkedIn’s ears must have been burning. Even they got in on the game:
Brands gotta brand, I suppose.
A brief aside: Many online publications have quotas for their writers, sometimes up to 10 posts per day. What does this mean? There is very little time for original writing, so staff spend most of their day rewriting the interesting posts they find elsewhere. No rewrite is ever complete, though. Small elements of language stay intact, and they can act as tracer cells which track the lineage of content.
In Robinson’s article, the tracer cell was his hyperbolic compliment. Remember? “You’re a hero, Frank.”
That sentiment stayed preserved, yet modified on Slate. Internet hero!
Might as well add that to the resume, too.
Oh, and Time beefed it up a little bit. GENIUS!
Of course that’s going in, too. Mom would be so proud.
Check, please.
I am a dedicated designer with a rigorous process. If you have been reading closely, you may have noticed that there is one great stone left unturned. So, while donning my laurels, I decided to enter the caption contest.
I hit submit and crossed my fingers.
A few days later, my Twitter account started gurgling again. Something was going on, but it wasn’t what I thought it’d be.
Ladies and gentlemen, we have infiltrated the building. Not just the building, the magazine! Here it is in all of it’s glory.
This went from a dumb idea I had on my commute to a real caption in the magazine in six days. Dumb fun moves fast. When I heard it was in the issue, I did what any sane person would do: I left work early and poured myself a giant glass of wine to toast my victory. I felt warm and powerful, on top of the world and maybe just a little, tiny bit drunk on attention and alcohol.
The next day, I woke up hung over and realized everyone forgot about the escapade. (Which, by the way, is precisely what they should have done.) Another New Yorker issue came out with more cartoons, and Twitter shifted its attention to the Republican debates. We moved on. Even me: as I saw friends over the next week or two, they would want to talk about “the New Yorker thing”, and I’d be embarrassed, because I forgot it happened. You can also see it here. This essay is published three months after the caption ran in the magazine. It took a day or two to write the events down, but I let it sit unfinished for weeks, feeling that the story needed to end in a pretty bow instead of dissolving back into normal life.
This is typically the part of an essay where the writer expands the scope to offer a lesson. “This is what this means. This is what we can learn.” Writing about the caption has been difficult, because there aren’t any lessons. I’m not even sure I did anything. I didn’t draw the cartoon. I didn’t write the subject line of LinkedIn’s email. I didn’t write the original captions that I took out. I didn’t write the article for The Atlantic. I didn’t rewrite it for the other publications. I didn’t even make the best cartoon with my idea! No doubt: it’s the Trojan horse cartoon. The story of my success, if it is anything, is a paean to laziness.
So what did I do? I heroically and geniusly copied and pasted some text. Do I deserve credit in the magazine for that? (For the record: the caption ran in The New Yorker without any mention of me, and I think that’s just fine.)
The compliments, of course, are purposefully exaggerated for humor, but I think they also suggest how we’re all a little uncomfortable with honoring this kind of behavior as creativity. Fun isn’t bad, but most anyone would agree that our culture gives this kind of media much more attention than its worth. (See The Fat Jew’s 7.5 million followers on Instagram.) This is disappointing and difficult to reconcile, especially when a lot of my creative friends are struggling to get their original work properly credited online. As soon as the work is introduced to the network, there’s always someone there willing to share, strip credit, and assume proxy authorship.
Then again, there’s no use wringing my hands over this. The stunt left just as quickly as it came. My secret stays safe, despite all of the attention. Because on the internet, nobody knows you’re a dog.
Special thanks to the staff over at The New Yorker for having fun with my dumb idea—especially Bob Mankoff, cartoon editor at the magazine, and Liam Walsh, who created several of the cartoons I used as examples, and illustrated the cartoon with “my caption” in the magazine.
Infrastructure as code (IaC) tools such as Terraform, Packer, and Docker offer a number of advantages: you can automate your entire provisioning and deployment process, you can store the state of your infrastructure in code (instead of a sysadmin’s head), you can use version control to track the history of how your infrastructure has changed, and so on. But there’s a catch: maintaining a large codebase of infrastructure code is hard. Most IaC tools are immature, modern architectures are complicated, and seemingly minor changes to infrastructure code sometimes cause severe bugs, such as wiping out a server, a database, or even an entire data center.
Here’s the hard truth: most teams are terrified of making changes to their infrastructure code.
The goal of Terratest is to change that. Terratest is a Go library that makes it easier to write automated tests for your infrastructure code. I won’t claim that writing these tests is actually easy—it’s takes a considerable amount of work to get them just right—but it’s worth the effort, because these tests can run after every commit and verify that the code works as expected, thereby giving you the confidence to make the code changes you need.
We developed Terratest at Gruntwork to help maintain the Infrastructure as Code Library, which contains over 250,000 lines of code written in Terraform, Go, Python, and Bash. This code is used in production by hundreds of companies, and Terratest is a big part of what makes it possible for our small team to maintain and support this codebase and our customers.
Today, we’re happy to announce that we are open sourcing Terratest under the Apache 2.0 license! You can find Terratest on GitHub.
Let’s take it for a spin.
Terratest intro
The basic usage pattern for writing automated tests with Terratest is to:
Write tests using Go’s built-in package testing: you create a file ending in _test.go and run tests with the go test command. E.g., go test my_test.go.
Use Terratest to execute your real IaC tools (e.g., Terraform, Packer, etc.) to deploy real infrastructure (e.g., servers) in a real environment (e.g., AWS).
Use the tools built into Terratest to validate that the infrastructure works correctly in that environment by making HTTP requests, API calls, SSH connections, etc.
Undeploy everything at the end of the test.
To make this sort of testing easier, Terratest provides a variety of helper functions and patterns for common infrastructure testing tasks, such as testing Terraform code, testing Packer templates, testing Docker images, executing commands on servers over SSH, making HTTP requests, working with AWS APIs, and so on.
Example #1: Terraform
Let’s say you have the following (simplified) Terraform code to deploy a web server in AWS (if you’re new to Terraform, check out our Comprehensive Guide to Terraform):
The code above deploys an EC2 Instance that is running an Ubuntu Amazon Machine Image (AMI). To keep this example simple, we specify a User Data script that, while the server is booting, fires up a dirt-simple web server that returns “Hello, World” on port 8080.
How can you test this code to be confident it works correctly? Well, let’s think about how you would test it manually:
Run terraform init and terraform apply to deploy into your AWS account.
When apply finishes, the url output variable will show the URL of the web server.
Open url in your web browser and make sure it says “Hello, World”. It can take 1–2 minutes for the server to boot up, so you may have to retry a few times.
When you’re done testing, run terraform destroy to clean everything up.
Using Terratest, you can write an automated test that performs the exact same steps! Here’s what the code looks like:
func TestWebServer(t *testing.T) { terraformOptions := &terraform.Options { // The path to where your Terraform code is located TerraformDir: "../web-server", }
// At the end of the test, run `terraform destroy` defer terraform.Destroy(t, terraformOptions)
// Run `terraform init` and `terraform apply` terraform.InitAndApply(t, terraformOptions)
// Run `terraform output` to get the value of an output variable url := terraform.Output(t, terraformOptions, "url")
// Verify that we get back a 200 OK with the expected text. It // takes ~1 min for the Instance to boot, so retry a few times. status := 200 text := "Hello, World" retries := 15 sleep := 5 * time.Second
The code above does all the steps we mentioned above, including running terraform init, terraform apply, making HTTP requests to the web server (retrying up to 15 times with 5 seconds between retries), and running terraform destroy (using defer to run it at the end of the test, whether the test succeeds or fails). If you put this code in a file called web_server_test.go, you can run it by executing go test, and you’ll see output that looks like this (truncated for readability):
$ go test -v
=== RUN TestWebServer Running command terraform with args [init] Initializing provider plugins...
Making an HTTP GET call to URL http://52.67.41.31:8080 dial tcp 52.67.41.31:8080: getsockopt: connection refused. Sleeping for 5s and will try again. Making an HTTP GET call to URL http://52.67.41.31:8080 dial tcp 52.67.41.31:8080: getsockopt: connection refused. Sleeping for 5s and will try again. Making an HTTP GET call to URL http://52.67.41.31:8080 Success!
[...]
Running command terraform with args [destroy -force -input=false]
Success! Now, every time you make a change to this Terraform code, the test code can run and make sure your web server works as expected.
Example #2: Packer
The Terraform code in example #1 shoved all the web server code into User Data, which is fine for demonstration and learning purposes, but not what you’d actually do in the real world. For example, let’s say you wanted to run a Node.js app, such as the one below in server.js, which listens on port 8080 and responds to requests with “Hello, World”:
How can you run this Node.js app on an EC2 Instance? One option is to use Packer to create a custom AMI that has this app installed. Here’s a Packer template that installs Node.js and server.js on top of Ubuntu:
If you put the code above into web-server.json, you can create an AMI by running packer build web-server.json:
$ packer build web-server.json
==> amazon-ebs: Prevalidating AMI Name... ==> amazon-ebs: Creating temporary security group for instance... ==> amazon-ebs: Authorizing access to port 22 ... ==> amazon-ebs: Launching a source AWS instance...
[...]
Build 'amazon-ebs' finished.
==> Builds finished. The artifacts of successful builds are: --> amazon-ebs: AMIs were created:
us-east-1: ami-3505b64a
At the end of your build, you get a new AMI ID. Let’s update the Terraform code from example #1 to expose an ami_id variable that lets you specify the AMI to deploy and update the User Data script to run the Node.js app:
(Note: the User Data script above is still very simplified. In a real-world use case, you’d probably want to run your Node app with a process supervisor such as systemd and configure it to use all cores on the server using the cluster module).
So how can you test this Packer template and the Terraform code? Well, if you were doing it manually, you’d:
Run packer build to build a new AMI.
Plug the AMI ID into the ami_id variable of the Terraform code.
Test the Terraform code as before: run terraform init, terraform apply, open the web server URL in the browser, etc.
Once again, you can automate this process with Terratest! To build the AMI using Packer and pass the ID of that AMI to Terraform as the ami_id variable, just add the following to the top of the test code from example #1:
packerOptions := &packer.Options { // The path to where the Packer template is located Template: "../web-server/web-server.json", }
// Build the AMI amiId := packer.BuildAmi(t, packerOptions)
terraformOptions := &terraform.Options { // The path to where your Terraform code is located TerraformDir: "../web-server",
// Variables to pass to our Terraform code using -var options Vars: map[string]interface{} { "ami_id": amiId, }, }
And that’s it! The rest of the test code is exactly the same. When you run go test, Terratest will build your AMI, run terraform init, terraform apply, make HTTP requests to the web server, etc.
Give it a shot!
The above is just a small taste of what you can do with Terratest. To learn more:
Check out the examples folder and the corresponding automated tests for those examples in the test folder for fully working (and tested!) sample code.
Browse through the list of Terratest packages to get a sense of all the tools available in Terratest.
We offer both raster and vector map tiles to get you started on your next application.
You can easily integrate them into your website using Leaflet or Mapbox GL JS.
Static Maps
Need to generate a quick map to show a few locations? We make it easy! Just add query string
parameters to a simple URL and drop it into your webpage or app.
Routing
Whether you need driving directions to your store, or want to figure out how walkable an area is,
our turn-by-turn navigation service has you covered.
Not sure if we can meet all your mapping needs? Take a look at ourdocumentation to see
the full details of what we offer.
Stadia Free
$0/mo
2,500 map views/day
2,500 routing requests/day
Non-commercial use only
Asset tracking not allowed
Stadia Starter
$25/mo
25,000 map views/day
25,000 routing requests/day
Commercial use allowed
Asset tracking not allowed
Stadia Standard
$100/mo
250,000 map views/day
250,000 routing requests/day
Commercial use allowed
Asset tracking allowed
Stadia Ultimate
$1000/mo
Unlimited map views/day
1,000,000 routing requests/day
Commercial use allowed
Asset tracking allowed
What formats do you offer?
We offer both raster (PNG) and vector (PBF) tiles, as well as
static map (PNG) generation. Our tiles can be used with all of
your favorite open source libraries, including Leaflet for raster tiles, and MapBox GL JS for
vector.
What’s a map view?
One map view is equal to 16 tile requests, or one static map
request. Why 16? Most companies doing tile based serving use a
similar number. We opted to go with a square rather than a
round-sounding number, and a 4x4 grid is a reasonably average
map size.
What are basemaps?
Basemaps are the layer of "normal" things
you’d expect to see on a map like water, country
borders, cities, points of interest, etc. They are called
basemaps because they are the "base" that provides
context for the markers and overlays you add on top.
What’s a static map?
A static map is an image that you can generate using a
simple URL. These are great for quickly embedding a
non-interactive map, optionally with markers at various
locations. If you just want to throw a quick map with some
pins into an image tag, these are the ticket.
Do you have documentation?
Yes, we're glad you asked! We have full documentation over
at docs.stadiamaps.com.
Can I use Stadia Maps for…?
If you aren't sure if Stadia Maps is right for you, or if
you have questions our homepage and documentation didn't
answer, feel free to reach out to us at[email protected].
We'd be delighted to answer any of your questions.
Stanford researchers have developed a water-based battery to store solar and wind energy
Stanford scientists have developed a manganese-hydrogen battery that could fill a missing piece in the nation’s energy puzzle by storing wind and solar energy for when it is needed, lessening the need to burn carbon-emitting fossil fuels.
Stanford researchers have developed a water-based battery that could provide a cheap way to store wind or solar energy generated when the sun is shining and wind is blowing so it can be fed back into the electric grid and be redistributed when demand is high.
Postdoctoral scholar Wei Chen holds a prototype of what could one day be a ginormous battery designed to store solar and wind energy thanks to a water-based chemical reaction developed in the lab of Stanford materials scientist Yi Cui. (Image credit: Jinwei Xu)
The prototype manganese-hydrogen battery, reported April 30 in Nature Energy, stands just three inches tall and generates a mere 20 milliwatt hours of electricity, which is on par with the energy levels of LED flashlights that hang on a key ring. Despite the prototype’s diminutive output, the researchers are confident they can scale up this table-top technology to an industrial-grade system that could charge and recharge up to 10,000 times, creating a grid-scale battery with a useful lifespan well in excess of a decade.
Yi Cui, a professor of materials science at Stanford and senior author on the paper, said manganese-hydrogen battery technology could be one of the missing pieces in the nation’s energy puzzle – a way to store unpredictable wind or solar energy so as to lessen the need to burn reliable but carbon-emitting fossil fuels when the renewable sources aren’t available.
“What we’ve done is thrown a special salt into water, dropped in an electrode, and created a reversible chemical reaction that stores electrons in the form of hydrogen gas,” Cui said.
Clever chemistry
The team that dreamed up the concept and built the prototype was led by Wei Chen, a postdoctoral scholar in Cui’s lab. In essence, the researchers coaxed a reversible electron-exchange between water and manganese sulfate, a cheap, abundant industrial salt used to make dry cell batteries, fertilizers, paper and other products.
To mimic how a wind or solar source might feed power into the battery, the researchers attached a power source to the prototype. The electrons flowing in reacted with the manganese sulfate dissolved in the water to leave particles of manganese dioxide clinging to the electrodes. Excess electrons bubbled off as hydrogen gas, thus storing that energy for future use. Engineers know how to re-create electricity from the energy stored in hydrogen gas so the important next step was to prove that the water-based battery can be recharged.
The researchers did this by re-attaching their power source to the depleted prototype, this time with the goal of inducing the manganese dioxide particles clinging to the electrode to combine with water, replenishing the manganese sulfate salt. Once this salt was restored, incoming electrons became surplus, and excess power could bubble off as hydrogen gas, in a process that can be repeated again and again and again.
Cui estimated that, given the water-based battery’s expected lifespan, it would cost a penny to store enough electricity to power a 100-watt lightbulb for twelve hours.
“We believe this prototype technology will be able to meet Department of Energy goals for utility-scale electrical storage practicality,” Cui said.
The Department of Energy (DOE) has recommended batteries for grid-scale storage should store and then discharge at least 20 kilowatts of power over a period of an hour, be capable of at least 5,000 recharges, and have a useful lifespan of 10 years or more. To make it practical, such a battery system should cost $2,000 or less, or $100 per kilowatt hour.
Former DOE secretary and Nobel laureate Steven Chu, now a professor at Stanford, has a longstanding interest in encouraging technologies to help the nation transition to renewable energy.
“While the precise materials and design still need development, this prototype demonstrates the type of science and engineering that suggest new ways to achieve low-cost, long-lasting, utility-scale batteries,” said Chu, who was not a member of the research team.
Shifting away from carbon
According to DOE estimates, about 70 percent of U.S. electricity is generated by coal or natural gas plants, which account for 40 percent of carbon dioxide emissions. Shifting to wind and solar generation is one way to reduce those emissions. But that creates new challenges involving the variability of the power supply. Most obviously, the sun only shines by day and, sometimes, the wind doesn’t blow.
But another less well-understood but important form of variability comes from surges of demand on the grid – that network of high-tension wires that distribute electricity over regions and ultimately to homes. On a hot day, when people come home from work and crank up the air conditioning, utilities must have load-balancing strategies to meet peak demand: some way to boost power generation within minutes to avoid brownouts or blackouts that might otherwise bring down the grid.
Today utilities often accomplish this by firing up on-demand or “dispatchable” power plants that may lie idle much of the day but can come online within minutes – producing quick energy but boosting carbon emissions. Some utilities have developed short-term load balancing that does not rely on fossil-fuel burning plants. The most common and cost-effective such strategy is pumped hydroelectric storage: using excess power to send water uphill, then letting it flow back down to generate energy during peak demand. However, hydroelectric storage only works in regions with adequate water and space. So to make wind and solar more useful, DOE has encouraged high-capacity batteries as an alternative.
High capacity, low cost
Cui said there are several types of rechargeable battery technologies on the market, but it isn’t clear which approaches will meet DOE requirements and prove their practicality to the utilities, regulators and other stakeholders who maintain the nation’s electrical grid.
For instance, Cui said rechargeable lithium ion batteries, which store the small amounts of energy needed to run phones and laptops, are based on rare materials and are thus too pricey to store power for a neighborhood or city. Cui said grid-scale storage requires a low-cost, high-capacity, rechargeable battery. The manganese-hydrogen process seems promising.
“Other rechargeable battery technologies are easily more than five times of that cost over the life time,” Cui added.
Chen said novel chemistry, low-cost materials and relative simplicity made the manganese-hydrogenbattery ideal for low-cost grid-scale deployment.
“The breakthrough we report in Nature Energy has the potential to meet DOE’s grid-scale criteria,” Chen said.
The prototype needs development work to prove itself. For one thing it uses platinum as a catalyst to spur the crucial chemical reactions at the electrode that make the recharge process efficient, and the cost of that component would be prohibitive for large-scale deployment. But Chen said the team is already working on cheaper ways to coax the manganese sulfate and water to perform the reversible electron exchange. “We have identified catalysts that could bring us below the $100-per-kilowatt-hour DOE target,” he said.
The researchers reported doing 10,000 recharges of the prototypes, which is twice the DOE requirements, but sid it will be necessary to test the manganese-hydrogen battery under actual electric grid storage conditions in order to truly assess its lifetime performance and cost.
Cui said he has sought to patent the process through the Stanford Office of Technology Licensing and plans to form a company to commercialize the system.
Yi Cui is also a professor in the Photon Science Directorate at SLAC National Accelerator Laboratory, a senior fellow of the Precourt Institute for Energy, and a member of Stanford Bio-X and the Stanford Neurosciences Institute. Additional co-authors include Guodong Li, a visiting scholar in materials science and engineering who is now with the Chinese Academy of Sciences; postdoctoral scholars Hongxia Wang, Jiayu Wan, Lei Liao, Guangxu Chen and Jiangyan Wang; visiting scholar Hao Zhang; and graduate students Zheng Liang, Yuzhang Li and Allen Pei.
It feels like only the other day I was going on about an instant camera that uses thermal paper being one of my abandoned dreams. I abandoned it because I found out it had already been done, and isn't particularly hard. But! Soon after, I decided that that's a terrible way to see things, and if we stuck by that, we'd never get much done, let alone learn anything.
So here is my attempt at an instant camera that prints onto thermal paper.
This project was partly done as a collaboration with Tom, who knows a lot about Linux and whose face is visible in some of the pictures.
The Prototype
First two things I ordered were a webcam, that cost £1.99 including postage, and a thermal printer.
The printer cost £34. I did not go for the cheapest one available, instead I opted for the smallest one available, which happened to be bluetooth enabled. I never planned on using the bluetooth function, but it's still a good choice of printer, as it supports USB and RS232, is small by the standards of thermal printers, and includes a reasonably big battery too.
I don't know much about how you're supposed to install printers on Linux, there's something called CUPS which I didn't care to learn much about, but plugging the thermal printer into the USB port on my laptop caused a new device to appear as /dev/usb/lp0. Piping some text to this device prints it out – that was easy!
echo "Hello!" > /dev/usb/lp0
That text is printed in the default font of the printer. A line-feed character causes it to feed paper. But for anything other than that we need to use escape codes. Apparently the escape codes we need to know about are referred to as ESC/POS.
After googling for a reference for these (I am still not convinced if there is more than one standard, or that only some codes are supported) we started to have some success. It's even possible to pipe standard input to the device, then manually type the command.
cat > /dev/usb/lp0
After buggering around with this for a while, next task was to grab an image from the webcam. The very easiest way to do this is with ffmpeg, where you can ask it to stream just one frame.
How to send this to the printer? Luckily, someone's already written a python script to generate the ESC/POS sequence for bitmap printing.
There were some hickups, and hickups usually mean wasting a lot of thermal paper, but eventually we hit success. Once a bitmap image was successfully printed, the concept is proven and we know it'll all work with enough tweaking.
To the Pi
Up next, port it across to a raspberry pi. This is a bog standard pi running raspbian.
Ffmpeg isn't present in the raspbian repositories, but there's avconv which is essentially the same thing. Python scripts are easy to install. One unexpected problem is that the Pi incorrectly identified the pixel format of the webcam and the colours came out all wrong, purple and green everywhere. We needed to manually specify the pixel format as RGB24 for it to look right. But it's all going to be black and white in the end.
Since raspbian is basically debian, there really wasn't much else to do here. But there's a big problem: it's unacceptably slow. Slow to boot, slow to shoot, slow to convert the image and slow to send it to the printer. There's a lot of room for improvement!
As an interesting experiment, we installed a bash script as a one-shot service to see how soon in the boot process we could get it to run and take a picture. To do this we just made a unit file that'll be loaded by systemd with Type=oneshot and Before=networking.service. I'm not sure if there's a way to get it to run even sooner in the process, there probably is.
But this was pretty awful in terms of speed, it took about 40 seconds from power-on until the picture was taken. I added another line to see if it's the picture-taking itself that's slow. Piping urandom to the frame buffer means the screen fills with junk when the script starts. The script looked like this:
By the time we reached the end of the first roll of paper, the development process and the number of incorrect image printing attempts was hilariously documented all over the floor. I decided to stick it on the wall.
An accidentally artistic endeavour. What's up with all the mangled frames? Sometimes it would miss whatever header it needed and spit out the binary data as if it were ascii. There's even a barcode in there!
Before pursuing Embedded Linux any further, it was time to find a donor camera...
To the Polaroid
It has to be a polaroid. Much as I'd love to stick the mechanism in an old rangefinder, a polaroid it has to be. Some searching of eBay found a broken one.
Combining a Polaroid with a Pi does also mean that the most tempting (and most awful) amalgamation-based name would be "Pilaroid" – a horrific monstrosity that somehow manages to conjure up images of both haemorrhoids and piles. Eyuch! I think I'll stick with "Thermal Printer Instant Camera"...
Now for the fun step, pulling this thing apart and gutting it.
There's a flash mount, and a lever to switch between autofocus and manual.
In manual mode the focus ring is covered up. Around the flash mount is the first piece of plastic we can remove.
Now we're starting to see something really impressive, and it gets better. The entire camera is assembled using plastic tabs. Not a single screw in the entire construction!
The front panel clicks open for loading the film, and behind it are more tabs that can be released using a flat screwdriver.
This detaches the front panel.
The central lens is the picture-taking one. To the left we have the piezoelectric ultrasonic transducer that's used for distance measurement, to the right there's the viewfinder front element, and the small lens in a dark tube underneath that is the light sensor.
At this point, with some encouragement, the entire camera can be slid out of its housing.
Yummy! Through-mount parts, PCBs without solder-resist, and dupont connectors everywhere.
I love cameras. They're a delicious mix of optics, mechanics, electronics, and electromechanics. Almost all of the mechanisms here are plastic. Even the lenses are plastic. Just how many injection-moulded parts are there? And still not a screw to be seen.
Wait, there's one, a bolt on the top of the solenoid for the shutter mechanism. But that solenoid is probably a drop-in part.
The viewfinder comes away, and now we can see there's a flexible PCB involved. But it's not kapton-based, it's printed on paper!
The green plastic wiring guide has labels on it with the wire colours. Cute. But all this electronics has to go...
I pulled out the big, trapezoid front-surface mirror. It wasn't worth trying to take a picture of it though.
The large copper tabs are what originally connected to the battery that's contained within the SX-70 film package. I tried powering it up with 6V (before the pulling the electronics apart), but I couldn't get it to do anything really. Either because there's a mechanical interlock somewhere, or perhaps to do with the fact that the listing on eBay did specify the camera was broken.
Next we remove the rest of the front panel, the autofocus mechanism and the side plate that's both part of the film feed mechanism and the shutter button.
Not shown in the picture above are the many gears and levers that were supported by the side plate. The mechanism, entirely in plastic, mechanically links the shutter actuations to a counter that advances when a picture is taken. There's a little window on the back of the camera with remaining shots displayed, presumably this is also reset when the film is loaded, although I didn't trace out all of the mechanical workings here. The feed motor engages both the rollers at the front and probably a part of the film cartridge. A few of the gears were made of metal, I suppose there's quite a lot of force involved in squeezing the film through the rollers. I didn't pay much attention to this part as I planned to strip it all out anyway; the brushless motor used by the thermal printer is much more compact.
It's possible to actuate the shutter at this point, by working some of the levers back and forth. I'm particularly interested in the way the exposure compensation is performed. The timing is electronic, based on an analog circuit and a light sensor, but the compensation ring physically moves the pivot point of the lever arm for the shutter leaves, thus altering the timings. It's something I've seen before, and I never know whether to think of it as ingenious or stingy.
The brass tabs at the bottom are all contacts and detectors, I cut away many of the wires to them. They're all for detecting the limit positions of various mechanical linkages.
Above is the shutter mechanism in isolation. I definitely wanted this to be working in the final thing. There was rather a lot of work involved with disassembling it to this point, including the removal of the main lens elements. Since they're plastic, and cannot be used in the final thing because they're completely the wrong focal length, I ended up drilling through them. It was a weird experience. There were only two elements, and they were both gummy plastic.
The leaf shutter only has two blades, closing in a diamond pattern. As part of the closing mechanism it also covers up a secondary light sensor, possibly for calibration purposes. The camera has a fixed aperture.
I had to cut through the flex PCB, it was all soldered down anyway. Linking the shutter solenoid to 6V makes it fire with a satisfying click, but the mechanism is locking since it would normally want to be closed most of the time. I found the tab that controlled this and snapped it off, so that the solenoid is sprung open and just clicks closed momentarily when powered. Even though the webcam only grabs one frame, it'll need to be exposed to light all the time in order to get the exposure right, as like all webcams it does a kind of rolling average of light levels. The shutter click can take place right after the image is taken.
With that completed, reassembly can begin, but not before we observe the rather sad husk of the instant camera.
As part of the reassembly, I broke open the webcam and fitted it into the shell of where the lenses used to be. It was quite important to have a live view while doing this, in order to make sure that the view wasn't unintentionally vignetted. I also laser-cut out a disk of acrylic the same diameter as the original front element, in case it looks odd without a big lump of plastic there. (I never did make my mind up about whether to fit it though.)
For £1.99, it's a pretty good webcam. Even came with a microphone. The focus needed to be fixed at about two metres. There's quite a big depth of field, which when combined with the exceedingly low resolution of the printed images gives us just about even sharpness at all distances. I sawed off the octagonal front to the hood as part of the attachment to the main camera body, you can probably guess what was involved: craft knives, drilling and lots of glue.
At this point, I also began working on fitting the thermal print head into the body. This was extremely tedious, probably ten hours of sawing, drilling and gluing, and I didn't get many pictures on the way. Pictures of the final thing, further down this page, should hopefully give an idea of what was involved.
Incidentally, since the print head would have to be mounted upside-down, I decided to mount the camera upside-down too, thus neatly avoiding an extra processing step.
The Camera Plan
Plans were made, certainly, but they kept changing. I did notice that the thermal printer circuit board was powered by a chip labelled GD32F103 – sounds suspiciously like an STM32F103 – and after looking it up, yes, it's a Chinese clone of that chip by a company called GigaDevices. So there's an ARM Cortex M0 on board. The most tempting thing would be to reprogram this with our own code that directly interfaced with the camera... but it's not going to happen, I just don't have the effort to fully reverse engineer this thing.
I did consider reprogramming it for another reason, though. Part of the problem is that we're going to use a Raspberry Pi Zero, which only has one USB port. We have two devices we want to talk to, both using USB. Not only that, but enumerating the USB devices is slower than some other methods of talking to peripherals.
I know there's a Pi Camera and I probably should have been using it, but it's overkill, it's expensive and aside from anything else I'd already fitted that USB webcam into the Polaroid at this point. So the camera has to be USB, but the printer could potentially be driven by the UART port. There's an RS-232 transceiver chip on the circuit board, if we solder to the legs of this we can talk to it at normal voltage levels.
At this point I'd prepared from earlier a binary blob that contained both a bitmap image of my face, and the escape codes necessary to pipe the whole blob to /dev/usb/lp0 and have it print as expected. Now with the serial port exposed, I tried piping that same binary blob there, and everything functioned perfectly! Except for one major flaw. The baud rate is fixed, and the device prints at a speed that empties the buffer faster than it can refill. So when printing a picture by this method, it has to stop and wait for more data halfway through. Since it's printing via a heating element, stopping halfway through means a horrible burnt line across the image. Darn!
This had me scratching my head for days (I really didn't want to have to stick a USB hub in there). If only we could extract the firmware image of the thermal printer, search for the setting of the particular registers relating to UART baud rate, twiddle a few bits and write the image back, it might be possible to speed up the data transfer and make UART image printing practical. There's a suspicious looking header at the bottom of the board. I was hoping this might be JTAG, or the ST-link interface, but tracing out the pins and checking the datasheet for the part suggests this is something else, perhaps a protocol for a custom bootloader they've installed.
I spent a long time trying to work my way around the limitations without any success. I tried one other thing, scoping the communication between the bluetooth module and the main chip. I thought that perhaps if this was at a higher baud rate than the exposed interface we might get away with squirting something into there. But there's so much comms on that data line, AT commands and whatnot, all stuff we would have to emulate to get the chip to believe it was still talking to the bluetooth module, that eventually I gave up on this too.
So we'll use a USB hub. Enumerating it adds a split second to the boot time, but we'll have to cope.
The Camera Plan (continued)
Here's the inputs that the original polaroid had: half-depress of the shutter, full depress of the shutter. There were also a bunch of internal limit switches.
Here's the outputs it had: an LED under the viewfinder, an autofocus motor, a shutter solenoid, and of course the film feed motor.
We want this thing to be super easy to use, just pick it up, press the button and a picture comes out. It needs to be quick and responsive. It also needs to have a decent battery life, and hopefully very low standby consumption. I came up with the following idea:
We'll add a control chip, probably an ATtiny which can boot instantly on a pin change interrupt. It'll listen to the shutter switches and have control over the booting of the Pi.
The Pi can shutdown to enter a low power mode (note, due to hardware, it cannot enter a standby/suspend to ram mode). The ATtiny can wake it up by toggling the run pin.
While the Pi boots (assuming we can get the boot time down to ~1 second) the ATtiny can rack the autofocus motor back and forwards. So, the user has pressed the half-depress of the shutter button, it acts as if it's focusing, then signals that it's ready when the Pi has booted.
Full depress of the button causes a picture to be taken, and for user feedback the shutter solenoid fires. Then, the printer is sent the image and the whole system can shutdown, with just the ATtiny in deep sleep waiting for the pin change.
This will require quite a few links between the ATtiny and Raspberry Pi, along with an H-bridge driver for the autofocus motor (and reuse of its limit switches) plus a single mosfet driver for the solenoid.
Crucial to this whole idea is that the Pi can boot quickly. It would also be useful if it wasn't running any unnecessary software, as that'll just slow it down during the image conversion process and also waste battery power.
Time to get our Embedded Hat on.
Buildroot
To be really hardcore we could go bare metal. No operating system, just our code running natively on the processor. We'd still need to make use of the Raspberry Pi firmware, which is what runs on the GPU in order to bootload the main software. I think it's probably not all that hard to do this, but given that we're using USB drivers, and python libraries, it's probably a lot more work than the other options.
Raspbian is the OS that's designed for Raspberry Pi, and it's honestly a bit boring because it's basically Debian. We're not getting the full Embedded Linux experience. I mean, the fact that there's a compiler on the device, and a package manager, it's about as high-level an embedded system can get. It's also really bloated, for what we want to do.
The usual approach to embedded software is cross-compiling source code from a desktop computer and flashing the image onto the device. We want Linux, as the kernel drivers make interfacing everything easy, but we don't want everything else. It's possible to cross-compile the whole of the linux kernel from scratch, adding just the modules needed, but it takes a lot of configuration. There's an easier option – buildroot.
Buildroot is generic and supports lots of different hardware platforms. By running make nconfig (or menuconfig if you prefer) we get a nice menu where we can select everything from target architecture to included packages. But, life is even easier than that, because by running make raspberrypi0_defconfig the important menu options will all get filled out for us. This even adds in the raspberry pi bootcode, and selects the modified kernel image from the raspberry pi foundation.
It's interesting to look through the folder structure at all the different boards that are supported like this. There are quite a few embedded linux boards I didn't know about, some of which might even have been more appropriate for this project (but then again, at £4, the Pi Zero is hard to beat).
Running make (or make all) starts to download the sources and begins the compilation process. This takes some time. On my laptop the compile time was about 43 minutes. If we change a setting in the menu, it's possible that we have to clean and rebuild again, which means another 43 minutes of waiting. It's not entirely clear what changes need a complete rebuild, but pretty much everything regarding the target architecture and the filesystem layout is probably a good guess.
There is an interesting option, to link everything into the inital ram filesystem (initramfs). That's (as I understand it) a temporary filesystem in RAM that's used at the very beginning of the boot process in order to load the kernel image, but if we include everything in the ramfs, the whole of the operating system and file structure can be kept in ram. This means that after the boot process, the card can even be pulled out, and everything will keep working. It also means the system is stateless, as the card is basically read-only at the beginning, and changes in ram are lost when it reboots. I chose not to use this option though, because it actually lengthens the boot time, while it reads the whole of the card image into memory.
Buildroot can potentially make quite a complicated system, with systemd and udev, but we don't want any of that. The default uses busybox and devtmpfs for device management. Busybox is quite common for minimal systems and makes a lot of sense. The POSIX environment, what we normally think of as the linux command line, consists (amongst other things) of a collection of binary executables for every command like cat, ls, grep, and so on. Since most of these binaries have an awful lot in common with each other, it's kind of bloated to keep them separate like that. Busybox replaces all of the standard utilities with a single binary, and uses symlinks (or possibly hardlinks) for each command, which ends up much more compact. But as I'm learning now, busybox does a lot more than just that, since it can handle the init system and device management too.
I found an interesting project called Minimal Linux Live (see The Dao of Minimal Linux Live), which has a goal of being the very simplest workable linux distribution. It seems like all you need to get the system working is the kernel, busybox and a few shell scripts to glue it together. Pretty cool.
Buildroot does make life easy though. Now that we've set the architecture and everything via that defconfig command, we can just go through the menu and tick whatever we need. Some parts depend on others, for instance a lot of software relies on wide character support, but the menu is explicit about this so you can't really mess it up. There is a search function which is useful. Note that some of the packages are not shown at all if the system configuration wouldn't support it.
It's quite fun to go through all the things we don't need. Certainly don't need networking or SSH! To talk to the Pi after it's booted up we'll use the serial cable.
After running make we end up with an image that can be written to the SD card for the pi using the dd utility. The proper way to use buildroot is to configure the post-build scripts, which can run between finishing the build and tarring it into an image file, and also to use overlays to add our code and files needed into the file tree. However, this was my first time using buildroot, and I didn't really understand it or want to break it.
I'm writing this up months afterwards, and I have to point out that the manual for buildroot is very good, and overlays and post-build scripts are very simple. But at the time of this project I just made my own, manually-invoked script that dd'd the image, mounted it, and added in my changes.
Speeding it up
The boot time is pretty good, but I'll quickly summarize the changes that made it even better:
Increasing the serial baud rate. The kernel messages are dumped onto the serial output at 115200bps. Those messages are marked with a millisecond offset from the start of the boot, and looking at the differences shows what takes the longest. Starting the console on ttyAMA0 took more than 0.9 seconds! Speeding it up to 921600bps reduced that to 0.1 seconds. If we were worried about that last 0.1 seconds, we could disable kernel message output during boot entirely by putting "quiet" into the kernel command-line options. However, during development those messages are really useful.
Disable the HDMI splash screen, in fact, disable the HDMI output entirely. That also saves battery power.
Disable tty1 that would go on the HDMI output (not sure if this actually makes it any faster, but it can't hurt).
To enact these changes we need to understand a couple of config files in the boot partition loaded by the raspberry pi firmware. Unfortunately, both of these configuration files are quite poorly documented.
cmdline.txt is the command-line arguments list passed to the kernel. I left it looking like this:
I can't remember where the "nologo" part came from, it may or may not make a difference. Importantly we've gotten rid of the superfluous tty and speeded up the serial connection. I also commented out the line that spawns tty1 in /etc/inittab although that probably has no noticeable effect.
config.txt is a list of parameters for the raspberry pi firmware. I left this as it was but added the following onto the end:
hdmi_blanking=2
disable_splash=1
Splash is the rainbow image at startup, hdmi_blanking=2 turns off the HDMI output entirely.
Video4Linux
With udev we could just plug the camera in and it'd be ready to use, but without it we need to manually load the kernel module, which is as simple as typing modprobe uvcvideo. The correct place to put this is in a script in /etc/init.d/. The filenames in this directory dictate the order they're run in. The rcS file is the script that's actually invoked by inittab, and looking through that we can see how it parses the files in this directory.
The contents of our file /etc/init.d/S08video :
#!/bin/sh
if [ "$1" == start ]; then
modprobe uvcvideo
fi
Once the module is loaded, the device appears as /dev/video0. FFmpeg is available in the buildroot package list, but it's overkill for just grabbing a frame from a webcam. The package we're more interested in is v4l2-utils, which gives us the v4l2-ctl binary. I came up with the following lines to stream one image from the device into a file:
There are, obviously, a whole load of ways of grabbing a frame from the webcam. A more expensive webcam would probably be able to output a bitmap, but the only output format of this webcam is motion-jpeg. What we captured with the two lines above is not a bitmap, but a raw YUYV buffer. As I understand it, I don't think there's any way of getting this particular camera to output anything other than that (the possible output formats can be listed with v4l2-ctl).
YUYV buffer, parsed as RGB for the hell of it
Our output, "output.bin" is in YUYV format and now needs processing into a usable image. We could write our own routine for it (tedious), or use one of the image handling binaries we could package with buildroot (probably bloated), but instead I turned to google and found something more interesting. YUYV is the format used by JPEG, which is why the camera is spitting it out. So it might actually be faster (for a given definition of faster, i.e. less effort) to just pass the buffer to libjpeg and get a usable image out. Someone had tried to do exactly that here.
I'd grabbed the YUYV image above on the pi, then since it's faster than trying to extract it over the serial connection I pulled out the SD card and shoved it back into my laptop to see it. I compiled that C++ snippet, ran the binary, and astonishingly, we got a perfect jpeg image out!
I was sufficiently satisfied with this that I decided to make use of it on the pi. In order to do this we need to cross-compile it for the ARM architecture that the pi uses. One way to do this is to create our own package for buildroot, which I'd experimented with for the ESC-POS libraries (the narrative is getting a bit non-linear here). It's not too complicated, but it's stupid for just a single C++ file. In fact, cross compiling it is as simple as passing the exact same arguments to arm-g++, which already exists in our buildroot directory:
Copy this yuyvArm binary onto the pi's SD card and it behaves exactly as we'd expect. I suppose I'm terrified of getting cross-compiling to work normally because I normally work bare-metal, and then you have to worry about memory offsets and linker scripts and everything. But with embedded linux, it couldn't be easier. Neat!
More about YUYV
The above method is exactly what I ended up using, and it's what's shown working in the camera in the video. However it is pretty much redundant, not least because we're compressing it to jpeg and back. Most of the operation is about recovering the colour data, but later on we'll be desaturating the image, resizing it and decimating it to a bit-depth of one, with dithering. Those later steps are likely to take up the bulk of the processing power, especially as they're done in python, but it's still kinda pointless to be mucking around with jpegs and colour data.
The YUYV format uses four bytes to represent two pixels. The luminance channel has twice the horizontal resolution as the chrominance components, that is, each pixel gets its own luminance value, but shares the colour data with its neighbour. But... if all we wanted was a monochrome image, we could toss the colour data away, which means just looking at every other byte.
If I were doing this again, I would probably write one program that takes the YUYV buffer and outputs the binary data for the printer, and then steps like this would be easy to condense. Anyway, back to the story.
ESC-POS again
The driver for the printer can be loaded with modprobe usblp and we can stick that in init.d again. Now there's the device /dev/usb/lp0 and once again we can pipe to it. The hard part is turning the jpeg image above into the binary data to send to the device.
I did spend quite a while trying to get the python esc-pos library to work. It's not too hard to add packages to buildroot, it's still not too hard to add python packages to buildroot, but what I struggled with is the amount of things that libary depends on. I ended up chopping big bits out of it so that I didn't have to import, for instance, barcode libraries. Then I figured that was stupid and there's got to be an easier way.
Thankfully I found a very simple python script that only depends on Pillow (the python imaging library). What's more, the script is only a page long and part of it could be stripped out anyway. I replaced the resizing with a fixed resize to 376 pixels wide. The printer claims to be 384 dots wide, but my many experiments had shown that 376 was the widest picture we could output.
Including python and Pillow is as easy as checking the boxes in the buildroot menu.
USB hubs
Probably the most painful part of the project. Who'd have thought there would be so many USB hubs that don't work?
A selection of hubs that didn't work
I started off buying a small usb hub because I was considering size to be an important factor. I found that it didn't work at all, all I got were USB enumeration errors. Looking at the circuit board, it just had an epoxy blob with no crystal, so I can only assume that it barely made the USB spec, and collapsed under the task of USB-OTG.
So I kept buying more hubs, and each of them failed to do the task in more and more ridiculous ways. I thought that perhaps it was a power issue, but even giving the devices external power didn't help. The USB enumeration errors give completely unhelpful error codes. Sometimes these codes were different, I'm not sure where I need to look to find out what any of them meant.
Not all of the hubs I tried failed with enumeration errors, some of them only supported USB 1.1, and some of them seemed to support USB 2 but did a kind of fallback onto USB 1.1 when plugged into the pi, or when the webcam was plugged into them. The webcam is particularly tricky because streaming video takes a fair bit of bandwidth, and one of the hubs appeared to be working fine, enumerated correctly and everything, but then mangled the video output of the camera. I wished I'd kept some of those mangled frames, mostly they looked like a correct image for the top third of the frame, then garbage for the rest of it.
The splitter-cable style hub in the picture above was even marketed as "for raspberry pi" but failed to function, I think it was one of the ones that fell back to USB1.1 when the webcam was plugged in. Inside the case, the board looked pretty similar to the other epoxy-blob hubs. Bizarrely there was an LED on the board which was completely enclosed by the case.
I suspect that all of these errors might have been to do with timing. There's a tolerance spec to the timing with any asynchronous serial data, but most devices probably function to a much tighter tolerance than that. If one device in the chain skimps on fitting a crystal, and operates mildly out-of time, the other devices can compensate. But assuming the webcam I got for £1.99 was also cutting corners, then the two devices in conjunction cannot function, even if they both technically are within tolerance. Just a theory.
I finally found a hub that worked, a rather large 7-port hub that has to be externally powered. Needless to say it was the most expensive of the hubs I tried, but less than all the money I'd wasted on the other hubs. This hub was far too big to fit inside the camera body. As with all 7-port hubs, internally it has two 4-port hubs with one plugged into the other. The chip itself is labelled FE1.1S, perhaps we could buy this chip in isolation? Or find a 4-port hub that uses it? Or desolder the chip from this hub and wire it up on protoboard?
I continued to ponder this for some time.
The Reassembly and the Compromise
The Thermal Printer Instant Camera is a project that I'd worked on, on-and-off throughout October and November, in parallel with other projects. It kinda petered out and before I knew it, it was Christmas. It was, for reasons I won't go into, dreadfully important that the camera was finished by New Year's Eve, and suddenly I realized that I only had about four days left to finish. Although we had a plan, I hadn't started on any of the ATtiny power management stuff, or a driver for the autofocus motor. It was time to compromise.
Instead of a self contained machine that boots on shutter depress, we could get away with a manual on/off switch, and during the 'on' time the Pi can monitor the shutter switch itself and shoot as needed. It does slightly belittle all our efforts to reduce the boot time, but they weren't in vain, because the lightweight nature of the image we've made uses less power and runs faster than the stock distribution.
With this cut-down plan, the main remaining tasks were to mechanically squeeze everything inside the case and glue all the software bits together.
Cut the USB
With time running out and no better option in mind, I broke out the cutting disks and surgically removed one of the USB hub circuits from the 7-port hub.
The circuit board is just two layers, so we can see exactly where the traces are and what goes where. Importantly we managed to hold on to the crystal, decoupling caps and pulldown resistors so the little chunk of circuit board should work in isolation. I tried to cut directly through the vias leaving continuity of the ground plane for both chips.
Although I hadn't planned for it, the remaining lump of circuit board does function perfectly well as a 3-port hub. I ended up using it in a different project a few weeks later.
The raspberry pi has lovely test pads on the board that make our life easier. USB OTG needs one pin to be grounded to put it into host mode, then the remaining four wires can be soldered straight to our new hub.
To this I then performed the rather fiddly job of soldering the differential pairs. I smothered the join in superglue after soldering to give it extra stability, it's exactly the kind of join that's likely to break as we're fitting the last part of the case back together.
More Mechanical Mayhem
Given the short deadline, and the high-risk situation – if we cut too much of the plastic, there is no way to undo it, no way to get any replacements – I entered a kind of mechanical cutting trance, wielding only a mini-drill, cutting disks, razor blades, glue and of course the necessary eye and ear protection.
A few hours later I had a huge pile of plastic shavings and the end looked almost in sight.
At some point I realized that the header pins for the flash attachment were exactly 0.1 inch pitch, and that I could use the FTDI adapter to connect directly to them when the case was closed.
Visible in the picture above is the fitted webcam, with USB wires made intentionally too long. After fitting the pi to its permanent place, the wires were shortened by taking a section out of the middle, which is much easier than resoldering either end. Also visible is the solenoid for the shutter mechanism, which I've added wires to. Previously it was soldered to the flexible PCB.
I planned to re-use the battery and charging circuit of the thermal printer. This is a 7.4V lithium-ion which means we can just step-down to 5V from it. I didn't check if there was already a 5v step-down on the thermal printer board, it's probably 3.3v and even if there was 5v it wouldn't be rated for the power draw we need, to power the pi and the camera and everything.
I decided to fit a hard switch for the battery. It won't charge unless it's on, of course, but on the plus side we can turn everything off with one switch and not need to worry about standby power usage. I felt a little pang of guilt while attaching it, it seems unholy to be using a screw in a camera like this.
It's mounted at the front panel, behind the flap that's used for loading film cartridges. This seems the most logical place to fit extra controls.
Yet more cutting and gluing was involved in mounting the battery. It seemed logical to put it where the mirror had been, but that wasn't at all easy. And thinking ahead to where the roll of paper will go, suddenly things started to look very cramped indeed.
On the left is the pi, of course. Some of its GPIO pins have been wired up to the shutter switches. I reused the original terminals to the 6v battery as power terminals here, and between them is a small step-down module set to 5.1V. It's always on, except when the battery switch is shut off. Had we not been in such a hurry, something more desirable might have been possible. On the right we have a circuit used for triggering the shutter solenoid.
This circuit was hastily thrown together and didn't work properly, but went something like this:
A high-side switching mosfet that lets the low-voltage output pin on the pi short the full battery voltage across the solenoid. There's a huge cap, and a low-value resistor. The idea was that I could adjust the value of this resistor (labelled 100R above) so that there was just enough energy in the cap to fire the solenoid, but not enough to hold it open, so it would spring back. I think I made a couple of mistakes in this circuit, there probably should have been a protection diode, there probably didn't need to be current limiting on the mosfet gate, and I might have damaged the mosfet by wiring it up wrong to begin with.
Still, it functioned enough to get a click, if not as good a click as when the battery was shorted directly to the solenoid.
The GPIO abstraction on the Pi, WiringPi, is excellent. It's everything an abstraction library should be, no fuss, just set this pin as an output and make it high or low. Compare to the abstraction layers on the STM32 series of chips, where you need register-level knowledge to get anything to work, thus defeating the point of an abstraction layer entirely.
More importantly, the WiringPi package comes with a binary so we can easily work it into our shell scripts. One very useful feature is wfi (wait for interrupt) to wait for a rising or falling edge by blocking execution. I wired both the half-depress and the full-depress to the pi's GPIO, even if we only end up using one of them.
Prepping the printer
The print head is removable from the board, attaching by a ribbon that goes into an FPC connector. I'd been trying out various orientations for it throughout the cutting and gluing phases, but not with the main board hanging off of it. The ribbon isn't exactly long, and the orientation to get the print-head as close to the front as possible means that the ribbon will be forced to fold back on itself. We could sacrifice position, moving the print head further away, but that would either mean big gaps between pictures, or not being able to see the picture until a few more have been taken. Neither option is attractive. The circuit board can just about fit underneath the print head, where the cartridge would have sat, but in addition we need to feed the paper through there so it's a very tight fit. The paper roll can just about go into the main cavity next to the battery, but with the orientation (the paper can only be printed on one side) the roll needs to be mounted backwards, with the paper doubling-back on itself. Not ideal.
There's more. The printer has a daughterboard with the controls and lights on it. I was doing this on the morning of New Year's Eve, with the deadline looming, and the compromises were starting to get heavier. There's only one absolutely essential component on the daughterboard, the soft-power switch. With further experimentation I could have potentially tricked the printer to powering up when the battery is connected, but I didn't have time for that now. All that's needed is a resistor and a push switch. The LEDs aren't needed, and the feed switch would have been useful but isn't critical to have.
The battery terminals were extended, of course, and the charging barreljack was desoldered and put onto flying wires (I doubled up the thin gauge wire for flexibility without compromising the charge current). The thermistor lead to the battery was soldered directly once the board was roughly in place, it isn't cut when the battery is disconnected, but it shouldn't matter.
Compromises, compromises... the soft power switch was stuck next to the hard one. Not at all pretty, but at least they're covered up when the flap is closed.
This also gives an idea of where the printer board has to sit, just because that ribbon is so short. Life would have been made easier if I'd ripped out the autofocus mechanism, but even with all the compromises I couldn't bare to do that – deep down, some part of me assumed I'd come back to this and finish that bit.
Making room for the printer meant gutting everything in that front mechanism. I'm not sure if I got the point across yet about how much cutting and drilling this project involved.
That's after sawing through the bearings on one of the rollers. There's a spring-steel lever that applies a lot of pressure between them, and the metal gear is driven by the mechanism on the main unit that we ripped out earlier. I removed all of the metal, then a lot of the plastic, then some more plastic, and then some more plastic again.
It was about 7pm when I finally got the whole thing closed up and apparently intact. I didn't have time to test it. I just chucked everything in my bag and headed out.
Get your shebangs right
Although everything should have been dandy, I hadn't actually done one of the most crucial bits, that is, tie everything together with bash scripts.
So, coolest kid on the block, I arrived at the New Year's Eve party with a serial cable and a laptop in order to finish programming my camera.
Lucky I'd stuck that serial port on the outside, eh?
Above is a re-enactment of how the serial cable attaches. Pretty neat, or at least it would have been had I not subsequently needed to dismantle the camera anyway. The mosfet for the solenoid had been wired up incorrectly, and I soon noticed the side of the camera was getting worryingly hot. I had to pull the thing apart, and cut the wire to the mosfet, thus (temporarily) breaking the shutter solenoid action, but giving us a working camera.
BusyBox is not bash. It might behave a bit like it, but it's actually ash, and one crucial point to look out for is to get your shebangs right. In my haste I'd automatically started writing my bash script with the line #!/bin/bash when it should have been the more generic #!/bin/sh. Confused and in a rush, I didn't spot that but I did note that you can invoke a script manually by typing ash shoot.sh. In that case, it doesn't need a shebang at all, and it doesn't even need the executable flag set.
We'd condensed everything individually into convenient scripts, so all that was left was to construct an infinite loop that listened for the shutter press and ran our scripts. It looked something like this:
while true; do
gpio wfi 27 rising
ash shoot.sh
ash print.sh
done
The jpeg image is passed between the two scripts by being stored as /tmp/output.jpg. In /etc/fstab, /tmp/ is mounted as a ramdisk / tmpfs so this should be very quick, and should also prolong the life of the SD card.
At last, we were able to take some pictures. Or were we? Disaster as the paper almost immediately jammed on one side. Turns out I hadn't cut enough plastic away, and the print head was not horizontally aligned with the paper, causing it to crumple up on one side.
Not to despair, I did the only sane thing any sane person would have done in an insane situation like that: I taped the print head in place using duct tape. And it worked!
Guests at the party were not particularly unnerved by the presence of duct tape on an otherwise marvellous instant camera.
Here are some shots from the event, taken on a phone camera shortly after several metres of pictures were taped to the walls.
On the left, yours truly wearing some traditionally ridiculous headgear. Couple of paper jams are obvious on the right hand side.
A few interesting closeups, and yes, it's a tea cosy. Shaped like a chicken tabby cat. We did find that the viewfinder in the camera didn't quite line up with where the webcam was pointing, it would be helpful if the print-area was circumscribed onto it.
And there's a man with a box on his head. His identity shall remain unknown. In the middle-left of the frame there's a picture of my GPS Precision Clock which I'd also taken with me to the event, it's an excellent prop when countdowns are involved.
Ah, but folks, it's not over yet! The camera performed perfectly, but there's still the matter of a few important final touches.
Automation
We compromised in many ways, but there's one compromise we can't get away with. In order to use the camera on New Year's Eve I had to start it up and then run our script using the serial terminal. A finished camera needs our software to start automatically.
This sounds super easy, but I was especially cautious about messing this up. I'm editing the init scripts using the serial port, but if we bugger up the boot process we have to completely disassemble the camera in order to access the SD card and fix the problem. I was already aware that the scripts in /etc/init.d/ are blocking, that is, the init process waits for them to finish before continuing. Our script is an endless while loop, waiting for button presses, so that won't work.
I was informed by Tom that the correct place to invoke our script is in /etc/inittab. BusyBox handles inittab a little differently to normal, not only are some features not supported but it will even work without the inittab file at all as it has built-in defaults. The mistake I made was that I copied the line that invoked /etc/init.d/rcS, that is, the action is specified as "sysinit", which means that I ended up invoking it in a way that waited for it to terminate after all.
Not only that, but I'd been extra cautious, and instead of an endless while loop, I'd stuck a count to 100 before exiting. Only, the way I incremented the variable was with the ((var++)) syntax, which isn't supported in ash!
My own stupidity then is the only thing we can blame here for needing to dismantle the camera yet again. It's possible to solve the sysinit problem by simply forking another process to the background, but the correct action to set is "respawn", the same action that's used for starting the terminals.
Worse still is that during re-assembly, I damaged one of the wires and broke the USB enumeration for the webcam. Oh how my heart sank as I witnessed the enumeration error -32 yet again, I thought I'd seen the last of it. Another dismantling and I located the fault (it was where I had joined the differential pair in the middle, not at either end) and reassembled it for hopefully the last time now.
Or at least, the last time until we have to restock the paper roll. It's too big to fit in through the front flap, so the only way to reload it at the moment is to pull the front fascia off. Thankfully there's at least three or four hundred pictures per roll. Back before I started compromising everywhere, I had planned to cut an opening in the bottom to facilitate easier reloading, but in the end it probably wouldn't have been all that useful. As I mention in the video, the best idea would be to allow a whole roll to be sucked in via a motorized reel, but this would come with a whole extra pile of engineering problems. Hmm, reinventing the reel – maybe next time.
More final touches
Long before the final assembly I'd wired the little LED under the viewfinder to one of the pi's GPIO. I'm not sure what it originally represented, as it's quite unpleasant to have an LED directly in your eye. To be fair, the original LED from the 70s was exceptionally dim, and maybe I was mistaken when I replaced it with a modern equivalent. The best use of this was probably an indicator that everything is ready to go. I set the LED output on when our initialization takes place, then once both /dev/video0 and /dev/usb/lp0 have appeared, the LED turns off and the main script begins.
I mentioned that the solenoid didn't work on New Year's Eve, so after fixing the wiring mistake I was able to implement this too. Instead of clicking on and off through hardware, it was easier to just momentarily pulse the pin controlling it.
This script can then be invoked with a trailing ampersand, which forks it to the background. Even if the sleep was for several seconds, it wouldn't delay the processing of the image after the picture's taken.
And of course the last big fix that's left was the mechanical mounting of the print head. It only needed to be moved over about 3mm, but that required a whole extra afternoon of gentle plasticwork. In the end, everything fit together nicely. The following pictures have the flap open to demonstrate how close the print head is to the front, and how little material of the front flap remains.
The photo below shows the arrangement and how the ribbon to the print head has to fold back on itself. The barrel jack for charging is glued to the print head on the right hand side.
With the flap closed, you wouldn't know this was modified at all, except for the missing front element, and the fact it prints onto paper.
The corner of the flap there was damaged when I bought the camera, and remains as the only bit of exterior plastic to show any damage.
Our final shell script looked a bit like this.
#!/bin/sh
gpio mode 27 in # Shutter button half press
gpio mode 27 up
gpio mode 25 in # Shutter button full press
gpio mode 25 up
gpio mode 1 out # Shutter solenoid mosfet
gpio write 1 0
gpio mode 4 out # Viewfinder LED
gpio write 4 1
while [ ! -e /dev/video0 ] ; do sleep 0.1; done
while [ ! -e /dev/usb/lp0 ] ; do sleep 0.1; done
gpio write 4 0
while true; do
gpio wfi 27 rising
v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=0 --device=/dev/video0
v4l2-ctl --stream-mmap=1 --stream-count=1 --stream-to=/tmp/somefile.bin --device=/dev/video0
/root/yuyvArm /tmp/somefile.bin /tmp/output.jpg
python ep2.py /tmp/output.jpg >/dev/usb/lp0
echo " ">/dev/usb/lp0
done
BEIJING—In a move that could further heighten tensions with the U.S., China is poised to announce a new fund of about 300 billion yuan—$47.4 billion—to spur development of its semiconductor industry as it seeks to close the technology gap with the U.S. and other rivals, according to people familiar with the matter.
The new war chest by the government-backed China Integrated Circuit Industry Investment Fund Co. follows a similar fund launched in 2014 that raised 139 billion yuan ($21.8 billion), largely funded by central and...