Mark Cuban: success and motivation – You only have to be right once - <AUTHOR> http://blogmaverick.com/2005/05/30/success-and-motivation-you-only-have-to-be-right-once/

<comment><USER2> Cuban makes the point that he only had to be "right" once and then goes on to express his annoyance with people who refer to him as lucky. But how does he know that he was "right" rather than lucky? Isn't it possible that he could have been both right and lucky?

I don't mean to say he didn't work hard or doesn't deserve what he's earned, but discipline and hard work don't generally lead to billions of dollars like they did in his case. It seems more likely to me that luck played a significant role in his (extreme) success, and determining the influence of his being right compared to the influence of his being lucky is probably impossible.

<comment><USER3> Becoming a billionaire almost assuredly requires some luck. However becoming rich not necessarily (depending on what you define as rich, of course). Managing to create one business that you sell for $20 million is much saner in theory and still can set you up for life.</comment></comment>


My First 9 Months as an Angel Investor - <AUTHOR> http://www.instigatorblog.com/my-first-9-months-as-an-angel-investor/2013/09/20/

<comment><USER2> Reading legal docs does suck for angels. We launched a product on AngelList that completely standardized the seed-round docs (debt or equity), the early adopters liked it, but we didn't get traction and it was an awful lot of legwork to maintain.

good initial press, but it didn't work out ( there's an entire blog post I could write about why)

