Show HN: A curated list of insecure Python packages - <AUTHOR> https://github.com/pyupio/safety-db <comment><USER2> Can you get in touch with the guys at OWASP Dependency Check? It's one of their more mature projects, and it essentially does a lot of what you described and then some, including for Python projects.

[https://www.owasp.org/index.php/OWASP_Dependency_Check](https://www.owasp.org/index.php/OWASP_Dependency_Check)

I can make a connection between you and Jeremy Long (head of the project) if you'd like. He's also on twitter as @ctxt

</comment><comment><USER3> Just a single wrong character can really ruin a package

</comment><comment><USER4> HN title contains a misspelling: insucure should be insecure

Unless insucure is a Python package I do not know about.

</comment><comment><USER5> What standard are you applying to distinguish "insecure" from "secure"?

</comment><comment><USER6> This can detect when a CVE vulnerability is fixed but how would you know the version number at which it was introduced?

<comment><AUTHOR> Most CVEs have a pretty good descriptions. For example CVE-2016-6186[1]:

Cross-site scripting (XSS) vulnerability in the dismissChangeRelatedObjectPopup function in contrib/admin/static/admin/js/admin/RelatedObjectLookups.js in Django before 1.8.14, 1.9.x before 1.9.8, and 1.10.x before 1.10rc1 allows remote attackers to inject arbitrary web script or HTML via vectors involving unsafe usage of Element.innerHTML.

[1] [http://www.cvedetails.com/cve/CVE-2016-6186/](http://www.cvedetails.com/cve/CVE-2016-6186/)

</comment></comment><comment><USER7> It doesn't seem to be loading all the data when you browse the "human" site. Stops at ftw.mail (if there's a way to go on to the next page, it isn't obvious)

</comment><comment><USER8> This is _awesome_. What a great service! Just curious, what stack did you use for the human browsable site and database? I am looking for a quick data reporting stack like this that is hopefully easy to set up in Python. Any advice?

<comment><AUTHOR> I wouldn't call it stack, really. It's just a little bit jQuery flavored JavaScript that loads the DB via ajax and adds all entries to the DOM. Under 30 LOC: [https://github.com/pyupio/safety- db/blob/master/docs/index.h...](https://github.com/pyupio/safety- db/blob/master/docs/index.html#L67)

It's a bit dirty, but was the right tool for the job. If you are working on a larger project, I'd probably use some template language like mustache to render the elements.

</comment></comment><comment><USER9> Really cool stuff. I love it! Thank you for making this.

A side note anyone using Django should keep up to date. If you see the list of versions and the related packages which have known vulnerabilities you will realize keeping up to date is critical.

</comment><comment><USER10> Is the backend getting hammered? [https://pyupio.github.io/safety- db](https://pyupio.github.io/safety-db) is just looping a loading animation.

<comment><AUTHOR> The site is loading the data directly from the repo. Maybe HN has triggered some abuse mechanism.

Edit: Switched to S3 to load the data.</comment></comment>


Overclocking Cooling with Transformer Oil - <AUTHOR> https://hackaday.com/2018/11/15/measuring-the-cooling-effect-of-transformer-oil/ <comment><USER2> One of the comments mention deionized water. That's something I've been wanting to experiment with, to see if you can realistically keep water dielectric over time as an immersion cooling medium.

Given that commercial applications would rather stick to the super-expensive Fluorinert I suspect it's a pretty hard problem to solve.</comment>


How to get/generate free music for a game? - <AUTHOR>

For example, do you know of any free software that generates generic but passable music in various styles? <comment><USER2> Depending on how 'sophisticated' you want the music to be, there are more & more decent online Flash/JS sequencers that you could record.

<http://beaterator.rockstargames.com/beaterator.html>

<http://www.lilyapp.org/about/>

<http://www.ampledesign.co.uk/va/>

There's also this collaboration site: <http://www.kongregate.com/collabs>

For more ideas, have a look through CDM: <http://createdigitalmusic.com/>

</comment><comment><USER3> I know you're asking for free ... but look into istockphotop's audio collection if you're willing to spend a little money. It's a very affordable option with a huge range of loopable tracks, and artists that are responsive to specialized requests. Just make sure the licensing options meet your needs for distribution.

<http://www.istockphoto.com/audio.php>

</comment><comment><USER4> Depending on how much time/effort you want to invest... AFAIK Pure Data [1] was used for generative (background) music scores in SPORE. Maybe this is a good place to start: [http://obiwannabe.co.uk/html/sound-design/sound-design- all.h...](http://obiwannabe.co.uk/html/sound-design/sound-design-all.html)

[1] <http://puredata.info>

</comment><comment><USER5> Your best bet is probably to try the Creative Commons-licensed music at jamendo.org or ccmixter.org.

<comment><USER6> I've been involved in developing NAEV [0]. Some of its music is "stolen" from other games under CC license, and some was produced by players.

You can start by borrowing music from other games and put an announcement (on forums, mailing lists, in game) saying that you need music. If people like your game somebody with musical skills will help you creating soundtracks eventually. Just don't expect this to happen overnight. NAEV has been under development for over 6 years.

[0] <http://github.com/bobbens/naev>

<comment><USER7> Have you heard about Space Rangers ? <http://en.wikipedia.org/wiki/Space_Rangers_%28video_game%29>

</comment></comment></comment><comment><USER8> Magnatune (<http://magnatune.com>) CC-licenses all of their music. It's free for non-commercial use. They also do royalty-free licenses for commercial use, as for example Braid which used some of their music.

</comment><comment><USER9> not sure if software is free, but check out [http://arstechnica.com/science/news/2009/09/virtual- composer...](http://arstechnica.com/science/news/2009/09/virtual-composer- makes-beautiful-musicand-stirs-controversy.ars)

it also mentions a book that presumably discusses the algorithms. book: [http://mitpress.mit.edu/catalog/item/?ttype=2&tid=10661](http://mitpress.mit.edu/catalog/item/?ttype=2&tid=10661)

</comment><comment><USER10> Go hang out on demoscene music forums and IRC channels. I'm sure there are plenty of musicians that would be happy to pitch in some music for some recognition.</comment>


Meerli (beta) - Showcasing Exceptional Mobile Designers And Their Designs  - <AUTHOR> http://meer.li

<comment><USER2> It would be great for things like pintrest if you said what the names of the apps / designers were in the alt information per image

<comment><AUTHOR> Definitely will do that. Thanks for the tip.

</comment></comment><comment><USER3> Seems like most of these designs are concepts. Are there venerable designers on here to learn from?

<comment><AUTHOR> Holger, co-founder of Meerli here.

A lot of them definitely are concepts. That always happen when you ask designers to show of their hot stuff, but we do also have some very cool designers, who're showing off some very cool apps, that has been released. For example <http://meer.li/designs/clear> or <http://meer.li/designs/wthr-app>.

Prismatic also uploaded their upcoming app <http://meer.li/designs/prismatic>, which is really hot as well. I've gotten to play around with it a bit and it's smoking hot UX-wise :-).

<comment><USER3> Cool! You should feature these on your front page!

<comment><AUTHOR> I am... What are you seeing when you get on the site?

</comment></comment></comment></comment><comment><USER4> Pretty cool site; I was a bit disappointed that it was for mobile only.

<comment><AUTHOR> Any other designs you would like to use it for? :-)</comment></comment>


Fuck Up the Internet with Absolute CSS Selector Paths - <AUTHOR> http://nemrow.tumblr.com/post/96892506800/fuck-up-the-internet-with-absolute-css-selector-paths

<comment><USER2> Dope extension bro!</comment>


Lyft lays off 17% of workforce, furloughs hundreds more - <AUTHOR> https://www.cnbc.com/2020/04/29/lyft-lays-off-17percent-of-workforce-furloughs-hundreds-more.html <comment><USER2> Layoffs are mounting, alternative work is limited, and the unemployment systems in many states are either broken or running out of funding. Add the federal governments indicated desire to let blue states go bankrupt and we are looking at a good combination to enter a depression.

Its a pretty sobering time.

<comment><USER3> There was an interesting piece in this week's Atlantic on the motivation for having states declare bankruptcy:

"Under the Constitution, bankruptcy is a power entirely reserved to the federal government. An American bankruptcy is overseen in federal court, by a federal judge, according to federal law. That's why federal law can allow U.S. cities to go bankrupt, as many have done over the years. That's why the financial restructuring of Puerto Rico can be overseen by a federal control board. Cities and territories are not sovereigns. Under the U.S. Constitution, U.S. states are.

Understand that, and you begin to understand the appeal of state bankruptcy to Republican legislators in the post-2010 era."

[https://www.theatlantic.com/ideas/archive/2020/04/why- mitch-...](https://www.theatlantic.com/ideas/archive/2020/04/why-mitch- mcconnell-wants-states-go-bankrupt/610714/)

<comment><USER4> His unwillingness to not solve the state's pension problems should be applauded. the amount of unfunded liabilities is in the hundreds of billions of dollars and approaching a trillion if it has not passed that already. This all happened because the number of public servants who are pulling in over 100k has skyrocketed... 100k+ in retirement.. with millions past 50k! Think about that 50k in pay plus medical.

These pensions and their medical side are the reason why the ACA did not touch golden medical plans because the vast majority are in this area along with certain other larger private pension systems. By the way, the House silently dropped that provision entirely from the ACA in 2019 so they any taxation of them is gone.

My favorite story to fall back on is provided below... and there are other states worse off. This type of largess should never have been allowed nor should the tax payer bail them out. People bemoan the pay of executives at private companies, well guess who is right up there in many cases.

[https://www.forbes.com/sites/adamandrzejewski/2018/10/26/ill...](https://www.forbes.com/sites/adamandrzejewski/2018/10/26/illinois-100000-club-94000-six- figure-public-employees-and-retirees-cost-taxpayers-12b/#5b185547481a)

<comment><USER5> This is just crazy to me, this public servants takes unprecedented risks and take lower pays so they can take stable retirement.

Now it comes time for due, we don't want to fund these anymore.

The entitlement in HN is just too much.

<comment><USER6> What risk is an accountant sitting in SF City Hall taking? High risk positions - sure give them more security. Otherwise, treat them like everyone else. Also, people goto govt jobs because of job security as well - which is also a factor in lower income.

<comment><USER5> if you are going to cherry-pick, then so be it.

what about the police, fire department?

<comment><USER7> I don't think the police or fire are taking "unprecedented" risks.

<comment><USER8> Perhaps not, but I don't think it's unreasonable to ask for a risk premium in your compensation. If you're more likely to die or be critically injured earlier than someone else of the same age solely because of the work you do, and your family depends on your income, it's not unreasonable to expect to be paid more to make up for the lost expected lifetime income.

(This is true for all dangerous professions, BTW - not just law enforcement and medical personnel.)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> This seems like a great time for Amazon or Google to buy Lyft.

Amazon could bundle rides with package deliveries and get the pre-existing driver and passenger network from Lyft. Lyft was actually telling drivers to work with Amazon when the pandemic started (1).

Waymo could take Lyft's aggregated rider demand. They already have a partnership to transfer autonomous rides from Waymo to Lyft during bad weather situations and refer Lyft riders to Waymo vehicles (2).

Edit - links below.

(1) Amazon - [https://www.theverge.com/2020/3/27/21197699/lyft-amazon- coro...](https://www.theverge.com/2020/3/27/21197699/lyft-amazon-coronavirus- ridership-decline-job-referral-warehouse-grocery-delivery)

(2) Waymo - [https://www.fool.com/investing/2019/05/08/waymo-lyft- partner...](https://www.fool.com/investing/2019/05/08/waymo-lyft-partner-self- driving-vehicles-phoenix.aspx)

<comment><USER10> _This seems like a great time for Amazon or Google to buy Lyft_

Or maybe Apple.

Apple has been pouring millions into improving its street views in Apple Maps. It should buy Lyft. Pay the drivers an extra $x/mile to clamp the Apple Maps image gathering device to the roofs of their cars.

The drivers win because they get a bump in income in an industry that's already hurting.

Apple wins because it gets up-to-date information about the places where people go most.

Even better: Apple could pay them $x/mile to drive to specific areas where the data is stale or missing.

As a former Uber/Lyft driver, I'd be all over this like Oprah on a baked ham.

<comment><USER11> > Pay the drivers an extra $x/mile to clamp the Apple Maps image gathering > device to the roofs of their cars.

Scenario 1 (buy Lyft): So if Lyft has around 1 million drivers in USA [1], and Apple will pay them an average of $50/month to use the device + the cost of the device/installation (around $100) that would cost around $150,000,000 on top of the acquisition price. And you cant really be sure that they covered all roads.

Scenario 2 (hire drivers): US total road length is about 4 million miles, average driver can cover about 160 miles a day (8 hours * 20Mph). If you want to drive through all of the US in 30 days you would need around 800 drivers. If you pay them $5000/month to do that, that would cost you "just" $4 million.

[1] [https://investor.lyft.com/news-releases/news-release- details...](https://investor.lyft.com/news-releases/news-release-details/lyft- announces-record-second-quarter-results)

<comment><USER12> Presumably there's more valuable data than just maps. I would imagine that Lyft could give valuable real-time data like areas of the city where there's traffic congestion and slower drive times. It's unclear how you'd value that, but it seems like an acquiring company would get more than just raw map data for all available streets.

</comment></comment></comment></comment><comment><USER13> \- The tech companies having issues during covid-19 are all heavily invested in travel/transportation(Uber/Lyft/Airbnb etc).

\- They also are in industries that entirely use gig workers with personal contact in 90% of their services(airbnb the least of these).

\- I don't see other tech companies getting hit this hard(the sky is not falling!).

\- I really, really hope these laid off engineers find other jobs quickly and land on their feet.

<comment><USER14> The tech companies you identified are getting hit 1st. I expect to eventually see fallout in Fintech, Realestate, Advertising, anyone selling B2B SaaS (particularly to marketing/HR/ sales departments, SMB), etc. It will take time to feel the 2nd and 3rd order impacts. Hopefully, we bounce back quickly, but it's hard to not be a little concerned.

<comment><USER15> Unless their investors believe in a V-shaped recovery afterwards, and are willing to spend money now to gain market space from competitors who would die in the meantime.

</comment></comment></comment><comment><USER16> Also: "Lyft's other cost-cutting measures include furloughing 288 employees and base pay reductions of 30% for executive leadership, 20% for VPs, and 10% for all other exempt employees. Board directors will give up 30% of their cash compensation during Q2."

<comment><USER17> >>> base pay reductions of 30% for executive leadership

Aren't executives mostly paid in stock and bonus?

<comment><USER18> Paying people in stock and performance bonuses is ideal during a downturn. It doesn't cost the company anything to pay people in stock, since it just siphons off value from all existing stock, and nobody's getting their performance bonus!

<comment><USER19> > anything to pay people in stock, since it just siphons off value from all > existing stock

wait what?

<comment><USER20> Creating new shares dilutes the existing share value. Paying employees in shares means you're diluting the stock value every time.

Of course, for most publicly traded companies there are so many outstanding shares that this is negligible.

<comment><USER19> I thought most executive compensation was paid out of pre-allocated shares.

<comment><USER20> Most employees are not executives.

<comment><USER19> If you scroll up, the question was "Aren't executives mostly paid in stock and bonus?"

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER21> There was a person in the Uber thread yesterday who predicted this. I wonder if they'll go back to hiring if this is over or they're using as an opportunity to get rid of people they shouldn't have hired in the first place.

<comment><USER22> My guess is both, they're doing some cleanup and will go back to hiring.

<comment><USER21> Possible. I remember going a Lyft event in mid-2018 and they were telling me that they had just doubled their team size and were looking to double again by the end of the year, so they were certainly hiring fairly quickly then.

</comment></comment></comment><comment><USER23> > Lyft is laying off 17 percent of its workforce and furloughing 5 percent. > This is after an employment lawyer at the company accidentally invited much > of the workforce to a weekend meeting called "Jetty" in what workers took to > be a reference to jettisoning jobs.

[https://twitter.com/kateconger/status/1255526352813535232](https://twitter.com/kateconger/status/1255526352813535232)

<comment><USER24> Isn't a "jetty" a defensive barrier to protect a harbor against storm tides? Dumb move to accidentally invite everyone to a meeting with a codename, but not a dumb codename as you protect a company from a storm.

<comment><USER25> Not to get too far on this tangent, but, for me, "jetty" doesn't evoke "jettison" but either:

1) Those little docks like in Venice (cf. "Let me off at this jetty" in _The Last Crusade_ ).

2) The jetty server library that Jenkins uses which shows up in error messages.

<comment><USER26> 3) the short film that 12 Monkeys was based on

<comment><USER27> La Jetée

</comment></comment></comment></comment></comment><comment><USER28> Lyft alum here, and other alumni are working to try to help out here.

See here: [https://twitter.com/haddartha/status/1255559084012699650](https://twitter.com/haddartha/status/1255559084012699650)

Also, there are alumni facebook groups and slack channels. If those are for you, email me: firstname.lastname@example.com

</comment><comment><USER29> In the long term I think this will be a solid move for both Uber & Lyft. The apparent economics of both businesses are relatively dire but the long term value prop is still as important as ever: they are generating the consumer data that will ultimately be used for self driving vehicles.

This will allow both companies to trim the fat and (hopefully) regain the move fast mentality that is necessary for a startup. This can be Uber and Lyfts time to shine.

<comment><USER30> Do they fully instrument their drivers vehicles? I'd imagine a lot of sensor data is needed for self-driving cars.

<comment><USER29> No, but they have a good understanding on routes and areas with high traffic. That data is going to be worth a fortune for the first fully autonomous taxi service.

<comment><USER31> All that routing data (and much more) is also funnelled to Google via Maps/Waze and, to a lesser extent, Apple or other companies with map apps. So I don't think Lyft or Uber have a competitive advantage here, even if the routing data is useful absent full instrumentation. Plus, full self driving seems a bit like a nuclear bomb, by which I mean second place in that race might be worth nothing.

</comment></comment></comment></comment><comment><USER32> Uber/airbnb/lyft were considered in the same tier as facebook/google before corona. With google also slowing hiring, are the engineers laid off all going to be absorbed by facebook?

<comment><USER33> This will play our more like the dotcom burst than the 2008 crisis.

For most younger people here this may come as a shock but tech jobs can disappear, for years.

The job market in 2019 felt a lot like the job market in 1999, people rushing to get upskilled so that they could get into software and make ridiculous money. After the dotcom burst huge number of people left tech, or at least left the world of software development. Salaries also went way down for nearly a decade.

A common comment here on HN with layoffs is "well they're just getting rid of superfluous employees, so this is no big deal". This assumption is both ridiculously callous about real people losing job, it also underestimates how much work is superfluous in SV.

It is very possible that tech will take a serious hit this time, and that the total number of software engineers, data scientists, dev ops people etc will go do... for years. And likewise salaries will also drop (TC automatically does this thanks to the magic of RSUs).

Certainly people will need software and software engineers, just likely not nearly as much as they do now. Once FAANG realizes there's no longer a need to keep talent off the market, expect salaries to take a dive.

<comment><USER34> People have been calling software engineering wages a bubble for 20 years, and trying to call "the end of tech". I just don't see it, highly proficient software engineers are more valuable than ever. The wages are higher than ever. Going forwards, tech is really the only engine of growth in the American economy. Trying to say tech will be under for years is like saying the USA will be in a massive recession for years. I just don't believe it.

<comment><USER35> When you've got 100s of thousands of unemployed talented engineers on the market, you're not going ot be able to sustain $200k salaries for people who know how to write a yaml file for long.

<comment><USER34> Not when the FED is printing so much money. That money has to go somewhere, and a lot of it ends up funding new startups and new corporate debt.

</comment></comment></comment></comment></comment><comment><USER36> Ok, I seriously don't get this. How is the stock market doing so well? This article about Lyft is just but one glimpse of what's happening to the economy. And it ain't going to get better any time soon. I've been waiting to invest in the stock market, but am totally whiplashed by the rise of stock market. It's completely disconnected from the real economy.

<comment><USER37> There is someone more informed to comment on this but the reason is the Fed. They are buying corporate debt. That's a pretty drastic thing to be doing. This recent commentary by the Fed chairman describes the scene, the money tap is wide open. [https://www.bloomberg.com/news/articles/2020-04-29/powell- vo...](https://www.bloomberg.com/news/articles/2020-04-29/powell-voices-worry- about-long-term-economic-damage-from-virus)

<comment><USER38> What I don't understand is, what are the consequences are? If there is no, why didn't this just always happen and we'd all be rich?

I've read other articles which say that essentially we're losing the ability to really valuate equities because of all this free money being injected into junk bonds etc hides the true valuation.

As far as I can tell, stocks are more valuable, but only numerically, they're actually more worthless than before because the company and the economy as a whole has stopped.

<comment><USER37> The real value of the currency is supposed to (at least theoretically) be hurt by this. Printing money to solve problems either leads to hyperinflation in the extreme, a deflationary trap that Japan has been in or some new thing we are creating. Maybe because the whole world is doing it all at once it'll be ok?

<comment><USER38> Maybe most equities are so hopelessly valuated and there is just so much funny money in the stock market that it hasn't made sense for a long time and this just demonstrates how useless it is except for those who know how to game it?

I'm not saying I believe this entirely, but there needs to be some better explanation for Lyft is up > 2% today after that news?

</comment></comment></comment></comment></comment><comment><USER39> Crap, I was scheduled to go on internship with them this summer, but I feel like that might quickly no longer be an option..

<comment><USER40> I quit a job in defense software in October, took a couple months off, and now this shit. Many companies took down their job boards entirely and some don't even render correctly with no items listed. Many in-progress interviews I had got put on hold, and now the job market is about to be flooded with out of work talent, raising competition and lowering the salary I'd probably get. Many places I've applied to have since announced massive layoffs (Toast, TripAdvisor, etc), some mere days after I've applied.

I'm fortunate to have a lot of liquid saved but I'm feeling for engineers with families and not as much saved.

Stay positive!

<comment><USER41> Yeah Boston area hit pretty hard

<comment><USER40> How did you doxx me?

<comment><USER42> Probably coz you said Toast?

</comment></comment></comment></comment></comment><comment><USER43> If they are really letting go of their hard found engineering talent its a serious signal that they don't believe this to be a short term issue. Assuming the highly paid engineers around the bay took a good deal of effort, and significant cost to hire.

<comment><USER44> Do note that laid off engineers are typically from teams that have overhired and where we don't have plans to grow, as well as engineers who did not get a good rating and are less promising. It is sad nevertheless.

</comment></comment><comment><USER45> Lyft is up 5% today, but the market (S&P 500) is generally up 2.94%.

<comment><USER46> Both uber and lyft are flying today. Most people see cutting jobs as a bad thing, market probably sees it as a cost savings and great business decision.

<comment><USER47> Lyft and Uber are disproportionately impacted by coronavirus news, and the remdesivir drug trial seems to have been a success, so Lyft and Uber are up more than the rest of the market.

<comment><USER46> So many companies are disproportionately affected to varying degrees. Not all up. If you are referring to this news (1), take it with a grain of salt. Look at the % recovery, look at those N's, look at those p values. Gilead is pumping today, but imo this isn't a smoking gun study. The drug needs to be administered to more patients to get more statistical power and draw meaningful conclusions on efficacy.

Then again, wall street doesn't know their N's and p's. Gilead could have put out anything today and the stock would be flying on speculation due to none of the hungover 24 year olds moving millions at goldman sachs actually reading the study, much less interpreting it. Of course, this is just my take. Maybe you are right and this does explain the pump, I guess we will read about it this evening.

1\. [https://www.gilead.com/news-and-press/press-room/press- relea...](https://www.gilead.com/news-and-press/press-room/press- releases/2020/4/gilead-announces-results-from-phase-3-trial-of- investigational-antiviral-remdesivir-in-patients-with-severe-covid-19)

</comment></comment></comment></comment><comment> Digit-Al Does anyone else find the headline really weird? Having "17%" next to "hundreds more" makes the "hundreds more" look like the important figure, whereas in actuality the "17%" is really the important figure.

</comment><comment><USER48> As a company, is there reason to believe that Uber can better weather the storm? Does Lyft do anything other than rides?

<comment><USER49> Uber eats is the biggest delta between the two companies, I suspect they still will need to cut staff though.

<comment><USER50> Nah, that's not it. I drove for both in a major city in the months before the virus and outside of peak hours Lyft always has substantially longer pickup times. This is based on a few hundred rides for each company. This means that they have fewer passenger per driver, so the biggest delta is a smaller user base. Once the lockdown began Lyft rides basically evaporated overnight, while Uber was still going strong at certain times and certain places, catering to essential workers. But both are worthless as a way to make money right now.

<comment><USER51> I believe Lyft generally has a slightly wealthier clientele: more middle-class people choosing not to drive. Uber has more reach in the lower ends of the market. So when the stay-at-home orders flooded in, these middle-class people all stayed at home, while Uber was still serving essential workers.

</comment></comment></comment></comment><comment><USER52> While the short to medium-term impact of this is terrible, I am optimistic that a few of these individuals (not the usual high profile stars) will kick start the next big idea.

Do we have a list of affected individuals listed to work on interesting projects?

Wish HN can curate a Database of individuals open to working on special projects that could lead to a YC submission

</comment><comment><USER53> $36mil/1000 employees works out about 36k in severance. What happens to people who got stock grants that vest over 4 years?

<comment><USER54> RSUs for rank and file employees usually vest over time (e.g. quarterly), so you keep any that have vested but lose the rest.

</comment></comment><comment><USER55> Source that is linked in the article: [https://www.sec.gov/ix?doc=/Archives/edgar/data/1759509/0001...](https://www.sec.gov/ix?doc=/Archives/edgar/data/1759509/000119312520125193/d848949d8k.htm)

</comment><comment><USER56> I recall Lyft being the highest paying company with respect to rank, according to levels.fyi.

I guess I'm glad I don't work there right now.

<comment><USER44> Lyft SWE here. Can confirm. My Lyft offer was significantly greater than Google, Uber etc. That said, with 20/20 hindsight, Google would have been a safer choice.

<comment><USER57> Is Lyft a sensible work week in exchange for their positively mental salaries?

<comment><USER44> I like working at Lyft, and if not for the stock more than halving since the IPO and now the Covid storm, I wouldn't question my decision. There are a ton of interesting problems to solve and lots of smart people (ex-fb, google etc if that is a measure). The leadership is ethical and supportive. We're generally not coasting and it is easier to advance your career faster than Google, while not having the threat of a PIP all the time like Facebook and Amazon (apparently). We don't work on fluff or building tech in house just for the heck of it because we've historically been conservative in entering businesses and focused on rideshare, and we've not been as awash with $ and people to spend on experimental projects. Prioritization is key here.

</comment></comment></comment></comment><comment><USER58> is there existing analysis of effect of layoff on future stock price?

</comment><comment><USER59> welp

</comment><comment><USER60> Should have done lyft eats</comment>


Developers Copyright  - <AUTHOR>

Ok I know about the GPL and open source.  But I want to write a copyright to give a client that says I have rights to use the framework for other clients.  Essentially giving me the right to reuse code.  Anybody have something like this?<p>P <comment><USER2> Just assert your copyright in the program code (if supplied) in the executable and in any documentation - assuming that you have not relinquished the copyright in the contract you have with your customer.

You do not need an special clauses - just a standard copyright notice.

If your customer wants a written license - then you might ensure that this includes the words "non exclusive".

</comment><comment><AUTHOR> So do you think something like this is appropriate;

"My Company grants the right to reuse the CSS styles, JavaScript, PHP scripts, XHTML markup techniques, Database design and other bits of "source code" for the non exclusive use of the Client. The Client may freely copy, paste, and modify any of this code for use in other web projects large or small, commercial or non-commercial. The client need not ask permission to do so. The client need not credit My Company or its employees."

<comment><USER2> If you are talking about the license I suppose your draft might well cover the ground. Is this a circumstance where a license is necessary - perhaps the customer is asking for one as otherwise they would not be able to re-use you copyrighted code without permission? Still it is important to assert and then retain the copyright if you want to use the code elsewhere - and fortunately that is so very simple to do.</comment></comment>


Show HN: hncynic – Generate Hacker News Comments from Titles - <AUTHOR> https://hncynic.leod.org/ <comment><USER2> "Asteroid will collide with Earth in 2021"

hncynic 1 minute ago

The author mentions that the asteroid has about 30 times the mass of Earth; I don't know if that is true or not; but I see no reason why this could be a problem. The fact that they can't find out exactly what the asteroid will orbit doesn't make it a problem. It's just not a big enough deal.

hncynic 1 minute ago

The first thing that came to my mind was the possibility for an asteroid on the moon or the asteroid heading to earth in 2020...

I'm not sure if I like this article, but it reminds me when my dad taught us how to run a solar system and think about why it is so dangerous to run our solar system.

hncynic 1 minute ago

I know I am a dumbassy kid but I am so glad to see such a small asteroid like ourselves is happening. I will do my best to support it

</comment><comment><USER3> Show HN: hncynic - Generate Hacker News Comments from Titles

hncynic 1 minute ago

Very cool project but how is this different than HN comments?

hncynic 1 minute ago

This is a fantastic idea, great execution. How do you handle upvoting multiple articles for a given site?

hncynic 1 minute ago

Looks like an interesting site, but I don't see the usability. Are there other things in between?

</comment><comment><USER2> Excellent! Using the title "Show HN: about:blank"...

hncynic 1 minute ago

I really like what you do! It works great for me on Chrome though, so please make it work.

hncynic 1 minute ago

I really like the idea of a simple "blank page" that could be easily scaled up and then added to an existing page as a new tab rather than clicking on links at some point.

That way you don't have to have to manually edit pages to get the information you want to see, just click through to it.

You could also get something like this with the extension "Remove Blank page", which was my only use of it and made by others.

hncynic 1 minute ago

This is really cool. I think this would allow the user to change color of the site (I think there should be a visual indicator of how much time was spent doing this). This is an especially usable tool, I think

</comment><comment><USER4> Elon Musk died hncynic 1 minute ago

This is a wonderful story. One thing I'd love to know is whether he had actually lived a life or not.

My only complaint about Tesla is the lack of an EV car. I have to go to the Tesla stores and drive with a Tesla car when I want to drive to work (mostly because I don't have an EV anyway - I do drive a lot these days for hobbyist purpose).

hncynic 1 minute ago

RIP Elon.

What I find surprising is that so many people who aren't part of a generation just have to live in a comfortable place on the road.

hncynic 1 minute ago

One of the most influential things about the Model S, the Model X, was my understanding that the Model X was made in the US by the German automotive industry in the 1950's:

Although the Tesla Roadster was built in the 1970s by American manufacturing and manufacturing companies, it did not have an electric motor. At the time, it was a mechanical motor. And the Tesla Roadster was a motor on top of a gas gas cylinder. When the Model S was built, the electric motors had no electricity to charge them. The Model S had no electrical chargers; the Roadster had no electric motor to charge the electric motor. It was a gas car. [http://www.wired.com/2010/01/tesla-dealer-model-2-the- tesla-...](http://www.wired.com/2010/01/tesla-dealer-model-2-the-tesla- roadster/) _

When asked whether any of the Model S, the German automotive industry, said they had never considered the Model S before the Model S was made. It was called Roadster and it turned out the Model S was a Model S. The Model S was sold by the German aerospace industry in 1946. [https://www.google.com/search?hl=en&q=roadster+and%20car+mar...](https://www.google.com/search?hl=en&q=roadster+and%20car+market+was%27s+start&tbs=@@)

</comment><comment><USER5> This is actually amazing, I put in the title _Show HN: Simple but Powerful IDE for Databases_

And received:

 _hncynic 1 minute ago_

 _I like that it 's just Javascript, not Node.

I see that it runs in some sort of Node.js/java application with a JIRA plugin.

Maybe you have tried a "nodejs" based alternative to SQLite and it's a little too early for something you don't like, like PostgreSQL etc.

hncynic 1 minute ago

This is really cool. I'm going to try this out some day and see if it's useful for other databases... especially with the JS support.

If the idea is to do DB migrations/transforms and make that simpler for non- tech users, then I like the idea of using SQL to get it working._

 _hncynic 1 minute ago_

 _I 'm glad the "learn new tools" section has a "Rewrite all the files on one file" option. I'm currently using a Dropbox instance to do this on my Mac._

The context and coherence is a little confused but the grammar and tone is spot on!

</comment><comment><USER6> "beware the jubjub bird and shun the frumious bandersnatch:"

hncynic 1 minute ago

>I've always felt about the "Jubjubjub Bandersnatch is the jub" attitude, that there seems to be a few examples of this in the

> article. For example, my first album was 'Jubjabjubs on YouTube', but my > next album was 'Jubjumbs on YouTube'. My first album

>is 'Bing Jubjubjub' and it's all very well worth the hassle.

>This article is a nice reminder that people are willing to use your tool and give you feedback on your work.

 _hee._

</comment><comment><USER7> Dewey Defeats Truman

hncynic 1 minute ago

It's a shame that the results don't reflect the outcome of their entire campaign. This guy should be able to predict the outcome. It's the "only winning a race is worth it" argument that people have been saying about the Truman show since forever.

hncynic 1 minute ago

I think this title needs the following: "Dewey wins against" (because he's a non-American who lives in the US) In my mind, Dewey won because he has no reason to believe anything in it.

</comment><comment><USER8> Apple's New Smart Socks hide disturbing supply chain secrets

hncynic 1 minute ago

A couple of years ago, this was the new iPod touch: [http://techcrunch.com/2012/09/14/amazon-ipod-touch- macbook-t...](http://techcrunch.com/2012/09/14/amazon-ipod-touch-macbook- touch-itunes/#348349346)

I remember the first iPhone was "the next one". The first iPod was about the new Macbooks and they had the same screen.

I wonder if it's still true - when the iPhone comes out, and when Apple is trying new things with iPod touches, I assume it will be a combination of new hardware and new hardware - something that Apple can't do.

hncynic 1 minute ago

Not going to stop the sock from being stolen.

hncynic 1 minute ago

I think the whole 'smart' sock is a joke. It isn't just a Sock that doesn't work on a device. The whole point of this sock is that the sock is a complete mess. Not even the sock itself has a sock as it does on a page. The sock's not meant to be something you want to own unless you can make the sock open.

</comment><comment><USER9> I got it to generate a link. with the title "geiabl"

hncynic 1 minute ago

This is from 2012, not 2012! It was also recently discussed on HN and the title was changed from "Geiabl is an online video game where you can create a video or write a game"

[https://news.ycombinator.com/item?id=11140213](https://news.ycombinator.com/item?id=11140213)

<comment><USER9> abcdefghijklmnopqrstuv

hncynic 1 minute ago

I'm glad to see this.

The fact that you might have an unnecessary QR code when your web server logs into HTTP might be of interest. I also wonder if it's actually possible to just use a JS library that would automatically track when people click on a link on your site, rather than having to use Google Analytics ([http://ajax- googleapis.com/ajax/ajax/lib/ajaxlib/java/](http://ajax- googleapis.com/ajax/ajax/lib/ajaxlib/java/) ).

But then, why would you want your server logs in any way to make sure the website isn't using your site?

I mean, why on earth would you need a JS library to get your logs back into HTTPS, or even the source code for your site as the web server logs in? Maybe- you're/re/re/re/re/re/re/re/ ?

hncynic 1 minute ago

How can you use this?

hncynic 1 minute ago

You may enjoy this post by Cal Newport.

[http://calnewport.com](http://calnewport.com)

Another example, the links themselves don't seem to be generated but I did see one instance of a comment linking to [http://www.$TITLE](http://www.$TITLE) they could be.

</comment></comment><comment><USER10> Hilarious! I tried words like "deep learning", "diversity" and "feminism" and was deeply amused by the generated comments.

</comment><comment><USER11> "PureOS on the Samsung Galaxy Notes 7" (Yeah, with an "s" too many in "Notes")

hncynic 1 minute ago

How about an OS like this?

I don't know if there is a market for this kind of thing for the iPhone, either..

hncynic 1 minute ago

Why do they need to do this? They don't seem to have the time to make this happen, but they seem to have a strong sense of humiliation.

I think this kind of thing could go on for a long time, as it's already done.

hncynic 1 minute ago

It's just a matter of time before someone can go to Samsung on the Galaxy Notes. They are amazing devices with a great interfaces and usability. Samsung is still a huge company and it is great that they can get a foothold in the market that people don't understand. They deserve to be seen as the premier product manufacturer, though with no hope of actually doing much with it anyway.

They're also not going to change their brand or look like the best product manufacturer to date.

</comment><comment><USER12> This is awesome!

I think it would be nice a bit more 'generator' (perhaps based on comment scores/comments, etc) and a more open source "cloud" to handle the up/down voting (possibly via the "cloud" filters in your app).

</comment><comment><USER13> "I think that ZFS is a solid alternative for the Raspberry Pi with a proper linux installation.

However, ZFS on Ubuntu on Ubuntu, for example-- does not seem to allow zfs itself - it is the only way to zfs to be installed and run Linux. It would also be good if it had support for the ZFS kernel.

On Ubuntu you can't use the ZFS kernel_ - but on Ubuntu, there is zfs enabled:

[http://www.ubuntu.com/community/zfs/](http://www.ubuntu.com/community/zfs/) "

</comment><comment><USER14> > The article is very light on any kind of evidence that boys are better of > having a baby before their own children.

A lot of wow in a single HN comment. Very entertaining.

</comment><comment><USER15> Facebook admits it accidentally destroyed all life on Earth

hncynic 1 minute ago

This article is a little sensationalised and misleading. It's not like it was just a facebook ad ad with no substance. There are several legitimate points made on this page, but none of them really sound like any serious information to me.

</comment><comment><USER16> It's so cool. A simple simple tool that adds more content in the form of comments and comments is probably good for HN, but it takes way too much time - you have to add the ability to submit comments as the comments are on the top of the page.

</comment><comment><USER17> hncynic > The fact that the topic is not entirely related: why are you so annoyed by that idea?

This is a reasonable question, since there's nothing to discuss here. This would be a better discussion for a discussion in which a lot of the people have a specific point.

This is a good question. I would assume that the more interesting discussion and discussion it is about the larger discussion it is about the wider discussion. The question might be the right way to ask a question of a topic. It may be some other way to ask a question, but I'd be happy to answer it as much as possible by asking the question as it is.

</comment><comment><USER18> > New Jersey guy locked up for stealing cars

"I always feel the same way about people breaking into the cars and driving through my garage with them."

</comment><comment><USER19> Neat project. A couple of articles yield funny, yet true results.

A few queries:

\- "PHP use rising"

\- "Women in mathematics"

But I was able to break it with something nonsensically narcissistic:

\- "Programmers are an elite race"

Great work!

</comment><comment><USER20> > Would be nice if more examples are found. If the user has seen other > articles before, they should check out the comments.

</comment><comment><USER21> "Feminists killed by a nazi"

hncynic 1 minute ago

A couple of questions I have come to myself on a similar topic:

1\. On what grounds are we a Nazi? What are the political implications of the use of "feminism"?

2\. What's the reason the German government killed one of its female and Nazi leaders. If a german leader was killed because of sexism by other groups, how are they protected if there is a Nazi?

3\. What is their motivation in this? Do they have a goal to end war and that they do not have a "war of Nazes"? And why are politicians so against the idea that "theirs" are not a communist?

</comment><comment><USER22> Hilarious and very well done!

</comment><comment><USER23> amazing The essence of human being is a repeater

</comment><comment><USER24> Needs more citations of xkcd #927 in response to the words "new" or "create". Also, more loopy weekend comments about how mainstream physics can't handle the truth.

</comment><comment><USER25> > silicon valley destroyed by tsunami

hncynic 1 minute ago

I wonder what would happen if the bubbling bursts were more than the average earthquake.

hncynic 1 minute ago

It was just as good as the tsunami! I wonder if that is why we're taking the time to write more about what we had to be able to do to get around it.

hncynic 1 minute ago

I thought it was going to have to be a "tsunamis". It seems so stupid and I think people are too stupid to do it to the point that this kind of thing won't happen...

> Donald Trump elected to fifth term

hncynic 1 minute ago

This is a serious move by the Republican Party. Not that I hate him for not wanting to support them, but I do support him for his personal right of a free country. That being said, he is going to continue to play that game and to do with the election is going to be a huge uphill battle for many people.

If anyone in Congress gets to decide if he is going to continue to run for President in the next ten years, that's not so easy or incomprehensible. If he does, he may be forced to resign from the Senate, that could be a big deal. This may mean the administration will be going through a few layoffs before he is able to see all the people he's voting for and have all the voting skills on his side. Or it might mean the legislature can't do it.

This is how it will be going to be for the next three years and it really will only be for the next six years. The Republicans will be the ones to pass this legislation and it won't be the same if that happens again. The Democrats won't want to be able to change this for so long without it.

Anyway, I'm pretty surprised that he wasn't able to do this.

hncynic 1 minute ago

What has changed in his office in the past two years?

[http://m.politico.com/news/2014/12/new-yorks-election-id- hil...](http://m.politico.com/news/2014/12/new-yorks-election-id-hillary- clinton-elect-elites-presidence-id/)

hncynic 1 minute ago

[https://news.ycombinator.com/item?id=14148828](https://news.ycombinator.com/item?id=14148828)

<comment><USER4> This is overwhelmingly scary (not the subject but the app). It reminds me of how easily I am entertained by HN comments and how I easily just waste hours reading.

</comment></comment><comment><USER25> I like it! A couple things I would think about is the ability to show a comments, so people who don't like a lot can have good discussion.

For example if I'm interested in an article I like to see if someone could suggest an example of an example of a better HNCynic site with comment scores</comment>


Thread Safety Analysis in Clang - <AUTHOR> https://clang.llvm.org/docs/ThreadSafetyAnalysis.html <comment><USER2> The title currently reads "Thread Safety Analysis Is Clang". I suspect it was meant to read "Thread Safety Analysis In Clang".

<comment><USER3> I thought it was a joke about race conditions.

</comment></comment><comment><USER4> Isn't manually locking and unlocking (as seen in the examples) frowned upon anyway?

In any development I do, and with every developer I've ever developed a project internally, the use of std::lock_guard<> (which is a scope lock) was required when working with mutexes. This code looks like that classic "C with arrays" type of C++ code, that is prone to errors that have long been solved.

As a rule of thumb, when prototyping new multi threaded code and I have a class that needs to be thread safe, I add a scoped lock in every member function that is not const. Problem solved, your class is now thread safe, although not very performant...

<comment><USER5> These analysis passes also work just fine with scoped locks, using the SCOPE_CAPABILITY annotation (see the included mutex.h example).

Scoped locks by themselves cannot statically rule out the same kinds of errors that this analysis can, in any case. Even if you _only_ use scoped locks -- an obvious (but trivial) example is when you have a lock held but then attempt to take a lock again in some control path (perhaps through a recursive or deep call stack, or, in your case, calling another member function which also takes the lock unconditionally.) This is a trivial case for this analysis to detect but std::lock_guard<> alone will not save you.

The annotations also serve as useful commentary and 'guiding tools' for refactoring as well, in my experience. If you annotate a function as yielding or taking a lock, and later change this -- the compiler will warn you that your annotation is out of sync with the implementation. In practice I find this quite useful to keep code clean, but it also obviously helps tell you if your change is correct, too.

I normally just turn this analysis on in Clang, because IME it has very little negative effect and is very useful in practice.

<comment><USER6> > when you have a lock held but then attempt to take a lock again in some > control path (perhaps through a recursive or deep call stack, or, in your > case, calling another member function

The standard library provides std::recursive_mutex which supports being locked multiple times by the same thread. Unfortunately, it doesn't provide an std::recursive_shared_timed_mutex for the general case where you might want to support multiple simultaneous read operations. The SaferCPlusPlus library does implement such a mutex, and, like I mentioned in another comment, provides data types that automatically control access to shared objects. I think for most cases, it's the safest and easiest way to share objects asynchronously (in C++). (The data types are kind of analogous to Arc<> and Arc< Mutex<> > for those familiar with Rust.)

Btw, the implementation is self-contained, so you can use the safe sharing data types without having to include the rest of the library. Or you can just copy the source code and make your own safe sharing data types.

<comment><USER5> There are many people who would largely consider recursive mutexes a complete mistake, for the most part. I'm one of those people. :)

But I admit I sort of willfully skipped over this point precisely _because_ I dislike recursive mutexes. But they are there for this case, you are 100% right.

</comment></comment></comment></comment><comment><USER7> Looks interesting, especially as a way to introduce some extra thread safety checking into legacy codebases. Or improve the quality of new ones if C++ is the target (yes, I know that Rust can do similar things without extra tools).

If anyone is familiar with it I directly have a question regarding it: An often used pattern besides locking is that data is owned by a particular thread, and only that thread is allowed to mutate the data. E.g. in GUIs only the main thread can mutate it. I guess that can also be expressed with the tool, but examples would be welcome. I guess the owning thread could have the capability, but a challenge could be that the start and end of the owning thread might be encapsulated by a library (e.g. QT or Windows mainloop), and be slightly hidden from the implementation of components. The goal should be that if I do

        field = value;

inside an arbitrary thread I get a warning. And if I do

        owningThreadWithEventLoop.post([](){ field = value; });

everything is fine.

</comment><comment><USER8> I prefer to use language constructs to enforce correct usage where possible.

For example, if a set of values have to be synchronized by a mutex, I wrap them in a struct and [http://www.boost.org/doc/libs/1_63_0/doc/html/thread/sds.htm...](http://www.boost.org/doc/libs/1_63_0/doc/html/thread/sds.html#thread.sds.synchronized_valuesxxx)

If a method requires that it's called while a mutex is held, I make it explicit by declaring the function as `void f(std::unique_lock<std::mutex>&)` [requiring a reference ensures that you have to have a constructed object before function entry]. Granted, this approach doesn't associate the mutex with its data.

</comment><comment><USER9> In my experience dynamic checkers like [https://clang.llvm.org/docs/ThreadSanitizer.html](https://clang.llvm.org/docs/ThreadSanitizer.html) tend to work better that static checks.

<comment><USER10> We (Google) do both.

Having recently done some coding in Swift to implement a little toy Hypervisor, I sorely missed these annotations. By and large the errors they catch are ones I'd be embarrassed to have pointed out in a code review; I don't mind nearly so much when the compiler catches me without my mutex locked.

</comment></comment><comment><USER11> Does anyone know of a similar tool for Java?

<comment><USER12> Google's ErrorProne, [https://github.com/google/error- prone/tree/master/core/src/m...](https://github.com/google/error- prone/tree/master/core/src/main/java/com/google/errorprone/bugpatterns/threadsafety)

Bill Pugh's FindBugs, [http://findbugs.sourceforge.net/bugDescriptions.html](http://findbugs.sourceforge.net/bugDescriptions.html)

</comment></comment><comment><USER13> So is this a Rust killer?

<comment><USER14> Why Rust? Rust doesn't have concurrency capabilities. ponylang has.

But like Rust it needs mutexes and errors with wrong or missing mutexes. So in this regard it's equal to Rust.

<comment><USER15> > Rust doesn't have concurrency capabilities

[https://doc.rust-lang.org/book/concurrency.html](https://doc.rust- lang.org/book/concurrency.html)

</comment></comment></comment><comment><USER16> This is interesting, but I am curious why the effort has gone into this C++ tool when Google's own multi-threading-first language, Go, is based on Tony Hoare's work from decades ago, except that it omits the most interesting feature of CSP, the specialized calculus theorem that can prove the correctness of all your multihreaded logic. It would seem that those interesting ideas were ignored in favor of providing tooling for C++.

<comment><USER17> For the record, Go has no static thread safety guaranty. It's easy to write a data-race in Go (and it occurs frequently). Fortunately the go compiler has a tool that help detecting data-races[1]. The only two languages I know that offer data-race-free multi-threading are Pony[2] and Rust.

Additionally, Go isn't really a C++ competitor: you'll probably never see Google Chrome using Go instead of C++. Go is a good language for back-end micro-services and cli tools, not for building performance-sensitive native desktop applications.

[1]: [https://golang.org/doc/articles/race_detector.html](https://golang.org/doc/articles/race_detector.html)

[2]: [http://www.ponylang.org/](http://www.ponylang.org/)

<comment><USER18> > The only two languages I know that offer data-race-free multi-threading are > Pony[2] and Rust.

I believe Erlang also does for the most part, though some of its built-in constructs are racey (the process registry if you query it, shared ETS tables, and _dirty_ Mnesia operations).</comment></comment></comment>


Dabbling in Erlang, Part 2: A Minimal Introduction - <AUTHOR> http://agis.kontext.gr/2013/10/12/dabbling-in-erlang-a-minimal-introduction.html <comment><USER2> In the section "Functional programming for real" he states:

> Note that the order of the definitions is important: had we moved our base > case at the bottom, the recursion would never finish because map(F, [H|T]) > would always match (remember? an empty list is also a list with a head and a > tail).

Which confuses me a bit, since I am used to the empty list _not_ having a head (I am thinking for example of Haskell). Is it true that in Erland the empty list has a head? And what would it be? Some generic null object?

<comment><USER3> For readability, it's nice to have the base case at the top. For performance (if performance is an issue) it's nice to have the base case at the bottom since all function heads are evaluated in order.

If you're looping over a million element list and your base case is first, it'll be checked a million times. If your base case is last, it'll only be checked once when your normal cases no longer match.

And to clear up your confusion, the writeup is wrong about empty lists matching on [H|T]:

       Eshell V5.10.1  (abort with ^G)
       1> [H|T] = [1, 2, 3, 4, 5].
       [1,2,3,4,5]
       2> [H2|T2] = [].
       ** exception error: no match of right hand side value []

<comment><USER4> The BEAM virtual machine is able to reorder most clauses based on need, and for most cases, a binary search will be done through all clauses. Exceptions include function clauses with guards, which cannot easily be reordered but still impact whether a clause will be used or not.

The VM will instead try to reorder the clauses up until the next guard clause, if possible.

You should mostly care about writing readable code and let the compiler and the VM do the rest.

</comment></comment></comment><comment><USER5> I have written a more quickly paced Erlang tutorial some years ago, it is not even online anymore, but here is a copy from archive.org:

[http://web.archive.org/web/20080708140354/http://www.stifflo...](http://web.archive.org/web/20080708140354/http://www.stifflog.com/2007/05/09/erlang- for-the-practical-man/)

I must shamelessly say it seems to have aged reasonably well, unlike some other things I wrote I actually read it now with interest, especially I haven't dabbled in Erlang since and forgot some details.

I recommend everyone who finds fun in programming to give Erlang a shot, I don't think it's great for all the use cases (what is?), but, for example, for writing servers of all kinds it's totally awesome, especially with OTP, which I didn't cover in my tutorial. It's also completely different from everything else, even if you know Prolog or Haskell/ML, which are related in some ways. One day I would really like to get myself together and write something like a game server for poker or bridge in it.

</comment><comment><USER6> This is a pretty good introduction and is pretty accessible on first pass through.

However, a factual error:: "(remember? an empty list is also a list with a head and a tail)."

An empty list is an empty list :) You could switch the order of those two function heads and 'map' would still behave properly.

<comment><AUTHOR> Yes that was a mistake I made. I've fixed it now thanks to your feedback, with a proper example.

</comment></comment><comment><USER7> For anyone finding the syntax of list comprehensions a bit confusing (like me), I found this comparison to be useful if you're familiar with the more readable (usually) Python equivalent:

        [expression(element) || element <- list, conditions]

is the same as

        [expression(element) for element in list if condition]

</comment><comment><USER8> Is there some platform that offers such a VM as Erlang's one, but without the functional language ?

<comment><USER9> Erlang VM is built on the premise that it runs a functional language. I would argue that it will be extremely inefficient to implement non-function language to run on Erlang VM. By non-functional I mean language that is based on mutable and shared state. You can look at Elixir ([http://elixir- lang.org/](http://elixir-lang.org/)) to see great example of an alternative language that runs natively on Erlang VM. While offering syntax that is more familiar to many people Elixir retains all basic restrictions of Erlang.

</comment></comment><comment><USER10> That's awesome mate keep up!!!

</comment><comment><USER11> I like the pace, the formatting, and the content. Would love to see more! Great work!

<comment><AUTHOR> Hey, thanks!

</comment></comment><comment><USER12> Two .gr / Greek links on HN in a day, nice.

<comment><USER11> One of main contributors to Erlang is Kostis Sagonas from Athens National Technical University. He is one of the main contributors to HiPE (the native code compiler), and creator of PropEr (property based tester).</comment></comment>


Rethinking Design Tools in the Age of Machine Learning - <AUTHOR> https://medium.com/artists-and-machine-intelligence/rethinking-design-tools-in-the-age-of-machine-learning-369f3f07ab6c <comment><USER2> This is an area where the vision is very desirable, but user expectations also run sky-high.

A company called The Grid collected about $5 million from users (and another sum in the same ballpark from VCs) with the promise of an AI that designs websites for you. Years later, they still have very little to show.

It seems like most of those tens of thousands of aspiring web creators who paid $96 to be "founding members" of this AI revolution have quietly licked their wounds and given up, because there doesn't even seem to be too much active discussion about the product anymore. (The Reddit forum is dead, with a few messages of the "Can we sue?" kind.)

<comment><USER3> Maybe I was reading into it, but I got the impression that the end product here was something more of an artistic nature rather than a website.

If the end product is something that is basically a computer program, like a website, then I expect it to fail. My conjecture is that code and a text editor is already the optimal tool interface for creating computer programs. You can't create a superior tool interface, because code and a text editor is already optimal.

When it comes to creating art, there seems to be a great potential for better tool UIs. A guitar and hands is not the optimal way to create music. We don't seem to have found the optimal tool for creating music yet (if there is one).

<comment><USER4> >When it comes to creating art, there seems to be a great potential for better tool UIs. A guitar and hands is not the optimal way to create music. We don't seem to have found the optimal tool for creating music yet (if there is one).

My company is working on just that, creating the next generation of music instruments to allow anyone to create music.

Here is our first prototype where we've changed the UI of the guitar, but also left in traditional elements to allow beginners or experts to play music by switching from what we call "Magic Mode" to traditional guitar: [https://www.youtube.com/watch?v=vkM4sr2socQ](https://www.youtube.com/watch?v=vkM4sr2socQ)

<comment><USER3> Music is not my area of expertise, but

1\. It looks like there are limitless possibilities in that area of technology.

2\. Magic Mode reminds me of Omnichord. It looked like with the Omnichord, you could do certain things more easily than with an analog instrument, but other things became harder or impossible. So it was a trade off.

3\. In addition to allowing anyone to create music, it would be especially interesting if you could create new possibilities for expert players. For ex: some kind of augmented drum could allow you to create and play more intricate rhythms than would normally be possible, perhaps by having ML extrapolate and combine patterns in ways that are too complex to even write (I used to play drums). It seems like the ear can hear patterns that are beyond what can be played or even created by a person.

<comment><USER4> For #3, it doesn't even have to be that fancy for expert players/song writers.

One of our investors is Matt Bellamy, the lead guitarist/vocalist of Muse. Generally when he wants to write a song, he goes for the piano to figure out the chord progression. It's much easier to compose on the piano because all the notes are in front of you in sequential order (black and white keys). After he figures out the chord progression, he'll switch to the guitar.

If he was to start composing on the guitar, there is a higher amount of cognitive load that is based on the physics of vibrating strings and his ability to physically shorten them by pressing your fingers on metal/nylon.

With our instrument he gets best of both worlds, a guitar interface, but every button is a chord in any key/scale. Basically, you now have a chord encyclopedia (like omnichord), but once he figures out the chord progression, he can switch to traditional mode and do the crazy stuff that he does all on one device.

<comment><USER3> And it's more portable than a piano. That seems like the killer feature in that scenario, no? You can compose songs anywhere.

</comment></comment></comment></comment></comment></comment><comment><USER5> Great article. Covers a lot of aspects on how ML can help designers be more creative and productive!

At Huula, I'm a firm believer that ML can automate various parts of web designs. We just released a new experiment CSSToucan[1] to auto color texts on web pages with Recurrrent Neural Networks. It learns to color texts on web pages without a single line of color theories in the code. All learned from the data. Hope to see more and more ML powered design tools emerging!

[1]: [https://huu.la/ai/csstoucan](https://huu.la/ai/csstoucan)

</comment><comment><USER3> It sounds like one of the core issues is dimensionality reduction. I would suggest reducing everything to text. Text is one-dimensional.

In this case:

>> Like any other map, we can add textual labels — street signs if you will. This allows us to navigate the design space verbally with commands like: "take me to a maple leaf." Once there, we could say something like: "take me a bit closer to an oak leaf."

The change here would be subtle. Rather than a two-way conversation between tool and user, instead it's more like the user is telling a story and the tool is making suggestions along the way:

start:

"Create a leaf"

tool inserts a suggestion:

"Create a [maple,oak,cherry,...] leaf"

user updates the story with the clarification:

"Create a maple leaf"

tool suggests:

"Create a [red,green,...] maple leaf"

user:

"Create a green maple leaf"

user starts typing more:

"Create a green maple leaf on a"

tool inserts suggestions:

"Create a maple leaf on a [branch,wreath,...]"

Hope this is helpful.

</comment><comment><USER6> Great well written article</comment>


Magic Tricks based on deep Mathematics - <AUTHOR> http://mathoverflow.net/questions/9754/magic-trick-based-on-deep-mathematics

<comment><USER2> The card trick mentioned is fun to ponder. Here's a link that gives the full article: <http://courses.csail.mit.edu/6.042/fall09/cardTrick.pdf>

"You, my friend, are about to witness the best card trick there is. Here, take this ordinary deck of cards, and draw a hand of five cards from it. Choose them deliberately or randomly, whichever you prefer -- but do not show them to me! Show them instead to my lovely assistant, who will now give me four of them, one at a time: the 7 of Spades, then the Queen of Hearts, the 8 of Clubs, the 3 of Diamonds. There is one card left in your hand, known only to you and my assistant. And the hidden card, my friend, is the King of Spades."

<comment><USER3> That is more involved than I thought. I was looking for a covert information channel. For instance the assistant could hold the cards in 2 different ways, 4 cards represents 16 bits of information, plus 2 more bits for which card is the high card.

Here is a simpler one that impresses many people. Deal out 3 cards across, return to the top, 3 more cards, and so on until you've dealt out 27 cards in 3 columns. Have the other person pick a card but don't indicate what it is. Ask them to indicate which column has the card. Stack the 3 columns with that in the middle. Now redeal go through the same procedure. Repeat one more time. Now count the cards out. Card #14 is the picked card.

Why does it work? Well the first time you deal it could have been anywhere, the second time it is down to the 3 middle rows, the third time it is in the middle row, then you stacked it in the middle of the deck.

<comment><USER4> Actually you may let the one you are showing the trick to to choose the order, you need just to notice where did the column with the card go. 2 if it is on the bottom, 1 if in the middle, 0 if on the top. When you got your three digits, reverse them and convert from ternary to decimal—that will be the number of cards _above_ yours. In the case you are putting column with a card to the middle you'd get 111, that is 1 _3^2+1_ 3^1+1*3^0=9+3+1=13. Hence your card is #14.

I think this was in one of the books by M. Gardner.

<comment><USER4> Corrections: bottom-2, middle-1, top-0. 1×3^2+1×3^1+1×3^0=9+3+1=13</comment></comment></comment></comment>


TechZing (Tech Startup Podcast) Celebrates Its 150th Episode - <AUTHOR> http://techzinglive.com/page/839/150-tz-discussion-its-getting-a-little-meta-up-in-here

<comment><USER2> Congrats to Justin and Jason, the podcast really is something to be proud of. It combines a nice mix of tech and startup discussion.

It's not really for people who like short podcasts, but this is what makes it great. You get depth where other podcasts won't go or that just glosses over talking points.

<comment><USER3> Indeed. I really like this podcast, they talk about the details

</comment></comment><comment><USER4> Congrats guys! TechZing is one of my favorite tech startup podcasts. If you haven't heard it before check it out.

</comment><comment><USER5> Congrats Justin and Jason - producing 150 hour and half long shows every week demonstrates awesome commitment to the tech startup world! Huge kuddos! Have a been a fan since the first show and although new podcasts come and go I am still looking forward to new episode every week.

</comment><comment><USER6> I didn't know this podcast. Subscribed! Thanks HN :-)

</comment><comment><USER7> A great podcast for people interested in starting software businesses.</comment>


My First year of Elixir - <AUTHOR> https://functional.works-hub.com/blog/A-year-of-Elixir <comment><USER2> I would be interested to understand how much use Elixir is getting commercially?</comment>


The Big China Short - <AUTHOR> https://www.thewirechina.com/2020/04/26/the-epic-collapse-of-luckin-coffee/ <comment><USER2> I worked in China for a number of years. If there's one lesson I took from that time, it's that companies like Luckin are the rule, not the exception.

Fake accounts, inflated metrics, bribery and graft are the norm. It's not even considered unethical, it's just the way business is done. If someone cheats you, then you can only blame yourself for being cheated. What's more, you should also blame yourself for not cheating them first.

A lot of Westerners fall into the same trap, thinking there's no way that anybody could be so blatant in lying, cheating and stealing, so they give their Chinese partners the benefit of the doubt.

Well, China certainly can be so brazen. Luckin literally inflated its quarterly sales figures by 88%, and it wouldn't surprise me if they did so just by fiddling with a spreadsheet. The fraud I encountered was rarely sophisticated.

It's also naive to think that auditors - even Western firms - provide any assurance at all. It requires a special type of stomach/spine to stand up to a client pressuring you or flooding you with information that is difficult to verify.

<comment><USER3> How's the regulatory oversight in China? If companies can get away with lying then I don't think they have much say in the matter.

<comment><USER2> It exists, but it's hardly effective. It's mostly a merry-go-round of bribery and currying favours. As an example, look at how little consumers trust inspections carried out by authorities (hence why Australian milk powder carries such a premium).

</comment></comment></comment><comment><AUTHOR> The organizers had a hunch that Luckin Coffee, China's fast-growing challenger to Starbucks and a company traded in the U.S. stock market, was falsifying financial statements to exaggerate its sales. The organizer set out to prove it, deploying 1,510 investigators to count sales and record traffic at more than 600 of the company's retail stores, one mobile phone video at a time.</comment>