[http://pandodaily.com/2012/09/05/angellist-launches-free- see...](http://pandodaily.com/2012/09/05/angellist-launches-free-seed-funding- closings-saving-you-20k-and-months-of-hassle/)

</comment><comment><USER3> Awesome post and view what it's like to be a new angel investor and paying back the startup community. We need those who've been successful to support other entrepreneurs even though most investments fail. Love the honesty and matter of fairness. Hope I get there someday.

</comment><comment><USER4> Couldn't access on windows 7: High Risk Website Blocked Location: www.instigatorblog.com Access has been blocked as the threat Mal/ObfJS-CZ has been found on this website.

<comment><AUTHOR> Very strange...I'm investigating with the hosting company to see what's going on.

</comment></comment><comment><USER5> Would love to know if there are any industries/verticals you have found yourself steering clear of and, if so, why?

<comment><AUTHOR> The recruiting space! Mostly because I spent 3 years banging my head against a wall in that space.

Generally, I get nervous in the consumer space, but I've made several consumer investments.

There are a couple spaces I'd like to do something in -- education, robots, anything kid-related (b/c I have two young boys).

</comment></comment><comment><USER6> Great article! Love the honesty Ben.

<comment><AUTHOR> Thanks. Appreciate that. Might as well be honest (about the good and the bad)!

</comment></comment><comment><USER7> Good job, Ben!</comment>


Sci-Hub users cost ASA journals thousands of downloads - <AUTHOR> https://familyinequality.wordpress.com/2020/01/15/sci-hub-users-cost-asa-journals-hundreds-of-thousands-of-downloads-and-thats-ok/ <comment><USER2> For those who support sci-hub's mission and would like to help ensure it can never be taken away, you may be interested in the following project to lay the groundwork necessary for a widely-replicated, decentralized version of the repository:

[https://www.reddit.com/r/DataHoarder/comments/ed9byj/library...](https://www.reddit.com/r/DataHoarder/comments/ed9byj/library_genesis_project_update_25_million_books/)

All of the documents accessed through sci-hub are archived by the library genesis project and made available as torrents. Currently there are just over 80 million articles included in these torrents. The total size of the archive is around 70TB. The link above also refers to the library genesis books collection, which is 33TB.

This effort has seen tremendous interest in recent weeks; the books collection (libgen) is now widely replicated, but around a third of the scimag articles collection (i.e. those from sci-hub) has only 1-2 reliable seeders and needs more before it can be considered safely backed up. If you have the resources available, I would encourage you to consider assisting. Previous discussion of this project is at [https://news.ycombinator.com/item?id=21692222](https://news.ycombinator.com/item?id=21692222)

Looking forward, the next step is to find a suitable way of providing accessible, truly decentralized access, without relying on a single point of failure (i.e. a web interface). Some have been exploring IPFS as a potential mechanism, but there are many ways this could be done. This is a challenging but important problem to solve; with the data available, there is now an opportunity for developers to address the access issues. There may come a day when the sci-hub website goes offline, and it would be good if a fallback is already in place at that point.

Aaron Swartz may no longer be with us, but his spirit lives on. It's now up to us to carry on the fight for which he paid so dearly.

<comment> m-p-3 I wish I could help, but I cannot afford at least 70TB even for myself..

<comment><USER3> Then this comment isn't for you, but rather other HN readers.

If you believe in the importance of science, and if you're a software engineer at FAAAANG, then you can afford a 75+45 TB (scihub+libgen) hard drive array. If you are making $300,000/year then a $5-10k hobby project to store distilled human progress is something that you could make financially possible for yourself.

Consider doing this, because this might be the last opportunity to get a relatively complete copy. Just having a copy and letting it sit for 10 or 20 years can be hugely valuable to the world, let alone your community.

<comment><USER4> And of course you can partner with some other like-minded folks.

<comment><USER3> For sourcing drives probably better to go with buying external 10 TB drives (and shucking them). Make a JBOD.. I dunno.

A quick ebay search right now shows used LTO8 drive for $3K (same as new), LTO7 for $1.8K, LTO6 for $0.5K, LTO5 for $0.15K. If you shop around, you can find much better deals.

Here are some tape costs:

LTO-5 (1.5TB/$19.60 = $13.07/TB) LTO-6(2.5TB/$22.58=$9.03/TB) LTO-7 (6TB/$57.95=$9.66/TB) LTO-7 type M (9TB/$57.95=$6.44/TB) LTO-8 (12TB/$134.25=$11.19/TB)

Breakevens:

        LTO8=300T
        LTO7=300T
        LTO6=75T
        LTO5=50T
        LTO4 and below=never

Of course without a tape robot, no one should be using LTO5--there's some personal inconvenience cutoff for everyone.

</comment></comment></comment></comment></comment><comment><USER5> Those aren't lost sales. Nobody sane would pay $40 or so for a 20 pages paper. Even if Scihub didn't exist. Publishers know nobody pays that. There are other options free for academic, such as subscriptions universities pay for or inter-library loans. Non-academic clients may try asking somebody who has a subscription access for a given paper (I know I did provide paper PDFs a few times when asked).

Publishers don't prey on individual users, they prey on universities. They try to get them to pay for journal access. Non-academic clients? Not profitable enough for us, go away. Scihub threatens this business model, because universities may decide to stop paying that money because Scihub exists. It's much more convenient than bothering a random person to provide you a paper or inter-library loan which makes this an actual risk to them.

<comment><USER6> My roommate is a student with full access to basically all journals. Funny enough, he still uses scihub because it is easier to use.

<comment> m-p-3 This is a big reason why piracy exists even when something is available through official means.

Those offering a paid services should always ensure there is a benefit and convenience compared to piracy. Valve and Steam wouldn't be here if it was clumsy like in the beginning. Gamers like that getting a game is just a click away, that it installs and checks all the required dependencies, keeps the game file updated, allows you to preload and keep your game saves in the cloud (when possible).

</comment></comment></comment><comment><USER7> Journals cost the general public access to science while having an even more questionable value than most copyright holders who at least bother to do things like remaster their old properties or develop new drugs. May they burn in hell.

Sci-hub means I can read the latest science about my disability without $40 paywalls on top of a mediocre paper which give eye-poppingly low margins to the actual authors. Papers which ironically often discuss how society makes disability a problem by throwing unnessecary barriers in front of the disabled. That yarn on about how the disabled lack autonomy over their own healthcare.

<comment><USER8> Zero margins. Scientific authors get exactly zero money from academic publishers. In fact, sometimes it's negative money (the journal charges you to publish, i.e. if it's open access). Zero or negative. They get exactly zero dollars of that $40-per-article fee. Which is why authors will often GLADLY give you the article for free if you email them.

Scihub is in a legal grey area (not really legal, so I can't technically advocate for its use in my position), but in a way it's automating the normal process of asking researchers for a copy of the paper, thus saving the researchers' time. (Researchgate is a more legal version of this, but with much less access to papers.)

<comment><USER9> > In fact, sometimes it's negative money (the journal charges you to publish, > i.e. if it's open access).

Not just if it's open access: sometimes authors have to pay "page charges" or have to pay extra to include illustrations.

</comment></comment></comment><comment><USER10> ,,I do not, however, contribute anything to the system; I free-ride off their criminality''

The writer has to constatly remind me that running the proxy is a crime, but using it - even if she knows that it's not the legitimate way to get the information- is not.

This may be true, still I don't like the tone, as clearly sci-hub is providing the huge value to people, not her.

I wouldn't be surprised if some life saving drugs would be developed and used in practice faster _because of_ sci-hub.

<comment><USER11> I don't use sci-hub, but the framing "Sci-Hub users cost ASA journals thousands of downloads" presumes something: it presumes that without sci-hub, ASA journals would have thousands of more downloads.

This could very well be false: without sci-hub, people might instead use arxiv and the like; perhaps sci-hub _brings_ journals thousands of downloads they would not have if sci-hub didn't exist.

As I don't use it I can't say if this might be accurate, though.

<comment><USER12> >This could very well be false: without sci-hub, people might instead use arxiv and the like; perhaps sci-hub brings journals thousands of downloads they would not have if sci-hub didn't exist.

There was that study in EU that said piracy actually helped the game industry.

There is also what the author was commenting, sci-hub is easier to use than the legal alternative. We go tour researchers stuck in bureaucracies, to access papers funded by taxpayers! As Gabe Newel said, to fight piracy, you provide a better service (Steam was the biggest hit to game piracy, and so was Netflix for series and movies), instead of that, what we see is more control/bureaucracy being added.

edit: [https://www.engadget.com/2017/09/22/eu-suppressed-study- pira...](https://www.engadget.com/2017/09/22/eu-suppressed-study-piracy-no- sales-impact/) it's an old study (2013), but I doubt the situation got worse. In videogame land the greatest example is The Witcher 3, easiest game to pirate, has it was distributed without DRM, you could just copy your friends installer. It was still on the top of steam most played single player game(which requires the key to be unique), won a lot of awards, and got so much exposure that netflix has released a TV show...

<comment><USER13> It's hard to imagine how a legal service could be better than Sci-hub. You could make it as good as sci-hub, but how could you make it easier than _" paste DOI -> PDF is downloaded"_?

Steam beats video game piracy because video game piracy requires shit like having a torrent client or having a friend who has a copy already. Video game piracy was never as easy as sci-hub.

<comment><USER14> Just make it _as good_. Add legitimacy at the same level of convenience and you win.

<comment><USER15> I'd pay $10 a month if addition to pasting a doi -> pdf, that I could also search backward and forward along citations. I'd love to be able to download a paper and everything it references.

<comment><USER16> Iirc that's pretty much why TBL invented the web, so you could click on references in scientific papers. It'd be nice if we could actually do that.

</comment></comment></comment></comment></comment></comment></comment><comment> type-2 My university gives me access to many journals but i still use Sci-Hub. I will never download adobe digital editions just to view a pdf.

<comment><USER17> And last I checked it does not work on wine and there is no Linux version.

<comment><USER18> It does work on wine but requires some work to get it running: [https://appdb.winehq.org/objectManager.php?sClass=applicatio...](https://appdb.winehq.org/objectManager.php?sClass=application&iId=6326)

</comment></comment></comment><comment><USER19> Using Sci-Hub is still faster and easier than logging into the university VPN or web proxy (which breaks HTTPS sites).

<comment><USER20> might be worth looking in to split tunneling if you can do it. my other solution for this at a previous job with an annoying multi-network setup was to have a vm run the vpn and then squid proxy anything i need out to the main host.

</comment></comment><comment><USER21> Even though I have access to the full Stanford library collection I go to Sci- Hub first. The UI is so much easier.

Is there seriously _anyone_ not employed by the giants (Elsevier, Bertelsmann et al) who opposes sci-hub?

</comment><comment><USER22> Maybe I would care about the plight of academic publishers if I got royalty checks for all the articles I've published over the past 20 years.

</comment><comment><USER23> Be careful with piracy in the US:

It's not enforced by police but if you're doing science or engineering then the biggest employer in your field might be the government (DoD etc.) It's not all that rare for people to get denied security clearances because of excessive piracy and that would make it way harder for you to be employed.

This is a huge part of the problem with having laws on the books that just aren't always enforced.

</comment><comment><USER24> For context, the author is an American sociology professor who serves on the American Sociological Association's committee on publications.

He recently came out in opposition to the ASA's official stance rejecting a proposed federal mandate to make all publicly funded research available open access. The ASA joined other scholarly associations in opposition such a mandate.

The author recently discussed his stance on The Annex podcast: [http://sociocast.org/podcast/the-paywall-and-the- asa/](http://sociocast.org/podcast/the-paywall-and-the-asa/)

</comment><comment><USER25> Good, fuck the journal aggregators. Speaking as someone who has published papers, I'd happily (and do, via ResearchGate) give them away for free. I made the noob mistake of putting them up on my own website before being shouted at by an editor for giving away the 'product' for free.

I'm all for journals, I appreciate there's a cost to keep them going but large publishing aggregators who take your work for free and have the cheek to make you jump through hoops for the privilege deserve to collapse. The paradigm is old and broken.

</comment><comment><USER26> Oh no, who will think of the poor journal editors' profit margins?

Sarcasm aside, that title is waaaay loaded. It sort of insinuates sci-hub users are the burden and not the journals.

</comment><comment><USER27> Times change. Sometimes laws -even once good laws- can end up becoming obviously absurd. When that happens in a democracy, the laws can be changed.

With all the people using Sci-Hub, I wonder if it is becoming possible to make legislation to either or both

* Declare Sci-Hub and its practices legal outright, and make it the new normal.

* Carve out extra protections for open access to science in general.

<comment><USER26> Also give the woman in Kazakhstan behind it the peace Nobel price.

</comment></comment><comment><USER28> Consider also the value of SciHub that you have received already: It has made the authoring of Review papers much easier, and probably improved their quality since you can parse hundreds of papers faster. No longer do I have to worry if the publisher's site is accessible from home, if their website is not down, if i'm gonna have to click 10 links to get the pdf etc etc. A click of a bookmark and PDF is downloaded. Literature reviews are already hard as it is (with articles being pdf and unhyperlinkable), paywalls just made it double as hard.

<comment><USER29> > _(with articles being pdf and unhyperlinkable)_

I'm not sure to what extent this helps, but it's at least possible to hyperlink to an individual page in a PDF.

[https://isotropic.org/papers/chicken.pdf#page=2](https://isotropic.org/papers/chicken.pdf#page=2)

<comment><USER28> unfortunately, bibliography , which is the most important kind of link is almost never hyperlinked.

<comment><USER30> An increasing number of papers in my field have the DOI the cited paper as a hyperlink to dx.doi.org which will redirect to the publisher website. Note that this is often done without optical hints (text in black not blue, no underline) so it can be hard to miss.

</comment></comment></comment></comment><comment><USER31> Maybe these journals should get together and duplicate the Scihub interface which pulls from whatever sources the user should have access to.

I have never used these services at a University. Do they even require a login? Or do you get automatic access just from using a terminal on campus?

<comment><USER32> Normally you get access automatically when you're on any machine connected to the campus network. Most schools also have a proxy server or VPN you can use off-campus. The Zotero browser plugin does a good job for me of automatically detecting resources that can be proxied and redirected so things work pretty seamless for me off-campus as well.

</comment></comment><comment><USER4> Thousands? Millions more likely!

</comment><comment><USER33> Journals and papers should be obsolete. New results should be entered into an AI system containing the existing body of knowledge on the subject and which can rapidly evaluate whether the new result is consistent with, contradicts or extends existing knowledge. It would also evaluate plausibility, reproduceability, methods and materials, plagiarism, etc.

<comment><USER34> Haha if that existed the AI could just emulate infinite monkeys on typewriters to create papers it could then filter for the plausible, reproducible ones to publish. Hm, maybe it would have to adversarially train the emulated monkeys into monkey researchers to get better throughput.

Seriously though our beloved AI doesn't have reliable object permanence yet. It can't read now and it certainly won't be reading research papers for a while. Be nice, give it some time to grow.

<comment><USER35> I for one welcome our new AI overlords!</comment></comment></comment>


Ask HN: I'm visiting SF to see the startup scene before moving. Advice? - <AUTHOR>

Myself and a friend are both experienced developers and are looking to move to SF with the ultimate goal of founding a startup. We both live in Phoenix, AZ so we're taking a weekend trip to feel out the startup scene, meet with other founders, and get general advice about making the move and getting started. What advice do you have for 2 would-be founders to optimize their visit to SF? Secondly, if you are open to meet please email [at] seancoleman [dot] net <comment><USER2> Why aren't you building a product first? SF isn't magic.

<comment><AUTHOR> We are currently building a product. We hope to meet with as many people as we can on this trip, not to pitch our idea, but to learn about what advantages/disadvantages there are to moving to SF to found/grow a company. We are also contemplating working at another startup in SF as a first step.</comment></comment>


NPM MongoDB Session Store for Express and Connect - <AUTHOR> https://www.npmjs.com/package/connect-mongo-soajs

<comment><AUTHOR> MongoDB session store for Express and Connect with full control over mongo configuration and no race conditions problems - <USER2>

</comment><comment><AUTHOR> [https://github.com/soajs](https://github.com/soajs)</comment>


Review our mobile ticket site, beta launch - <AUTHOR> http://www.mogotix.com Josh and I have made the tickets look good with iPhone, Android and Palm but haven't had a chance to test other phones. We would love to hear how other phones display our tickets. All you have to do is go here http://example.mogotix.com select the number of tickets you want and then fill out the form to receive a mobile ticket.
We promise not to drunk dial you.
Thanks for the feedback. <comment><AUTHOR> Josh and I have made the tickets look good with iPhone, Android and Palm but haven't had a chance to test other phones. We would love to hear how other phones display our tickets. All you have to do is go here <http://example.mogotix.com> select the number of tickets you want and then fill out the form to receive a mobile ticket.

We promise not to drunk dial you.

Thanks for the feedback.

<comment><USER2> Phone: Blackberry Storm 9530 Text: Received Link: Loaded Barcode: Nada

I just got a little outline of a box with a message trying to convince me that "this is my ticket." If you want to know more, my emails in my profile. I'd love to offer up some overall feedback. Overall, I love the concept.

</comment></comment><comment><USER3> I love how you have your logo incorporated in the 2d barcode.

It is interesting that you use bit.ly to shorten the lengths of the urls to tickets, I had assumed that all generated shortened urls in bit.ly were searchable by a random user but that doesn't seem to be the case.

</comment><comment><USER4> How do tickets arrive in phones? Actual barcode/graphic stills or how about text strings? Can the latter be scanned as well?

<comment><AUTHOR> We send a SMS with a link. You can try it out here: <http://example.mogotix.com>

<comment><USER4> Ok to send the ticket outside the US, what countries do you support? the number to be entered in the form should be "++ [country code] number" right? If the tickets are not delivered to the phone, does the user get an email saying so, or even just having the form provide a status report straight away.

<comment><AUTHOR> Actually we only work in the US right now. We were using clickatell but they are going through a huge audit right now. As soon as clickatell gets their act together we will support other countries. Shoot us a email and I will let you know when we have it working again.

</comment></comment></comment></comment><comment><USER4> This is really interesting, I might be able to use mogotix as an adjunct to the startup we're building at the moment.

<comment><AUTHOR> Great. We would love to talk, anytime.</comment></comment>


YC-style Indian incubator accepting applications - <AUTHOR> http://www.iaccelerator.org

<comment><USER2> from last years FAQ

""When the company is formed we set up a bank account. When the bank account is set up we deposit a check for the full amount of our commitment ie. 5 Lakh directly into it. A company secretary is brought in to distribute funds from the company checking account as per the budget instructions. Adjustments to the budget can be made at board meetings. Founders do not have direct check writing control of the bank account."

Has any of this changed? (If not this is a sucker deal, hardly "YC style")

earlier discussion <http://news.ycombinator.com/item?id=842150>

<comment><AUTHOR> So here's the thing... A vast majority of people who apply to us tend to have just graduated out of college and have never managed funds of any sort before. The idea behind putting a budget in place is only to give them financial structure and inculcate a sense of frugality.

That being said, if a founder tells us they'd like their money up front, we'll write them a cheque.

<comment><USER2> " A vast majority of people who apply to us tend to have just graduated out of college and have never managed funds of any sort before."

In other words you think people just out of school can't handle 10k$ without board meetings but you want them to build great companies for you. That makes sense ;-)

This (majority of applicants being graduates) is true for YC (and other funds) too. PG and co don't sit around holding board meetings every time a founder wants to buy a laptop or a monitor.

"That being said, if a founder tells us they'd like their money up front, we'll write them a cheque."

This is good to hear. Founders (desperate enough to go with these guys), do demand your money upfront.

</comment></comment></comment><comment><AUTHOR> I'm the program manager for iAccelerator and I'd be happy to answer any questions.

<comment><USER3> Does one need to relocate to IIMA in order to take part in this? Plus what equity do you typically take?

<comment><AUTHOR> You don't need to relocate to IIM, you just need to be there from the 1st of June to the 10th to get your company incorporated and some awesome workshops we plan to have.

Ideally, we'd like you to work out of either Delhi, Mumbai, Bangalore or Hyderabad. We can give you living & working space in any of these cities.

Also, if you've just got an idea and no prototype or implementation of any sort as yet, we typically invest between 2-5 lakhs and take an average of 6% in equity.

If you've got a product out and some traction of some sort, we're open to other options.

</comment></comment></comment><comment><AUTHOR> "In other words you think people just out fo school can't handle 10k$ without boarmeetings but you want them to build great companies for you"

Its one meeting to decide a budget and we're not going to demand a specific budget, the startup gets to decide how much money they're going to spend and on what. Whether they stick to the budget or not is up entirely to them, we aren't going to police their money at all.

We trust them to build awesome companies which is why we're funding them in the first place.

"YC-like, my ass"

While we're inspired incredibly by YC, there are certain things we do differently simply because of different constraints. There's a lot that we do that maybe YC doesn't do, we will subsidize your living costs & working costs as much as we can should you choose to work out of Delhi, Mumbai, Bangalore or Hyderabad for example.

<comment><USER2> "Its one meeting to decide a budget and we're not going to demand a specific budget, the startup gets to decide how much money they're going to spend and on what."

It is still unnecessary bureaucracy. 10k $ is not that much money even in India. The key point is that you still need founders to tell you upfront (in the form of a "budget") how they are going to spend the money. YC just writes you a check.

As for "policing", if a "Company Secretary" is needed to disburse funds (as per last years FAQ) you don't need to "police" anything and you have line item veto by default.

"We trust them to build awesome companies which is why we're funding them in the first place."

Which brings me to another question. How many of your fundees have gone public/been acquired etc in the last 3 years of your operation? I can't find that info anywhere on your pages.

If you don't trust them to spend the money as they like, you are risking next to nothing. (There seems to be some ambiguity on this. Do founders need a company secretary to disburse funds? Can they write their own cheques/draw on the money as _they_ feel fit, once funded? a simple yes /no on this would help). Why would good developers trade away their freedom for this kind of bureaucracy?

"While we're inspired incredibly by YC, there are certain things we do differently"

Yet you still feel the need to add the "YC like" adjective while missing/perverting the essence of the YC approach.</comment></comment>


India's poorest 'fear hunger may kill us before coronavirus' - <AUTHOR> https://www.bbc.com/news/world-asia-india-52002734 <comment><USER2> When a Pandemic strikes, it is to be viewed like a war time event. Many people are going to be losing jobs - and there will likely be a recession later, which is slow and painful.

However, this is the time to unite, and to stay together and work solutions out. Essential supplies like food and medicines have always been a priority of the Indian government traditionally, and here's the other half of the picture: [https://www.wsj.com/articles/india-to-spend-22-5-billion- to-...](https://www.wsj.com/articles/india-to-spend-22-5-billion-to-help-poor- survive-coronavirus-shutdown-11585223446)

I would advise people to do their research than feed into BBC's opinions masked as news.</comment>


The Power of Prolog - <AUTHOR> https://www.metalevel.at/prolog <comment><USER2> Thank you very much for your interest, I greatly appreciate it!

I hope you are all doing reasonably well. Please take care!

This book was most recently discussed here in May 2018:

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

Since then, I have added a new chapter, _Logical Foundations of Prolog_ :

[https://www.metalevel.at/prolog/logic](https://www.metalevel.at/prolog/logic)

Also, I have made several other additions and improvements. You can see most of the changes since the last discussion in a public git repository:

[https://github.com/triska/the-power-of- prolog/compare/8a94ed...](https://github.com/triska/the-power-of- prolog/compare/8a94ed3d0ab73d31d6400ab18b9b341ed56fbad1...master)

Currently, I am working on several videos that will eventually form the core of the book. Here are a few previews:

[https://www.metalevel.at/prolog/videos/logic](https://www.metalevel.at/prolog/videos/logic)

[https://www.metalevel.at/prolog/videos/timetabling](https://www.metalevel.at/prolog/videos/timetabling)

[https://www.metalevel.at/prolog/videos/sparrows_on_eagles](https://www.metalevel.at/prolog/videos/sparrows_on_eagles)

These videos are all work in progress, and they may be replaced by better versions at any time. Hence, if possible, please use the links above to refer to them: They will always point to the latest versions.

Alternatively, please use the following overview page that shows all videos:

[https://www.metalevel.at/prolog/videos/](https://www.metalevel.at/prolog/videos/)

Also, I have published a comprehensive journal paper about my CLP(B) system, i.e., a _SAT solver_ with some nice algebraic properties, seamlessly integrated into Prolog as a specialized form of unification:

[https://www.metalevel.at/boolean.pdf](https://www.metalevel.at/boolean.pdf)

For Prolog application programmers and system implementors, the paper's appendices may be especially interesting. They formalize a few important concepts that are also a major theme in the book.

As of October 2019, the CLP(B) system is also available in Mark Thom's Scryer Prolog. Scryer is a Rust-based Prolog implementation that is freely available, conforms to the Prolog ISO standard, represents strings efficiently as lists of characters, and includes important features for implementing Prolog-based constraint solvers:

[https://github.com/mthom/scryer-prolog](https://github.com/mthom/scryer- prolog)

As of a few days ago, Scryer Prolog also ships with my implementation of CLP(ℤ), Constraint Logic Programming over _integers_. This is a very useful declarative paradigm for solving combinatorial tasks, in some ways superior to SAT solving because it allows more convenient modeling, easier experimentation with different formulations, and reasoning at a higher conceptual level. The chapter on declarative integer arithmetic contains more information, and further pointers:

[https://www.metalevel.at/prolog/clpz](https://www.metalevel.at/prolog/clpz)

For illustration, here is an example page where you can solve _timetabling instances_ with this approach:

[https://www.metalevel.at/prolog/timetabling/](https://www.metalevel.at/prolog/timetabling/)

I welcome all comments and suggestions about the book, these videos, and Prolog in general. Also, I would like to take this opportunity to thank all readers for your thoughtful comments and endorsements. Your feedback and encouragement are making this work especially worthwhile.

Enjoy!

<comment><USER3> Some coming features of Scryer Prolog for those interested:

\- Automatic detection and compilation of partial strings

\- Streams, including sockets

\- Garbage collection in anticipation of very fast yet logically pure I/O

\- Improvements to the instruction dispatch loop (many opportunities for enhancement there, probably a good place to start for a beginning contributor)

In the past few months, we've added delimited continuations, tabling, partial strings, and Markus' CLP(B), CLP(ℤ) and format libraries. For a hobbyist project I'd say we're moving at a fairly quick pace!

Longer term, we're interested in:

\- JIT compilation to native code (Cranelift seems a good candidate?)

\- Low-level integration with Common Lisp environments

I'd love to have system-level contributors, although library contributions are always very welcome!

<comment><USER4> > very fast yet logically pure I/O

Sounds interesting, do you have a link or something else to share regarding your conception of logically pure I/O?

<comment><USER5> [https://www.swi-prolog.org/pldoc/man?section=pio](https://www.swi- prolog.org/pldoc/man?section=pio)

[https://github.com/SWI-Prolog/swipl- devel/blob/master/librar...](https://github.com/SWI-Prolog/swipl- devel/blob/master/library/pure_input.pl)

this (I assume) is the library(pio) mentioned in the github issue

<comment><USER6> From the interface (mostly yes, that, is apart from the impure extensions added later, and that chars are used and not codes) it is the same. But from the implementation behind it´s different. In particular from the space requirements. A text of n characters requires 3 * 8 * n bytes in SWI, but n + 2 * 8 bytes in Scryer. So there is a factor 24 in space requirements (on 64bit).

Also, there is now ample room for input that SWI once almost offered.

</comment></comment></comment></comment></comment><comment><USER7> Is there a reason why anyone would choose prolog today instead of a library? Like racklog [[https://docs.racket-lang.org/racklog/](https://docs.racket- lang.org/racklog/)]. All the benefits of prolog, with none of the cost of using a new language and integrating it into your project.

<comment><USER4> I think you have a point, but not sure your example illustrates it very well - is Racket really any less niche than Prolog? On the contrary, I would say.

But regardless, if one needs some of the basic features of Prolog and a good library exists for your language/environment of choice (core.logic for Clojure is probably one of the most solid ones at the moment), then I think it's good common sense not to add one more language to your system (assuming this is in a production context, of course). But modern Prolog systems have a lot more functionality than the unification and backtracking semantics that at the core of Prolog. Among them are the constraint solving capabilities that The Power of Prolog describe, and tabling in some form, which allows for efficient execution of programs that in early Prolog systems would lead to non- terminating search.

Not only are these features available, but in many cases they are tightly integrated with the language, optimized and fine-tuned over many years. So the answer is similar to if someone asks "Why choose Erlang when there are actor- based concurrency libraries in so many languages?" (or any number of similar questions): it might not make sense for the simpler use cases, but you won't get the full experience unless you take the plunge.

<comment><USER7> I was using racklog as an example of a library you would use if your app was programmed in Racket; I wasn't suggesting that you would decide to use racklog in a C project or something over prolog.

</comment></comment></comment><comment><USER8> Earlier versions were discussed in 2018: [https://news.ycombinator.com/item?id=17121028](https://news.ycombinator.com/item?id=17121028)

and 2017: [https://news.ycombinator.com/item?id=14045987](https://news.ycombinator.com/item?id=14045987)

(Links are for the curious. Reposts are ok after a year: [https://news.ycombinator.com/newsfaq.html](https://news.ycombinator.com/newsfaq.html))

</comment><comment><USER9> Prolog reminds me of Cyc.

"Cyc failed to understand a story about a person named Fred shaving in the morning... Its inference engine detected an inconsistency in the story: it knew people do not have electrical parts, but because Fred was holding an electric razor, it believed the entity 'FredWhileShaving' contained electrical parts. It therefore asked whether Fred was still a person while shaving."

From "Deep Learning" by Ian Goodfellow, Yoshua Bengio, Aaron Courville.

<comment><USER10> I think that's a valid point. Cyc consisted of a set of frames/predicates with real world relations and concepts. And then the logic part on top would try to find inconsistencies, generate new predicates, and of course some kind of unification to answer questions over predicates.

They worked on it in isolation for decades, building new frames laboriously by hand, and made a few corporate sales I guess, but withdrew OpenCyc and that's about the last we heard from them. Major bummer.

I feel like an open source business model would have allowed the public to use and extend the frames, propelling Cyc to mainstream, while Cycorp would consult and advocate and curate.

</comment></comment><comment><USER11> I've found this channel a few months ago and my wife thinks I'm crazy when I'm watching it. "This looks like work, but harder!!". Awesome content! Thanks for posting it :)

<comment><USER2> Thank you so much, and you are welcome! That's an awesome slogan!

Some things are hard, yet have no pay-off or are even detrimental. On the other hand, things that pay off are often proportionally hard.

It is not may goal to make it hard, in fact I am doing everything I can to make it as easy as possible. I am very interested in didactic approaches, and always welcome feedback! I would like to make it worth the effort for viewers, and — beyond that — exceed the required effort in value.

<comment><USER11> You do a very good job making it approachable. I'll make a PoC this year using Prolog in a specific application regarding contract generation (LawTech). It's surely thanks to your insights!

Now that I know your handle, I'll ping you when I have some news :)

<comment><USER2> Thank you a lot, I would greatly appreciate this!

There is significant interest in applying logical reasoning and logic programming in the context of legislation and application of laws, in fact especially in Austria, for several reasons both historic and current, and also throughout Europe, for instance to implement cross-border use cases that are mandated by the Single Digital Gateway Regulation (SDG).

As one contact point, see for example the _Vienna Legal Hackers_ :

[http://vie-legalhackers.at/en/home-en/](http://vie-legalhackers.at/en/home- en/)

A few weeks ago, I gave a presentation about _Logic in the Public Sector_ in the form of a RuleML webinar, maybe these slides are interesting for your use case, or in future projects in LegalTech:

[http://ruleml.org/talks/MarkusTriska- LogicInThePublicSector-...](http://ruleml.org/talks/MarkusTriska- LogicInThePublicSector-RuleMLWebinar-2020-03-25.pdf)

See also ruleml.org for more information about RuleML, and further potential opportunities for cooperation!

One thing I can say for certain, after discussing this topic with lawyers who are interested in Prolog: In Vienna, opportunities for applying Prolog in concrete projects in LegalTech abound. If you want to use Prolog in a job in the legal sector and are reasonably skilled in the language, you can start working immediately, for instance in the context of EU projects.

</comment></comment></comment></comment><comment><USER12> See also Mercury, FP logic programming like the love child of Prolog and Haskell [https://en.wikipedia.org/wiki/Mercury_(programming_language)](https://en.wikipedia.org/wiki/Mercury_\(programming_language\))

<comment><USER13> PicoLisp also has a prolog in it.

</comment></comment><comment><USER14> Prolog look like it would be the correct tool for the job for a certain class of problems, I wish I had time to learn it. I always wonder why it doesn't get more attention.

<comment><USER15> Nowadays, ontology-management systems like Protégé and SPARQL can more or less solve all problems prolog can solve, while providing higher-level formalisms and with the guarantee your query will terminate.

<comment> ben-schaaf Doesn't guaranteed termination just mean it isn't Turing complete and thus by definition can't solve all problems prolog can solve?

<comment><USER15> Absolutely. But in practice, I can't think of a problem that coulnd't be solved with OWL (or some other formalism like answer set programming) and where prolog would be the best solution (rather than more "traditional" programming languages). There are certainly a few, but not enough IMO to draw a lot of attention to prolog.

</comment></comment></comment></comment><comment><USER16> I absolutely loved Prolog and CLP(R) back in the day.

The one thing I never got past was its difficulty in dealing with large, mutable sets of data. So, for example, given an array of a million or billion elements that are being rapidly modified, even the most trivial sorts of backtracking become infeasable. Maybe there's some elegant way to do it, but I never got it.

(And difference lists need to die.)

<comment><USER17> I've always had difficulty debugging functional and formula based logic, and others have said similar. Imperative is just easier to "fractal-ly dissect" to me. Debugging seems to be a reoccurring theme of many "high abstraction" techniques that perhaps keep them out of the mainstream. I known many disagree, and this claim often triggers heated debates.

</comment></comment><comment><USER18> If anyone loves both Prolog and Python, I wrote a mini-prolog interpreter in Python just over a year ago which you can check out here: [https://github.com/photonlines/Python-Prolog- Interpreter](https://github.com/photonlines/Python-Prolog-Interpreter)

<comment><USER19> snap, but mine is in javascript and references a couple of predecessor javascript mini-prolog interpreters: [https://github.com/mattsouth/dprolog](https://github.com/mattsouth/dprolog). I still need to read that WAM book. But I tell that to myself everytime it comes up here.

</comment></comment><comment><USER20> Just a conjecture, but I think the main drawback of Prolog is its hard to see it having popular support. Recursion, logic programming, and constraint satisfaction are challenging paradigms which doesn't lend well to doing something useful quickly, as opposed to something like Rails.

Im just finishing a class using Prolog and CLP(FD) and I've really enjoyed using the language. And while lots of things in programming aren't easy at first, I'm just saying its hard to see wide adoption of prolog for that reason.

</comment><comment><USER21> has anyone here ever used prolog in production - like real world, making money, production? How about in real world research where it produced no- kidding actual value? From what I can tell it is only useful these days as a academic example of an alternative type of language. Is there something else that has carried the torch forward?

<comment><USER22> Yarn [https://yarnpkg.com/features/constraints](https://yarnpkg.com/features/constraints)

</comment></comment><comment><USER23> OT, but I was entertained by the fact that, as soon as I went to the page, the "Recursion" link was purple.

</comment><comment><USER24> prolog should be used as a library DSL, embedded, within programs written in other languages</comment>


Duff's device - <AUTHOR> https://en.wikipedia.org/wiki/Duff%27s_device <comment><USER2> Don't miss out on the brilliant link at the bottom - Adam Dunkels' Protothreads - Lightweight, Stackless Threads in C also uses nested switch/case statements [1].

I learned about the theory with it, and used his library to implement cooperative multitasking on a bare metal embedded AVR C project. I wrote a task manager and dispatcher based on Protothreads, and that effort was what later made it simple for me to understand the JS async/await paradigm that would appear under my radar a couple years later.

EDIT to add that I think the concepts might still apply, since these days I've seen things like stackless async coroutines discussed for Rust... didn't study those in detail yet, but I wouldn't be surprised if the basic concepts are the same.

[1]: Current website: [http://dunkels.com/adam/pt/](http://dunkels.com/adam/pt/)

<comment><USER3> Wikipedia entry on protothreads: [https://en.wikipedia.org/wiki/Coroutine#Implementations_for_...](https://en.wikipedia.org/wiki/Coroutine#Implementations_for_C)

The source code is interesting. LC_SET is particularly neat:

      /* WARNING! lc implementation using switch() does not work if an
         LC_SET() is done within another switch() statement! */

      /** \hideinitializer */
      typedef unsigned short lc_t;

      #define LC_INIT(s) s = 0;

      #define LC_RESUME(s) switch(s) { case 0:

      #define LC_SET(s) s = __LINE__; case __LINE__:

      #define LC_END(s) }

<comment><USER4> One cool thing you can do is to manage the numbers in the case manually, eg.

      #define LC_SET(s,num) s = num; case num:

This will let you serialize the state s, modify the program, recompile and reload s, and have it resume at the desired point.

<comment><USER5> You could take this one step further by using the __COUNTER__ macro to generate unique numbers in the preprocessor.

Alas, this isn't a part of the standard (iirc), so you need to depend on compiler-specific features.

<comment><USER4> What I'm thinking of is modifying it like this

        LC_SET(s,0)
        A
      + LC_SET(s,2)
      + C
        LC_SET(s,1)
        B

When the number for each resume point is explicit instead of automatic, you can edit the source code while controling where any existing suspended coroutines will resume at.

</comment></comment></comment></comment></comment><comment><USER6> I worked with a recipient of this email for many years, and part of our work involved writing C. It was a real pleasure reading his C, he was a master of the form.

There is something I miss in modern languages...they do not permit the _abuse_ that C permits. The preprocessor, pointer arithmetic, various semantics around types and overflows...one of course sees some horrendous monstrosities in the Linux kernel source...

C as a tool is only an approximation of the underlying machine, as such the tool can be bent to deliver semantics that are wholly surprising. I can think of no mainstream language that has that property. It's a shame.

<comment><USER7> > I can think of no mainstream language that has that property.

Duff's Device works in D:

        void send(short* to, short* from, size_t count)
        {
            auto n = (count + 7) / 8;
            final switch (count % 8) {
            case 0: do { *to = *from++; goto case;
            case 7:      *to = *from++; goto case;
            case 6:      *to = *from++; goto case;
            case 5:      *to = *from++; goto case;
            case 4:      *to = *from++; goto case;
            case 3:      *to = *from++; goto case;
            case 2:      *to = *from++; goto case;
            case 1:      *to = *from++;
                    } while (--n > 0);
            }
        }

The `goto case;` is D's way of saying "fall through to the next case".

<comment><USER8> Ah that's interesting, didn't know D had goto case statements. Btw, what are some projects you've used D for? What are other surprising lesser known features of it to you?

<comment><USER7> The biggest project is implementing the D compiler itself in 100% D. Don't have much time for other projects.

Nested functions are a little gem. I stole the idea from Pascal. I've since discovered that they can nicely clean up spaghetti code that C engenders, without losing efficiency.

Nested functions would fit into C seamlessly, I sometimes wonder why the C people don't adopt it. I can only assume they just don't realize how sweet they are, which is understandable because you just have to use them a bit to see it.

<comment><USER9> How do D's nested procedures differ from the Obj-C block extension?

The original pascal based Mac toolbox APIs encouraged nested procedures in modal contexts - but Nested procedures couldn't escape their outer frame.

<comment><USER7> I have no idea what Obj-C block extensions are.

D's nested functions (like Pascal's) have two frame pointers - a dynamic frame pointer (like C has), pointing to the caller's stack frame, and a static frame pointer pointing to the enclosing function's stack frame.

This allows the nested function to access the enclosing function's variables.

It's a bit tricky to set up, but works a treat.

</comment></comment></comment></comment></comment></comment><comment><USER10> See also:

2017 [https://news.ycombinator.com/item?id=15679205](https://news.ycombinator.com/item?id=15679205) \- particularly [https://www.lysator.liu.se/c/duffs- device.html](https://www.lysator.liu.se/c/duffs-device.html)

2016 (a bit) [https://news.ycombinator.com/item?id=12758686](https://news.ycombinator.com/item?id=12758686) and [https://news.ycombinator.com/item?id=10830744](https://news.ycombinator.com/item?id=10830744)

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

2015 (in Go) [https://news.ycombinator.com/item?id=8990742](https://news.ycombinator.com/item?id=8990742)

2012 [https://news.ycombinator.com/item?id=4360306](https://news.ycombinator.com/item?id=4360306) (note the personal anecdote)

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

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

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

</comment><comment><USER11> Every time this article is reposted I can't help but laugh at the line:

"C's default fall-through in case statements has long been one of its most controversial features; Duff himself said that 'This code forms some sort of argument in that debate, but I'm not sure whether it's for or against.'"

</comment><comment><USER12> Read the source to Putty sometime.

The main program is one big, big function with a big, big loop and switch in it. Each place where it does something that would (otherwise) block, it sets a state variable to match a case label right after, does a non-blocking version, and breaks. (This is done with a macro.)

After the break, it stashes the state, and if anything is ready, switches to that state and re-enters the switch. Otherwise, it sleeps waiting for work that can proceed.

As a colleague remarked, "I love it, and hate myself for loving it."

</comment><comment><USER13> Something like it works for if...else...if...else too. To my horror, this was more readable and maintainable than any alternative I could imagine.

        switch(override){
        default:
            printf("unexpected...\n");
            // fallthrough
        case 0:
            if(z_bits&4 || N_flag){
        case 100:
                handle_100();
            }else if(x_bits & 0x80){
        case 200:
                handle_200();
            }else{
        case 500:
                handle_500();
            }
        }

It's cut down a bit for Hacker News. The original had about a dozen lines of code where each handle_XXX function now sits.

</comment><comment><USER14> While not a "pure" Duff's Device, Golang apparently does something similar with STOSD for an unrolled memcpy that it can call into at different points. I think it's really cute.

[https://twitter.com/mayahustle/status/1260678725257003008](https://twitter.com/mayahustle/status/1260678725257003008)

</comment><comment><USER15> I used one of these for the implementation of Siphash in the Linux kernel, if you're interested in a real world example: [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...](https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/siphash.c#n52)

<comment><USER16> Maybe I'm missing something, but that just looks like a regular C switch to me. Yeah, it has fall-through, but all C switches has fall-through unless you explicitly break. The point of Duff's device is that it _interleaves_ two different structures: a switch and a loop.

It's unusual because in structured languages you expect the lexical structure to be entirely hierarchical (you wouldn't have an if block that somehow overlapped with a for-loop, for instance). Duff's device breaks that assumption because it uses one control structure (the switch) to jump into the middle of a second control structure (the loop), and lexically, the switch is _both_ inside the loop and outside of it.

This is why lots of people when they first see it don't think it is even syntactically valid. A regular switch with fall-through doesn't violate the "hierarchical lexical structure" assumption in that way.

</comment></comment><comment><USER17> This is, oddly, one of the few things I think would actually be clearer in assembly language than it is in C.

<comment><USER18> You can actually get rid of the confusing nesting:

        switch(n%4)
        {
        loop:
        case 0: stuff();
        case 3: stuff();
        case 2: stuff();
        case 1: stuff();
        if(--n) goto loop;
        }

</comment></comment><comment><USER19> This is a fun language hack, but be aware that this is probably not good for performance in 2020. Nearly anything larger than a coffee machine microcontroller these days probably has instruction level parallelism and also operates more efficiently on larger data words. Obviously it depends on what you're trying to do but using this for any kind of iterative memory op is probably slow. It's also such an oddball construction that the compiler is not likely to be able to optimize it.

<comment><USER20> Yeah, I think dma is more common now, memory mapped registers aren't as common anymore.

</comment></comment><comment><USER21> I have actually used this in production for cooperative multitasking framework for Verifone VX510.

I needed this to run multiple stuff at the same time (for example printing while also doing network -- both serial devices on VX510).

Could have done this with setjmp/longjmp but it would not be as fun:)

</comment><comment><USER22> > Its discovery is credited to Tom Duff in November 1983, when Duff was > working for Lucasfilm and used it to speed up a real-time animation program.

It's mind-boggling to me that something like that can be "discovered". It's certainly "discovered" because it relies on a particular setup that relies on specific low-level features of C. Perhaps I would have denoted it as "invented" but the more I read about it, the more I realize that it probably doesn't qualify as something that was "invented" for the same reasons.

<comment><USER23> Didn't the whole meta-programming thing with C++ templates start because someone noticed unusual output in an error message.

</comment></comment><comment><USER24> Would a modern C compiler even permit that?

The article does say " At the time of the device's invention this was the first edition of The C Programming Language which requires only that the body of the switch be a syntactically valid (compound) statement..." which implies it isn't valid now.

Any correct parser based on any sane grammar should instantly choke on that.

<comment><USER4> Yes, it's correct modern C. I'm not sure what that paragraph is supposed ot mean. AFAICT there is no difference between old and modern C in how the cases can appear in the body of the switch. Here is the first edition of _The C Programming Language_ on switch:

> switch (expression) statement

>The usual arithmetic conversion is performed on the expression, but the result must be int. The statement is typically compound. Any statement within the statement may be labeled with one or more case prefixes as follows

> case constant_expression :

[https://archive.org/details/TheCProgrammingLanguageFirstEdit...](https://archive.org/details/TheCProgrammingLanguageFirstEdition/page/n209/mode/2up)

<comment><USER25> I can't at all support this with a source, but I had THOUGHT the register keyword needed to make this fast was largely up to how the compiler decides to use it. That register can't be required to be register vs ram, but it's encouraged to be IF the compiler can do it.

So I thought the downside was you can declare "register" but it might not obey but then definitely can not use the & to get the memory address by using they keyword. Which on portable code register isn't recommended.

So I suppose it's not entirely fair to say all modern or all past support this. Right?

<comment><USER18> You're tangling a bunch of stuff together in a confusing mess. Let's take one thing at a time.

1\. You're right that you can't use the & operator on a variable that was declared using the register keyword.

2\. However, if you look very carefully at the example code, it actually follows this rule. In fact, it doesn't use the & operator at all. There's a lot of pointers all over the place, but no usage of the & operator.

3\. You're also right that the register keyword is just a hint that the compiler is free to ignore.

4\. Expanding on the previous point: modern compilers usually will ignore it, but in the olden days, compilers were not so good at register allocation, so this keyword was needed if you wanted speeds competitive with assembly. Since this is code from the 80s, no surprise that it uses this keyword.

5\. Now that we've got all that out of the way: the register keyword is a complete distraction here, and has nothing at all to do Duff's device. Since modern compilers ignore it anyway, you can take the original example and just delete all uses of the word "register". The point of Duff's device is how to do manual loop unrolling without then having a special "pre-loop" or "post- loop" which takes care of "leftovers" because your array size was not divisible by 8, or 4, or whatever unroll factor you happened to use.

</comment></comment></comment></comment><comment><USER26> It's a very fun historical article, but it's no longer worth it on modern CPUs, where it actually harms performance.

<comment><USER27> It's more a comment about the syntax of the C switch statement than about micro-optimization.

<comment><USER28> There's two kinds of C programmers: those familiar with Duff's device, and those who wouldn't expect Duff's device to even compile.

<comment><USER29> I'm familiar with it and I _still_ don't think it should compile...

<comment><USER13> I'm disappointed that gcc's nested function extension doesn't let me use a switch to have a second entry point for the inner function.

I also can't seem to get there with a plain goto. I can't jump out either. Probably the computed goto extension will do the job, but that is cheating.

<comment><USER18> Using computed goto would (probably) make the code compile, but it wouldn't actually work. That's would be heading directly into undefined behavior territory (aka land of the nasal demons).

To give just one or two examples of why this is doomed: imagine you want to jump "inward". If the inner function takes any arguments, you haven't passed them! And if you jump inward, and the inner function then hits a return statement, do you return to the outer function, or to its caller?

And after you resolve all such semantic issues, you need to actually implement all this, without slowing down code which doesn't use this feature.

And all this complexity doesn't buy you much because you have two other options:

1\. just call the function to jump inwards, and simply return to jump out.

2\. Don't bother with nested functions, and just inline the code.

<comment><USER18> So it turns out I'm kind of wrong! My arguments for jumping "inward" still seem pretty valid, but they don't generalize to jumping "outward". And indeed, GCC actually allows this, but you need to use the right syntax:

[https://gcc.gnu.org/onlinedocs/gcc/Nested- Functions.html](https://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html)

</comment></comment></comment></comment></comment></comment></comment><comment><USER30> When I was in college people had text files of tricks like this that they would send around. Over time you built up a library of these little hacks that could make a real difference especially in rendering or graphics applications.

</comment><comment><USER31> Please don't use Duff's device. Look at how your favorite c std lib implements memcpy and think about that rather than this.

<comment><USER32> Duff's device does not do memcpy. It's writing all the elements of a string to the same location in memory, where there's a port.</comment></comment>


Rust at CloudFlare - <AUTHOR> https://docs.google.com/presentation/d/1ERVTXZbYBMZf-9Zk3YsWw2oV14C5j0i1PsVgGywSsAI/mobilepresent?slide=id.g244c4c34_09 <comment><USER2> Here are the videos and slides... (from the May 2018 Bay Area Rust Meetup, which was hosted at Cloudflare)

Rust at Cloudflare Video: [https://watch.cloudflarestream.com/4d5d6da3c6217c24f4e44564e...](https://watch.cloudflarestream.com/4d5d6da3c6217c24f4e44564e041f772) Slides: [https://docs.google.com/presentation/d/1ERVTXZbYBMZf-9Zk3YsW...](https://docs.google.com/presentation/d/1ERVTXZbYBMZf-9Zk3YsWw2oV14C5j0i1PsVgGywSsAI/edit?usp=sharing)

TrustDNS Video: [https://watch.cloudflarestream.com/e14e0d2335ffb94ae505289f5...](https://watch.cloudflarestream.com/e14e0d2335ffb94ae505289f55552142) Slides: [https://drive.google.com/drive/folders/1gQn9Uuj34TxS4cfUoW1N...](https://drive.google.com/drive/folders/1gQn9Uuj34TxS4cfUoW1Ng4o8axI9r8kq?usp=sharing)

Rust Perf with lolbench Video: [https://watch.cloudflarestream.com/5774ee39218ed516521adb74c...](https://watch.cloudflarestream.com/5774ee39218ed516521adb74c3acddb5) Slides: [https://docs.google.com/presentation/d/1BEI7zXhEiCwEd93-UUpW...](https://docs.google.com/presentation/d/1BEI7zXhEiCwEd93-UUpWv- Yv5azRmBa5caPH0rCAh_Q/edit?usp=sharing)

edit: context about the event edit2: formatting

<comment><USER3> Thanks for the info. 1 thing: I know you guys have your own Stream video service but Youtube is still much nicer for viewing...

<comment><USER4> The official (I think?) youtube channel has them: [https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA](https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA).

<comment><AUTHOR> It is.

</comment></comment></comment></comment><comment><USER5> I like the quote from Slide 10:

> Why Rust (for CloudFlare)

> ...

> \- Safe (we had a bug once...)

> ...

Funny because according to Algolia, the bug in question is the 7th-most- upvoted HN post of all time, clocking in at about 1k comments.

Great to see Rust gaining industry adoption.

edit: to clarify, I like that Cloudflare can look back at a bug in their C code, chuckle about it, and then start to move on to something safer. This is the bug in question: [https://news.ycombinator.com/item?id=13718752](https://news.ycombinator.com/item?id=13718752)

<comment><USER6> Could you provide a link to it?

<comment><USER7> I suspect it's this bug: [https://blog.cloudflare.com/incident-report-on- memory-leak-c...](https://blog.cloudflare.com/incident-report-on-memory-leak- caused-by-cloudflare-parser-bug/)

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

<comment><USER6> I can't tell if the OP is suggesting the bug they had was due to Rust, or if they adopted Rust for a safe language they once had a bug?

<comment><USER7> The latter. I think it's a sheepish admission that the bug (caused by unsafe C code) is a reason to prefer Rust's safety, which should help them prevent another one like it.

<comment><USER8> It is, the person presenting says so in the video.

</comment></comment></comment></comment></comment></comment><comment><USER9> I'm the Engineering Manager @ Cloudflare for the "Wireshark but at the Edge" thing. Happy to answer any questions, though I'll be clear... this isn't something you can play with yet and we're in early days with this feature.

The goal is "customers should be able to create filters that target traffic passing through our system and then do things" so this is definitely a thing we wish to give to customers rather than an internal toy.

<comment><USER10> I wouldn't mind hearing some details on perf. I would imagine a lot of filtering can happen at the true edge via BPF, kernel mods, or otherwise zerocopy mechanisms.

Looks like Linux added in kernel tls termination; sounds like even layer 7 inspection could all happen in kernel space as well...

<comment><USER9> Ah, for this I'll defer until we have more data.

At the moment we have a simple(ish) implementation running at the edge purely within Nginx and a project underway to see how it behaves, gather metrics. That environment gives us a good place in which to control testing, and we can easily compare it to other parts of our code where we already do more trivial request matching (our Page Rules feature).

It'll be a couple of months before we're satisfied we know enough to say whether we'll keep it simple or will seek to make it more specialised to our environment. We haven't yet determined how far we're going to go with this... could it replace our WAF? Is it cheap enough for the DDoS layer? If we do go down those paths then it's obvious that yes we'd move the filtering to other places.

</comment></comment></comment><comment><USER11> It's cool to see CloudFlare using Rust but I wish they went into a little more detail on the slides. I hope to see follow up blog posts or some of the code open sourced soon.

<comment><USER2> That's what happens when Product Managers present the things the engineering team is doing. :) The bigger projects are in London. I'm going to try get the engineers out to SF next time we host and go a bit deeper. The EM is on this thread answering questions also.

<comment><USER11> Ok, great. Thanks for sharing the information as it is! :)

</comment></comment></comment><comment><USER12> 2 videos up on the rust channel from this and hopefully more in future - [https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA/vid...](https://www.youtube.com/channel/UCaYhcUwRBNscFNUKTjgPFiA/videos)

</comment><comment><USER13> just me, or anyone else find it odd that this is a google docs deck? don't see those published much (usu. pdf and of course ppt).

anyway, another example of soft recruiting done right by cloudflare!

</comment><comment><USER14> Can anyone offer some context? Redox is great, but why is it a pro for cloudflare?

<comment><USER15> It's listed under the Why rust (for me) slide. I.e. it's the authors own reasons/pros.

<comment><USER16> Does that mean it is actually being used in production, or is it just a potential? If so, I hadn't realised it had come on that far!

<comment><USER2> Rust is being used in production at Cloudflare. Redox is not used here in any capacity.

</comment></comment></comment></comment><comment><USER17> TrustDNS awesome for 184.108.40.206

<comment><USER18> We're putting the 0.9 release of the Resolver together now, hopefully for release in the next few days. Lot's of good things, including DNS-over-TLS with cloudflare and quad9 configs available.

</comment></comment><comment><USER19> Hmmm, they say only 10Tbps capacity, but they serve 10% of the internet's HTTP traffic? That doesn't seem right.

<comment><USER20> Only? 10 Tbps is HUGE capacity. Biggest IX (Internet Exchange) which is AMS-IX have 5 Tbps at peak. Whole internet traffic in 2016 was around 160 Tbps. So it seems right.

<comment><USER19> disclaimer: I work for a CDN, but am not representing them with this comment

Right, but this is talking about GLOBAL capacity, not at a single datacenter. The CDN I work for has over 49tbps, and we wouldn't claim to be doing 10% of all HTTP traffic:

[https://images.verizondigitalmedia.com/2015/12/VDMS_NetworkM...](https://images.verizondigitalmedia.com/2015/12/VDMS_NetworkMap_May2018.png)

Plus, capacity is always going to be greater than actual throughput, both for reliability reasons and traffic patterns (i.e. you need enough capacity for your peak traffic in a datacenter, not the average)

I really doubt the 10% claim.

<comment><USER20> Of course capacity is always greater, average twice greater as that kind of deals you are taking from T1 providers. But depends how much commitment you have, what kind of deals and traffic patterns you are using. CF has 10 Tbps capacity but probably a lot less throughput, they need high capacity because they are DDOSed a lot.

I wasn't taking those numbers from nowhere. Read this:

[https://www.cisco.com/c/en/us/solutions/collateral/service-p...](https://www.cisco.com/c/en/us/solutions/collateral/service- provider/visual-networking-index-vni/vni-hyperconnectivity-wp.html)

I think people are misinterpreting what they claim, It's not about 10% of internet throughput of HTTP traffic, it's about 10% of all HTTP requests.

</comment></comment></comment></comment><comment><USER21> http traffic from cloudflare is cutting edges.

</comment><comment><USER22> Also, Cloudflare is hiring.</comment>


Use It Too Much and Lose It? The Effect of Working Hours on Cognitive Ability [pdf] - <AUTHOR> https://www.melbourneinstitute.com/downloads/working_paper_series/wp2016n07.pdf <comment><USER2> The TL;DR summary from the abstract:

        > For working hours up to around 25 hours a week, an increase in working hours
        > has a positive impact on cognitive functioning. However, when working hours
        > exceed 25 hours per week, an increase in working hours has a negative impact
        > on cognition.

No significant difference between women and men.

Important detail: They _only_ looked at people 40 or older, so no conclusions should be attempted _based on this paper alone_ about differences between older and younger groups (above/below 40). Looking at their tables at the end of the paper I also didn't see any stratification by age within the sampled group, they only listed the sample size for three (15 years wide) age groups (Table II).

<comment><USER3> no conclusions should be drawn from a single study period, and especially considering this was survey data.

<comment><USER2>
        > no conclusions should be drawn from a single study period

I didn't see the point in pointing out the obvious - I thought that's as annoying as on reddit's /r/science the inevitable single-sentence comment "correlation is not causation" for no reason whatsoever (i.e. when nobody made that claim). I pointed out the age threshold because there _was_ a comment (of only 6 or 7 total at that point) that attempted to draw the conclusion that older people are doing worse.

<comment><USER4> From what do you come to the conclusion that older people are doing worse? Worse in respect to what?

The paper more or less confirms from the cognitive domain, that we are working to much. Upto 25 hours are the best. This interestingly coincides with claims from others, eg. UBI folks, to work less for increased productivity. Seems we are getting more and more factual prove that eg. redistribution of wealth should be done not by increasing taxes but by getting more people into the workforce in exchange of others working less (and earning less).

<comment><USER2>
       > From what do you come to the conclusion that older people are doing worse?

What on earth are you asking me??? I don't! Please actually _read_ what people write before clicking on "Reply"!

</comment></comment></comment></comment></comment><comment><USER5> This is one of the most unconvincing instruments I've ever seen in an economics paper. They don't even try to justify why variables like 'parents alive' (!), 'other public benefits' (!!), 'owning your own house' (!!!), or 'number of children' or 'work experience' (!!!!) are all causally independent of intelligence. There's no way these form a valid instrument allowing causal inference.

Hey, why not throw in education or grades while you're at it, after all, "The validity of the variables used to generate exclusion restrictions needs to be investigated in future research", since that would be as valid an instrumental variable as any of the others...

(I also object to the media framing this as an argument for 3-day work weeks. If cognitive performance peaked at 3-days, employee performance could still be way worse due to the few hours split up, in addition to the economic overhead for businesses of having many part-timers.)

</comment><comment><USER6> Here is a study from the game industry where game scores are compared to coding crunch. [http://www.gamasutra.com/blogs/PaulTozour/20150120/234443/Th...](http://www.gamasutra.com/blogs/PaulTozour/20150120/234443/The_Game_Outcomes_Project_Part_4_Crunch_Makes_Games_Worse.php)

There is GDP per hour worked. [http://stats.oecd.org/Index.aspx?DataSetCode=PDB_LV](http://stats.oecd.org/Index.aspx?DataSetCode=PDB_LV)

<comment><USER7> This game industry study is a really really nice study. They take the time to analyse the effects of crunch/overtime at different levels and if voluntary or not. The first time I see such nice study for programming/creative work. We had many aggregate studies or on production lines, but not so much for creative work.

Really a recommended read.

</comment></comment><comment><USER8> I didn't read it in detail, so forgive me if this was accounted for, but I feel like this would be hard to control as people who are not working at all or working extremely long hours may not be as capable as those working a normal or slightly lower than normal numbers of hours to begin with.

For example, if I can get a job and make enough money in a shorter number of hours, I'm probably smarter than the person who can't get or a job or the person who has to work 65+ hours a week, even if accounting for degree or similar.

<comment><USER9> I'm not convinced by this line of reasoning. Some of the highest paid jobs - Doctor, lawyer - have the longest hours. On the other hand, part time jobs are often minimum wage and low paying jobs (Walmart etc).

<comment><USER10> Hum... And the study concluded that both extremes correlate with lower cognitive ability.

</comment></comment></comment><comment><USER11> I'd wager that this is mostly due to mental exhaustion making people unable to devote a lot of effort to these tests and that it will go away after a few weeks of vacation.

</comment><comment><USER12> I scanned this, but didn't catch where it defines what work is. I'm probably taking this paper out of context of what it's meant for. These sorts of things never seem to define work though. This is important for situations where you never have to leave the home to do your work. Is reading considered work? How about brushing my teeth? Does anyone actually do more work over 40 hours in the office than someone who would do the same tasks from home?

</comment><comment><USER13> I'm not convinced about the low optimum.

There seems to be a clear correlation between employment and ability, but then they bend the data into a model that seems to exaggerate the differences between >35 and <35 cohorts.

I have worked to much to have energy to read the details, but if the "unemployed" group does not include retired people, then the causality might be in the other direction...

</comment><comment><USER14> Why are there missing figures and tables? Is this a prepublication version that got uploaded and linked by mistake?

<comment><USER5> Preprints are very common in economics. Their papers can float around for years before being 'published'. The figures & tables are at the end of the PDF.

</comment></comment><comment><USER15> Url changed from [http://www.kansascity.com/news/nation- world/world/article976...](http://www.kansascity.com/news/nation- world/world/article97616417.html), which points to this.

</comment><comment><USER16> To me seems logical: As we get older more and more energy would be used on preservation (read it as fix damage and less efficient process as result of age), therefore shrinking/eliminating everything not being used it's necessary.

Edit: TL;DR: From the PDF conslussions:

it is found that working hours up to 25–30 hours per week have a positive impact on cognition for males depending on the measure and up to 22–27 hours for females. After that, working hours have a negative impact on cognitive functioning.

<comment><USER2>
        > To me seems logical: As we get older...

Since the paper _only_ looked at people above 40, I don't see how you can make any such conclusion. There is nothing about younger people. They _may_ do better - they may also be the same or worse. They were not even included.

<comment><USER16> Nice catch, there are two parts in trying to support my theory, first included in my post:

As we get older more and more energy would be used on preservation (read it as fix damage and less efficient process as result of age), therefore shrinking/eliminating everything not being used it's necessary.

The second is an entry on how our bodies are machines oriented to try to avoid wasting energy... or better said preserving it... for that part my canonical reference would be the Algernon argument:

[http://www.gwern.net/Drug%20heuristics](http://www.gwern.net/Drug%20heuristics)

<comment><USER2> That is just your opinion - and it isn't even clear that it means anything. I don't see any supporting _evidence_. I'm not saying you are wrong (wrong with what, anyway? It's so vague and empty), I'm saying it's just some "statement", nothing more. Even so your list suffers from some severe selection bias: You chose exactly what supports your _idea_. What about greater "wisdom" of older people? Less desire to succeed at all cost, i.e. possibly more relaxed and willing to look at the big picture? Those two are just "statements", "ideas", so just like you :)

        > The second is an entry on how our bodies are machines oriented to try to avoid wasting energy

Without even going into details about that sentence, that is a statement without a point. What exactly do you want to use it for? To show what? How?

The 1st part _" our bodies are machines"_ is as trite a statement as it gets, pardon me for pointing this out.

The 2nd part _" oriented to try to avoid wasting energy"_ is just as bad if not worse - if the main focus of our bodies was just that suicide and eternal sleep would be the best option to achieve that goal.

        > As we get older more and more energy would be used on preservation...

        > ...therefore shrinking/eliminating everything not being used it's necessary.

What is that even supposed to mean. Either part. Nor does it seem right (having taken medical courses such as physiology) - citation needed (after defining what you actually mean) for part 1, part 2 is completely unclear I'm sorry to say. What shrinks? What is eliminated?

<comment><USER17> > _That is just your opinion - and it isn 't even clear that it means > anything. I don't see any supporting evidence._

No, it's not his "opinion", it is his argument. And he provided argumentation why this might be the case.

It surely is not verified or fact, but it's not merely some subjective opinion.

<comment><USER2>
        > And he provided argumentation why this might be the case.

You are either a troll - and a bad one - or a troll. Posting a random link to _something_ isn't "evidence". Not to mention that he didn't _say anything_ , he just wrote "words". Impressive you are impressed.

        > No, it's not his "opinion", it is his argument. And he provided argumentation
        > why this might be the case.

So if I argue it's no longer subjective? I think you have the wrong idea about subjective/objective.

As somebody else (jstanley) responded to a comment in another thread ([https://news.ycombinator.com/item?id=12364193](https://news.ycombinator.com/item?id=12364193)):

        > ...for the argument to have any weight you need to show that it is true, not simply state it.

<comment><USER17> > _Posting a random link to something isn 't "evidence". Not to mention that > he didn't say anything, he just wrote "words". Impressive you are > impressed._

I didn't say that parent gave evidence. I say he gave an argument -- you know, premises and logical steps that can be followed (or refuted) to determine if something is true or not.

> _So if I argue it 's no longer subjective?_

No, if someone puts forward an argument, it's by definition not subjective. An argument is something that can be evaluated.

Maybe you conflate arguments with opinions?

Of course an argument might be based on a subjective selection of premises, but that's beside the point. One can always refute the argument by pointing to issues in either its logic or its premises.</comment></comment></comment></comment></comment></comment></comment>


Program Synthesis in 2017-18 - <AUTHOR> https://alexpolozov.com/blog/program-synthesis-2018/ <comment><USER2> The big problem I see with program synthesis is that specifications will need to be exceedingly complex in order to cover all cases ([http://www.commitstrip.com/en/2016/08/25/a-very- comprehensiv...](http://www.commitstrip.com/en/2016/08/25/a-very- comprehensive-and-precise-spec)). Even then, you're not going to be able to predict exactly how these black box programs will behave.

<comment><USER3> It seems like any sufficiently detailed specification is pretty much already code or is trivial to translate into code. A language for providing those specifications to a synthesizer would likely balloon into a full-blown programming language, defeating the entire point of this approach. At that level of complexity, a synthesizer just becomes an especially aggressive compiler.

That said, maybe there's a need for something like that. A programmer could write an exceedingly thorough set of unit tests and let the synthesizer worry about how to satisfy those tests. Writing tests is almost universally simpler and easier than writing implementations. I can see the potential productivity enhancing value of that, especially in situations where I have to work in an unfamiliar framework. Like I might not know how to write an Electron app, but I could certainly write the unit tests to specify the front end behavior I want. A synthesizer could save me from having to learn all the nitty gritty framework specific techniques. Basically TDD without having to do the actual implementation. And eventually if the application required performance enhancements, a developer with the correct expertise could tune my synthesized code.

Because, right now, developing specifications is by far the hardest part of coding. But implementation is still not trivial in most cases. For certain use cases, it might be helpful to free up developer time to focus on specifications and QA instead of feature crunching.

<comment><USER4> Sythesising an entire application is not going to happen even if you managed to lock down its behaviour with unit tests because the time it takes to search for a program of size n is exponential.

What could work is synthesis as a more intelligent form of code completion for small snippets.

<comment><USER5> The same exponential search space problem applies to chess, and we still managed to achieve high quality results by using heuristic algorithms and ML/statistics to augment the tree search.

</comment></comment></comment></comment><comment><USER6> A great chance ahead is to solve the "I know it when I see it" kind of problems, with Programming-by-Example practice.

Say sorting. You don't need to learn any computer science to tell a list of number is sorted or not.

Problem with the specs. Yes it's irritating to give spec that covers all the cases. But it's a universal problem in software engineering "How do I know the code works"? which applies to programs written by either human or computers.

As far as I know the solution is to write a lot of test cases. By doing that you just created a lot of examples to train a program synthesizer. It doesn't really matter the codes that pass all your tests are written by the engineer you hired or the synthesizer.

</comment><comment><USER7> I think this looks like a very interesting approach to programming, like programming a good programmer. Kind of like meta-programming but one step more meta</comment>


Hubble telescope camera is broken and US government shutdown could delay repairs - <AUTHOR> https://www.nature.com/articles/d41586-019-00094-0 <comment><USER2> "In a nutshell, the government shutdown should not impact our response to the anomaly with WFC3," she said. "The primary people we need in the Flight and Science Operations will be available to troubleshoot. A tiger team has already been activated."

Source: [https://gizmodo.com/hubble-space-telescope-faces-more- hardwa...](https://gizmodo.com/hubble-space-telescope-faces-more-hardware- trouble-1831636773)

<comment><USER3> I was honestly wondering how/why a government shutdown would effect NASA in any broad measure. It doesn't look like, from skimming the article, Nature even interviewed a single person. It's all just conjecture. Sloppy journalism is one of the biggest reasons the press is not trusted more broadly.

<comment><USER4> Just as anecdata, my neighbor, working at NASA (Moffett) seems to be on furlough.

<comment><USER5> Yes, almost all folks at Moffett (NASA Ames Research Center) are US government employees, just as at NASA Goddard. They will be on furlough unless their job is essential.

STScI/APL in Baltimore, like JPL in Pasadena, are technically contractors. As described nearby, they are still at work like normal due to the float in money already sent (to Hopkins/APL or Caltech, respectively) but not yet dispersed.

Of course, those folks are looking on anxiously as this fiasco plays out, designing telescopes, probes, and rovers like usual, but with uneasy coffee room conversations.

</comment></comment></comment></comment><comment><USER6> Aliens have been waiting for this chance since years

<comment><USER7> I knew the aliens were colluding with Trump!

<comment><USER8> All of this distraction with building a wall, when we should have been building a roof.

</comment></comment></comment><comment><USER9> So what's the problem with that? it's not like by delaying the repairs a few months that something worse will happen. Eventually when the government resumes, the telescope will be repaired. The only issue is that we may miss a few months of pictures (not saying that the Hubble is useless, just that by not working for a few months, nothing bad will happen)

</comment><comment><USER10> As a by-side casual observer, if the military continue to get funded while civilian departments continue furlough for months if not years, would that creates some weird social dynamics?

<comment><USER11> All these workers (except potentially contractors) get backpay. Yeah, it sucks if they have no savings, but people I know in the fed are treating it like a vacation.

<comment><USER12> I'm pretty sure the ones forced to work without pay don't feel like it's a vacation. No way are air traffic controllers feeling the "beach vibe" and considering that about a third of TSA workers are calling in sick they seem to agree. It's also pretty hard to have savings when your pay is shit, and hard to plan for insane political whims with indefinite expiration dates.

<comment><USER11> they get 'unpaid overtime compensation,' which can amount to double pay. The ones furloughed are the ones that can take a vacation, obviously.

<comment><USER13> The problem isn't them eventually getting paid, the problem is them lacking money in their pockets right now to pay the bills they need to pay right now.

<comment><USER14> There's plenty of orgs offering government workers interest free loans.

[https://www.bizjournals.com/sanantonio/news/2018/12/27/usaa-...](https://www.bizjournals.com/sanantonio/news/2018/12/27/usaa- provides-loans-for-members-amid-government.html)

<comment><USER15> Not all workers are going to be covered by interest free loans, and naturally there are going to be a lot of people scared by the prospect of not getting paid.

It's still a huge hassle for families to go through and have to deal with. That's assuming that you manage to get said loan without any other possible predatory circumstances attached.

<comment><USER14> Another interest free loan for government employees.

[https://hebrewfreeloandc.org/](https://hebrewfreeloandc.org/)

I believe federal employees still get a paycheck for missed time. Just they won't get it till government opens back up.

<comment><USER12> You keep missing that a lot of people can't afford to live without being payed for an indefinite and undetermined interval. It's a grossly unfair position to force people to work without pay because the government is run by the least among us. That's not to say they don't, some of them, have recourse. The issue is that they shouldn't have to take out loans or beg from charities, or face exposure to scams and predatory lenders who hide among the legitimate outlets.

It's time to emerge from the bubble and recognize that how you live is not how everyone lives, and maybe even develop a bit of empathy and compassion.

<comment><USER14> "The problem isn't them eventually getting paid, the problem is them lacking money in their pockets right now to pay the bills they need to pay right now."

That's the comment I was replying to. If they need money to pay their bills they can get a 0% loan for their missed paychecks.

There's obviously reasons to be pissed about the shutdown.

<comment><USER12> You're seemingly confused about a few points, such as the difference between applying for a loan and receiving one, and the limits even when you manage to get one. Having said that if you'd like to defer your pay for an indefinite period and try to support yourself throug such loans, I'd read the blog.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER16> These shouldn't really be connected in a perfect society.

</comment><comment><USER17> What "repair" option is there with STS gone?

</comment><comment><USER18> Did they buy Device Protection via Square Trade?

</comment><comment><USER19> Think of the children! I know thousands of people our out of work or working un-paid, but this is horrendous. Getting the government back online to prioritize Hubble repairs should be #1 priority!</comment>


Ask HN: Do people read the commenter's name before reading the comments? - <AUTHOR> Do people actually read the name of the commenter before proceeding to the comments? I never usually check the commenter's name unless someone mentions something about the commenter in the comment it self. Because of that, I know very few commenters on by their handle name, few like, pg, pc, tender_love and few more like patio11, surely not more than 10. Is that just me or how most everyone else here? Sorry, if this question sound silly, this question has occurred to me few times now, and unfortunately I dont have anyone around me who is a regular on hn to clarify :). <comment><USER2> Honestly not really. At least not until I've read the comment and wonder who wrote it.

With exception for green names because they stand out

<comment><AUTHOR> Again, I have noticed the green names, but never understood the significance until I saw this comment and decided to look up. Green names are when the account is less than 2 weeks old! Now I know ;)</comment></comment>


A Theory of Everything (Sort of) - <AUTHOR> http://www.nytimes.com/2011/08/14/opinion/sunday/Friedman-a-theory-of-everyting-sort-of.html?ref=opinion We are increasingly taking easy credit, routine work and government jobs and entitlements away from the middle class — at a time when it takes more skill to get and hold a decent job, at a time when citizens have more access to media to organize, protest and challenge authority and at a time when this same merger of globalization and I.T. is creating huge wages for people with global skills (or for those who learn to game the system and get access to money, monopolies or government contracts by being close to those in power) — thus widening income gaps and fueling resentments even more. <comment><USER2> > _While these social protests — and their flash-mob, criminal mutations like > those in London — are not caused by new technologies per se, they are fueled > by them._

Untrue according to the conclusions in this study: <http://www.cepr.org/pubs/new-dps/dplist.asp?dpno=8513.asp>

There's no correlation between social media penetration and social unrest. It would happen anyway but through traditional channels.

<comment><USER3> You know, I'll be the first to admit that Friedman doesn't hesitate to ignore any solid evidence and a look instead for the closest funny/shiny/trendy anecdote, story or buzzword. Gosh, even Malcolm Gladwell does better "research" than Friedman!

But presenting as counter-evidence a publication behind a pay wall is not much better, either.

Can you provide us more details than a simple hyper-link to an abstract that doesn't relate to your point?

<comment><USER4> Here is the document:

<http://www.scribd.com/doc/62248736/DP8513>

I'm not sure if it's free to read or not since I may be behind a university proxy. I think it is though, it's more or less a draft.

</comment></comment></comment><comment><USER5> <http://www.nypress.com/article-11419-flathead.html> is my general reaction to Friedman.

<comment><USER6> Yes, that's my general reaction to Friedman too. This article is a bit better than his usual thin gruel though, it mostly points out the obvious but does time things neatly together. It's worth a quick read if you're trying to procrastinate which is apparently my main goal this evening.

</comment></comment><comment><USER7> And who ends up on top? Us computer scientists.</comment>


Show HN: Express-like web server in a single file for node / good for learning - <AUTHOR> https://github.com/dataformsjs/dataformsjs/blob/master/server/app.js <comment><AUTHOR> In case you see this and are wondering why?

Basically Unit Tested and Demos pages needed a Web Server and originally I was using PHP. But of course I didn't want to publish a npm/js project that needs PHP.

I could have simply used express but at the time was developing the project on multiple computers so having a zero dependency express-like web server allowed the project to remain small and very quick to copy.</comment>


Photos of the TSA are allowed - even if they try to arrest you. - <AUTHOR> http://boardingarea.com/blogs/flyingwithfish/2010/11/17/so%E2%80%A6i-got-detained-by-the-tsa-at-the-airport-today/

<comment><AUTHOR> <http://www.tsa.gov/contact/index.shtm>

_TSA Public Affairs (571) 227-2829 (Office of Strategic Communications)_

 _Members of the traveling public who believe that they have been unlawfully discriminated against by a TSA employee may contact the External Compliance Division in the Office of Civil Rights to have their concerns addressed, by sending an E-mail to TSA.OCR -email@example.com or by calling the Office of Civil Rights._

 _The Office of Civil Rights can be reached toll free at 1-877-EEO-4-TSA (1-877-336-4872) or (800) 877-8339 (TTY), or by E-mail at TSA- firstname.lastname@example.com_

 _contact the Ombudsman, phone 1-571-227-2383 or 1-877-266-2837 toll-free._</comment>


Amazon set to launch online music store - <AUTHOR> http://business.timesonline.co.uk/tol/business/industry_sectors/media/article1690305.ece <comment><USER2> You got late on this one PG, I posted about Amazontunes a while back <http://news.ycombinator.com/comments?id=16448>

<comment><USER3> Truly a new era of information when a while back is 2 hours ago.</comment></comment>


How Web Scraping Is Revealing Lobbying and Corruption in Peru - <AUTHOR> https://blog.scrapinghub.com/2016/03/09/how-web-scraping-is-revealing-lobbying-and-corruption-in-peru/ <comment><USER2> I am the author of the post, very happy to answer any question.</comment>