Pointers in Python - <AUTHOR> https://realpython.com/pointers-in-python <comment><USER2> Related reading (perhaps worth reading as a precursor to this), from Ned Batchelder:

• Facts and myths about Python names and values [https://nedbatchelder.com/text/names.html](https://nedbatchelder.com/text/names.html)

and its presentation version:

• Python Names and Values [https://nedbatchelder.com/text/names1.html](https://nedbatchelder.com/text/names1.html)

</comment><comment><USER3> Article is mostly fine, but the author does some effort to mention CPython- specific things, but not consistently, making it a bit of a confusing read for when you've worked with different Python implementations at the implementation level (C in my case). E.g. _Each object contains at least three pieces of data: Reference count_ well, in CPython yes but not in implementations which use mark and sweep GC.

<comment><USER4> Somewhat unrelated to the article, but I'm curious - how commonly and for what purposes are other implementations used for?

<comment><USER3> MicroPython [0] for instance gets mainly used on microcontrollers. Hard to tell how common it is, but it definitely gained some traction, also runs on the micro:bit [1] which gets used for teaching. Which isn't surprising: Python is easier for beginners than C. i don't know about other implementations though.

[0] [https://github.com/micropython/micropython/](https://github.com/micropython/micropython/) [1] [https://www.microbit.org/](https://www.microbit.org/)

</comment></comment></comment><comment><USER5> I think restype should be set to None in addition to setting argtypes. That way you can avoid the weird number being printed out:

        >>> add_one(ctypes.byref(x))
        998793640

</comment><comment><USER6> I don't think there's a reason why support for pointers can't be added as a package, perhaps one that integrates with ctypes. It could function like PEEK and POKE in the old BASIC interpreters. However, accessing storage as a base plus offset, if desired, could be implemented with numpy arrays.

</comment><comment><USER7> Aren't all variables in Python already somewhat like a pointer? They're a reference to an object, not a memory address containing a value.

<comment><USER8> Yes, but pointers are more basic, since Python's internal references participate in garbage collection.

If you would use pointers exclusively, then you'd have to write your own garbage collector. Also, accessing data would be more difficult, and you could not use Python's data types such as classes.

</comment></comment><comment><USER9> Perhaps this is a novice question, but what is an instance where one would need to use pointers in python? I am having trouble thinking of an instance where I would need to do this.

<comment><USER5> If you want to call a C function that takes a pointer as an argument. For example I've called a Windows API function from python which does that.

<comment><USER10> Sure, but you only _need_ to because the C function requires you to. I think the person was saying that while coding pure Python, there isn't really anything you would gain by having pointers.

<comment><USER5> Yeah, for pure python it's not really needed. Python doesn't need a swap function because it has multiple assignment, python doesn't need output parameters because it has multiple return. Pointers would allow a function to take in a string and replace it with a modified version, but simply returning the modified version would generally be clearer and more flexible.

One place where pointers might be useful is if you have some strings spread across a bunch of different objects of different types and you want to do some transformation on all of them. A pointer to each of those strings would mean you could simply modify them instead of having to assign to the containing object. But you can sort of define your own pointer type with a class with one field to solve that problem. The downside of that would be all the objects would have to contain that pointer type instead of the string directly. Another alternative would be getattr/setattr (although that wouldn't work for locals). Or maybe you could rewrite to a visitor pattern.

Overall the slight benefit a pointer would provide is outweighed by the complexity it would bring of people wondering how and when to use it.

<comment><USER11> _> A pointer to each of those strings would mean you could simply modify them_

You can just use a bytearray if you want a mutable string.

</comment></comment></comment></comment></comment><comment><USER12> > Fact: Values live until nothing references them.

So if I write

        circular_linked_list = { "next": None }
        circular_linked_list["next"] = { "next": circular_linked_list }
        circular_linked_list = None

My linked list won't get cleaned up? I think the author should be more careful with his wording.

</comment><comment><USER13> IINM the reference implementation has a cache for small integers. I wonder what happens if you try the ctypes example in the article with one of the cached integers.

<comment><USER13> Nothing happens with the cache. According to the article you can't use a Python int, instead you have to use a ctypes.c_int and those are not cached.

</comment></comment><comment><USER14> ah yes! this is where i read about string interning. I totally had forgotten the source. Thanks!</comment>


How to Massively Increase Your Productivity and Happiness in 2 Hours Per Day - <AUTHOR> Go to sleep 2 hours earlier than you normally do!
It's easy to fall into the sleep deprivation trap and think you're getting more out of yourself, even when you're really not. I've always found the need to sleep at all very frustrating, so this lesson is hard-learned for me.
I'm still in love with my 36 hour hackathons, but now most days I'm trying to get enough sleep to feel energetic all day without in assistance from drugs like caffeine and nicotine.

<comment><USER2> Even during Viaweb I still slept 8 hours a night (roughly 3-11). The most productive people rarely have more than 6 hours or so of really concentrated work per day, except in emergencies. If you can ensure you get that every day, you don't need to economize on sleep.

My way of getting those 6 solid hours was a common hacker solution to the problem: I used the hours between 9 pm and 3 am, when no one could interrupt me.

<comment><USER3> Why is it that people are most productive (at hacking) during night time hours? Even with no interruptions during the day, I find myself not as engaged as I would be during the night.

Also, I've read that taking short naps for about 20 minutes (any longer would make you groggy) helps improve learning potential and confidence.

<comment><USER4> I tend to be most productive in the morning - usually around 9:00 AM - 1:00 PM. Then I typically have another productive period before dinner (it'd be 5:00 - 7:00 PM if I didn't have to commute from work), and then one before I get to bed (11:00 PM - 1:00 AM or so, 'cept if I don't have obligations like getting up the next morning it runs till like 3:00 AM, which pushes the next day further by 2 hours). So I guess it varies among people.

It occurs to me that with 6 hours of productive hacking, you could _in theory_ start a startup and still have a day job, _except_ for the interruptions. For example, all three of my most productive periods are bisected by an hour-long commute or the need to go to bed, making them effectively useless. Has anyone tried telecommuting + startup, or consulting + startup? It seems like if I could shift my working hours to 2:00 - 10:00 PM and get rid of commuting time, I'd be able to get all the work for my day job done in the 5:00-7:00 PM timeslot, and have 6 hours of useful time for my own projects.

<comment><USER3> Wow, you can finish all your work for your day job in 2 hours? Impressive.

<comment><USER4> Most day jobs don't have much real work. ;-)

Actually, I should probably clarify - when doing active product development, it takes way more than 2 hrs/day of work. At that point, you can basically forget about doing any outside programming projects. But most jobs are very feast-or-famine: once you've written the program, you have little bug reports dribble in, or your boss asks you to reboot the server or something. If you architected the program well, it shouldn't take more than 2 hrs/day to keep up with those.

</comment></comment></comment></comment></comment><comment><USER5> I thought you were going to say: "Put news.ycombinator.com in your firewall's blacklist" ;)

But I agree with your going-to-bed-early idea.

And I'll add: spend the first 30 to 45 minutes after you get up doing some kind of cardio exercise (running, treadmill, cycling).

You'll be much more relaxed and have a ton of energy all morning.

</comment><comment><USER6> As the saying goes, sleep over your problems and you'll have a solution in the morning.

<comment><USER7> I always worry about what ideas I may be missing out on, though.

<comment><USER8> You know your ideas are worthless without the right execution right?

Plus if it's not meant to be for you to have a great idea, it won't come anyway.

</comment></comment></comment><comment><USER9> Force yourself to sleep and it is most likely not going to happen. What I found helpful is to ACCEPT that you cannot sleep, but you can RELAX. Get your MIND OFF RUBY and think about that HOT WAITRESS you have been dying to ask out on a date. Imagine being on a date with her and start SMILING, I promess you will go to sleep within 15-30 minutes.

</comment><comment><USER10> Couldn't agree more. I've done all-nighters, but when I'm refreshed I get more done in a couple of hours than I do in a whole day when I'm tired.

Unfortunately I sometimes get bouts of insomnia... anyone have good tips on how to cure that?

<comment><USER11> Try some melatonin. You can buy it at any drug store with the vitamins. It comes in 1mg or 3mg size, most doctors only recommend the 1mg size but there's nothing wrong with the 3mg size if you don't make a habit of it.

Even if you do make a habit of it, some anecdotal evidence shows it is good for you.

It also has a side effect of giving you extremely vivid or even lucid dreams.

<comment><USER12> They don't recommend the 3mg size because it offers no benefit over the 1mg, and it could possibly be bad for you. There's no point. If you get the 3mg size, get a pill cutter and cut them in half.

Making a habit out of it sounds like a bad idea, because there hasn't been much research done into its long term safety.

<comment><USER11> If the 1mg doesn't cure your insomnia, then the larger dose might work. It's also more likely to induce dreams. Wikipedia mentions a study of individuals given 50mg of Melatonin that experienced measurably enhanced REM sleep time.

<comment><USER13> News reports a few years ago said that studies had shown that 3mg worked less well than none at all.

</comment></comment></comment></comment></comment><comment><USER14> The longer the brain goes without sleep, the more sleep debt is incurred. So staying awake for long periods at a time is unproductive from a time perspective. I'd advocate the opposite: take naps.

</comment><comment><USER15> I agree with you. I read in National Geography Magazine that sleep is like managing an account. Sleep will catch up to you and you end up wasting more time by sleeping at odd hours to make up for the sleep debt created by not sleeping enough.

Recently, I read this article that says humans just need 2hrs of sleep, sounds interesting, here's the link to it [http://www.time.com/time/magazine/article/0,9171,774680,00.h...](http://www.time.com/time/magazine/article/0,9171,774680,00.html)

</comment><comment><USER16> I fully agree, I've found that everything pretty much comes back to sleep, whether it's managing stress, work, or just plain getting sick. If there's any other athletes here, one of the key things you know is that you don't get stronger during the workout, you get stronger when you're recovering.

Can't say I've ever pulled an all-nighter hackathon, though. My productivity drops off the cliff after 16+ hours of working.

<comment><USER17> It definitely works that way with some people. OTOH, I can sometimes (not always) be very productive well into a 30+ hour session. I've found it's most useful to turn off the alarm clock, though, and sleep as long as you need to.

</comment></comment><comment><USER18> I see late night hacking as a tale of diminishing returns. For an extra hour of wake, how much less productive will I be tomorrow? How much earlier could I get up if I go to sleep earlier, and how does that time's productivity compare to now?

This translates to: if I'm tired I go to sleep. Unless I have a deadline for the next day.

<comment><USER18> Luckily I seem good on <7 hours of sleep. Exercise helps.

</comment></comment><comment><USER19> 22nd hour in progress...6 pots coffee, two packs of cigarettes, some java monster --> productivity peaked 5 hours back but shitty part is that I have to go for a 8 hour workday in 5 hours! and it has nothing to do with the hackathon..

Miles to go.......

</comment><comment><USER20> Anyone else ever go to sleep while thinking about the problem you were hacking on, and end up having horrible dreams while you (ineptly) try to solve it in your sleep? I get really bad sleep that way and wake up stressed out.

<comment><USER21> I've had similar experiences to nostrademons. I often crack hard problems in the groggy netherworld just as I'm going to sleep or just as I'm waking up (or during an afternoon nap). Showers and long walks are also good for this purpose.

I mainly dream about software these days, but I had similar experiences in college and grad school with physics. Freshman year I figured out the orbit in an inverse quartic potential during a nap (warning: you pass through the--- bang!---center of force), and in grad school I unlocked the last remaining problem in my Ph.D. thesis during a one-hour random walk around campus.

Incidentally, all this contributes to my conclusion that I'm not well-suited to a normal job. Even if I could get an employer to accept intellectually that they should pay me to take naps and go for long walks, I don't think they could ever really come to terms with it emotionally. Whereas the cofounder of my last startup probably never even noticed I occasionally napped and that I spent half my time walking around town; if he did, he certainly didn't care.

</comment></comment><comment><USER22> Has anyone run a successful company on a polyphasic sleep schedule?

<comment><USER4> Steve Pavlina, maybe? Though his company may only be successful to the extent that people believe they will become successful by sleeping polyphasically...

<comment><USER22> He ran his business on a normal schedule; he stopped the polyphasic experiment after a few months.

Buckminster Fuller might count ( [http://www.time.com/time/magazine/article/0,9171,774680,00.h...](http://www.time.com/time/magazine/article/0,9171,774680,00.html) ), but his friends made him give it up.

</comment></comment></comment><comment><USER23> We're so quick to deprive ourselves of sleep, but that is the one thing we need the most -- more than food, I think. Without sleep, you become depressed, your mind slows, your vocabulary shrinks. You lose IQ points.

I'm the father of a toddler. Needless to say, the last couple of years, I haven't slept well. Finally I gave up and started going to bed a couple of hours early. Amazing, the difference.</comment>


Android nears 50 percent global market share - <AUTHOR> http://www.techperiod.com/2011/08/android-nears-50-percent-global-market.html

<comment><USER2> I still think iPhone will continue to reign supreme... very interesting what will happen over the next 5 years.

<comment><USER3> Mobile development has been going on a fairly straight course for a while now. Curves are coming. I'm not sure it's possible to make projections that far out at this point since it will depend heavily on how well various groups adapt.</comment></comment>


Developing a website from the ground up - <AUTHOR>

I am in the process of redesigning a small store website.  The current version of the site offers users the ability to see a weekly flyer and read some details pertaining events at the store.  As part of the redesign I would like to move away from the current cms (Joomla) and rebuild the entire site using a different infrastructure.  I am proficient in Java and hence have been looking at GWT as the primary choice in creating a dynamic site.  Do you have any other suggestions regarding frameworks and/or CMS systems? <comment><USER2> Use a client side RIA framework like jQuery or Dojo. Abandon anything Struts, tiles, JSP, or JSF related. Implement all of your services with JAX-RS and call those services from your UI with XHR request from the client app. Put all of your none dynamic HTML into a CMS that can export static files to a webserver. You do not want yet another run-time dependency (Alfresco can do this). Separating the concerns makes for a far more agile process and allows you to use a greater variety and configuration of tools and technologies.</comment>


The Joys of Building React Native Apps with Expo - <AUTHOR> https://levelup.gitconnected.com/react-native-with-expo-is-a-joyride-671d706b7a19 <comment><USER2> Expo is an incredible resource for building apps in React Native.

<comment><AUTHOR> I just started using it and love it. Not needing XCode/Android Studio, and being able to load in-development apps on a real device by taking a photo of a QR code with the Expo app is awesome.</comment></comment>


New Study Shows That Hydroxychloroquine Saves Lives - <AUTHOR> https://www.prnewswire.com/news-releases/new-study-shows-that-hydroxychloroquine-saves-lives-states-association-of-american-physicians--surgeons-aaps-301089425.html <comment><USER2> How about the study instead of the press release: [https://www.ijidonline.com/article/S1201-9712(20)30534-8/ful...](https://www.ijidonline.com/article/S1201-9712\(20\)30534-8/fulltext)

I have to admit, the HCQ research has me all confused. First it works, then it doesn't work, then it works with zinc and/or azithromycin? Which is it? Are there any obvious flaws with this study, other than it not being a randomized, double blind, controlled study?

</comment><comment><USER3> I suspect that some of the negativity and unwillingness to give more credit to the possibility that HCQ works stems from Trump having jumped the gun in typical Trump fashion, and applauded it so early in the process of investigation. A strong general media disfavor of anything Trump-favored could easily spread from there and, since many scientists are also sensitive to reputation, they too clammed up for a while, until it really did start to seem that it helps in some cases.

Here where I live, an acquaintance of mine is a doctor in one of the region's biggest public hospitals dedicated to COVID cases, and he and his colleagues all use HCQ regularly for their hospitalized patients along with a few other drugs that include ivermectin and azithromycin. He insists that they do seem to provide therapeutic help, in his clinical experience, and more anecdotally, this same doctor has treated two very elderly (90 years+) people I know who got COVID and both recovered after a fairly moderate level of illness.</comment>


What Happens After Prisoners Learn to Code? - <AUTHOR> https://www.theatlantic.com/technology/archive/2019/12/from-prison-to-silicon-valley/603406/ <comment><USER3> I spent 19 years of my life incarcerated. My life of crime started when my family moved to East Los Angeles and I decided to become a gang member at the age of 15. My last stint in prison was fourteen years straight; having been sentenced to 21 years but was granted parole on my first parole hearing. During my prison time, I enrolled in educational activities and got my GED, an Associate of Arts degree with honors, and later a degree in Computer Information Systems. Needless to say, that it took me time to adjust to a completely different type of life on the outside than the one I had been accustomed to. More than once I had the experience of being rejected, and of job offers being withdrawn, because of my criminal history. For the last 20 years, I have been working as a software developer and make a good living thanks to the career I chose while in prison. I hope more companies have the courage to take a chance on others such as myself that have paid their debt to society and are trying to live a normal life. Kudos to Slack and all the companies that believe in giving people a second chance.

<comment><USER4> Thanks for sharing your story. It really makes me angry to hear about the countless obstacles the formerly incarcerated face when it comes to reintegrating into society. As you put it, the debt to society has been paid. Someone who makes a mistake when they're young and stupid -- I know I made my share -- shouldn't be prevented from ever being able to have a good, normal life.

<comment><USER5> It is unfortunate that, although sentenced with finite punishments, ex-cons continue to be punished (i.e. judged, discriminated against) well after their sentence is over.

That said, I can also understand why companies avoid ex-cons. Companies make decisions based on statistics. A company will, ceterus paribus, always choose the candidate who has no criminal history because that candidate is less likely to commit a crime and hurt the company.

<comment><USER6> Allow companies to pay felons less for the same job, at least for some finite period of time, to compensate for that risk. Otherwise, as you say, it makes sense for them to hire people without a criminal record, other things being equal.

<comment><USER3> The truth of the matter is that us felons do work for less – at least I did – mostly because we have no choice. We are also less likely to be promoted. Three times I had job offers withdrawn because of my criminal past. Having much more to lose than someone without a criminal record I never considered doing anything illegal, or anything that would cast a shadow of doubt to my integrity. "Once a criminal always a criminal" is just not true. Unfortunately, too many people subscribe to the false cliché.

</comment></comment></comment></comment></comment><comment><USER7> I have been teaching a Python course at my local jail M-F for over a year now, and something we have struggled with is finding potential internships or general employment for our students when they are released. We typically recommend our students to enter the local community college system, but we also have some students that are utterly brilliant and could succeed without a formal education.

Does anyone have any insight for how we should approach companies on their behalf? Is it more beneficial to teach web development (it seems like this is an easier way to break into the industry)?

I am also interested in hearing any opinions on how we should approach teaching in the setting where there is no internet access and the typical mathematics level is algebra.

<comment><USER8> Contributing to significant open source projects has been a path to success for many people I know.

<comment><USER9> I've never been incarcerated, but the open source path worked for me. But on the other hand, my family is well off enough that I could afford a year writing code for free. I'd imagine that most people getting out of prison need to earn a living right away.

<comment><USER10> Ok, so a company which facilitates open source contributions by prisoners, possibly giving them greater leverage in their parole hearings as well as post-incarceration career prospects? Does that sound like something worth doing to anyone here?

</comment></comment></comment></comment><comment><USER11> Programming generally provides people with a lot of power. Either in access to data or obviously code. In that, there is a lot of trust requested and given. I know lots of enterprises add a lot of "scans" and "checks" and limit things to much complaints to remove the "we trust you" from the equation, but still you can't scan for everything.

The open question is how much trust do you want to give? Of course, 2nd, 3rd, 4th chances are awesome and all - but in reality; as a company with lots to lose. 1\. reputationally 2\. financially

<comment><USER12> I feel like if any one person can seriously subvert something, you've already lost. Maybe that's just my perspective from working at international enormous tech corp X, but we've already basically got that problem in the form of employees hailing from repressive states (yeah, Australia, that's you now too) where everything needs cross-signing anyway.

All in all, I'd probably be more concerned about foreign nationals open to various forms of coercion than I would felons - in the general case, anyway. Of course, there are certain environments where more assurance is needed and not employing from either category is reasonable, and the type of criminal background also matters. For instance, someone from a bad neighborhood who got swept up in gang activity like the guy in the article is probably a lot less likely to try to fuck you over than a serious convicted blackhat/fraudster.

It's also possible to, as in the article, explicitly limit their roles to those that don't touch customer data or sensitive product code, where it'd be significantly more sufficient to parlay access into a quick payout. One ironic thing is that's frequently the exact opposite of how it works in practice: think of all the crooked telco CS reps who've been doing SIM swaps recently. Those roles aren't exactly exclusive positions, and I'd argue they're a good example of why paying people crap combined with poor vetting and lots of access is a bad idea.

<comment><USER13> I agree. Proper controls are half the battle. Naturally, those tend to be ignored when things get difficult..

<comment><USER14> Based on my sample of well over a hundred companies proper controls are _very_ rare.

</comment></comment></comment></comment><comment><USER15> A company in the UK that also has an ex-offender (edit: apparently prisoners still serving their sentences are given an opportunity to learn the trade) hiring/apprenticeship program is Timpson, a locksmiths

[https://www.theguardian.com/business/2019/apr/06/the- support...](https://www.theguardian.com/business/2019/apr/06/the-support- never-stops-says-prisoner-who-works-at-timpsons)

</comment><comment><USER16> > * Drew McGahey, the engineering manager at Slack for all three apprentices, > was initially struck by their ability to solve what he called "blank-canvas > problems"—those that don't have prescribed solutions. "Thinking back to > their experience, it makes a lot of sense," he said. "They all learned how > to code in an environment where they didn't have access to the internet. > They've got drive."*

Anyone familiar with contemporary interviews have insight/examples on what "blank-canvas" problems are?

<comment><USER17> Open-ended design/architecture problems.

For backend, a classic one is how do you design a basic twitter clone that can handle a tweet by a popular person going to their millions of followers.

</comment></comment><comment><USER18> I understand that some organizations have pretty strict requirements, some government mandated, regarding a criminal background. But most do not. And it gets on my nerves that the tech industry, one who has many heroes that were themselves close to or outright criminals, has been so slow getting on this train. I think that's sort of a symptom of the broification of the industry and I'm not proud of it.

</comment><comment><USER19> Good for Slack, and good for the new coders.

My 30 years in the industry gives me a gut hunch anyone can be a successful coder. I hope these folks prove it.

</comment><comment><USER20> > We need to applaud companies like Slack, but know that the nitty-gritty of > human services—housing, health care, social support—which lots of nonprofits > and public institutions are working on, the private sector has largely > turned away from."

I mean, yeah? Those things sound like they're precisely the kind of stuff that's the domain of non-profits and the government. Why would we expect Slack or other tech companies to be helping random people with housing or social support?

The private sector does help here, indirectly, with taxes that go to support such programs. And it's the government that sets the tax rate and decides where revenue goes, not the private sector.

You can blame the government, or the people who voted them in, but blaming Slack and co. is silly. It's not their job, and it shouldn't be: you don't want the institutions with profit motive to be the ones handling charitable works. That's part of the whole reason we have a government.

<comment><USER21> Government is to govern. Government in most countries is driven by democratic mandates. Democratic mandates are set by influencers. The US' key influencers are largely regressive and dishonest - and convince people to either not vote - or to vote against their personal best interests[1].

The US government does not currently have a democratic mandate to operate as the social welfare state. Consequently hundreds of thousands - if not millions - of people are immorally (by my own standards) disadvantaged and with no means or _realistic_ opportunity to better themselves.

So if a private company (or shareholders-forbid: a publicly traded company)'s leadership feels a moral obligation to help those left behind by the state - more power to them.

Until the US truly embraces the "for the people" part of the "by the people, of the people, for the people" part of their unofficial motto it really is up to private entities to make-up the difference.

[1] UPDATE: To clarify - I don't mean that I somehow know what's in someone else's best interests - because I don't - nor their exact reasons for voting for a particular party or candidate - but I mean that it's still possible to _objectively_ say that many people vote for ideological or sentimental reasons that appeal to them (which is part of democracy!) with - or without - <USER2> done (for example) a spreadsheet comparisons of how each candidate's manifesto politics would affect their cost of living, quality of living, economic expectations, and so on. I can respect someone voting against their interests for ideological or moral reasons - provided it's done with informed consent. I'm not convinced that most- or even a plurality - of GOP voters in recent US elections sat down and made a spreadsheet and said "yup - I'm okay with rising the cost of my individual health insurance provided it means I have the choice to refuse healthcare coverage" (and that is not a misrepresentation of the ACA and its opponents' stated positions).

So by all means - vote against your own interests - provided you do it with informed consent - otherwise you _really_ are voting against your own interests.

<comment><USER22> > convince people to either not vote - or to vote against their personal best > interests.

I've seen this on HN several times, and it always cracks me up. The condescension isn't dripping. It's running in torrents.

You think the reason they won't vote the way you want is because they don't know what's good for themselves. You might want to consider an alternate: they don't want someone like you deciding what's good for them and forcing it down their throats.

<comment><USER23> The American political left would gain immensely and lose exactly nothing by being less condescending. The first line of argument they should abandon is telling people they are voting against their own interests. It's remarkably insulting, and arrogantly presupposes you know know better what another person's interests are.

<comment><USER24> I'm not sure that a better solution is possible in America's current political climate. As I see it there are basically three approaches that a progressive could take in a policy debate:

\- Persuasion: I think that you are mistaken as to what is in your best interest, here's why my approach would benefit you more.

\- Negotiation: Here's how we can work together to find a solution that meets both of our interests.

\- Zero Sum: I recognize that this isn't in your best interest but I don't care because its in my interest.

Due to the power of Fox News and the Republican party's current willingness to ignore facts, I don't think persuasion is possible.

Similarly, the strategy that Fox News and the Republican party have taken of promoting polarization, demonizing the other side, using straw-man arguments, etc.[1] Makes it impossible to have the kind of nuanced debate and compromise that would be necessary for a negotiated solution.

Therefore, it seems like all that is left is a zero sum solution. If the other side won't listen or negotiate then the only option remaining is to implement our policies whether they like them or not.

I'm not saying that's an ideal situation, but it seems to me that its the reality that we find ourselves in.

[1] To be fair, I think that progressives do this to a worrying extent as well. However, I single out the Republican party due to the degree to which they have focused on this strategy and because the fact that many Republicans get all of their news from Fox makes the strategy almost unassailable.

<comment><USER23> You don't need to convince republicans, you need to convince moderates who can be persuaded to vote one way or the other in a given election. In the context of a general election, we're talking about thousands of people in a handful of states. I'm struggling with how the idea of "condescension isn't persuasive" is finding so much friction here.

<comment><USER24> The issue that I see is that due to the electoral college and gerrymandering, it can be difficult to win even if you can convince moderates.

The other issue is that many of the issues that progressives are concerned about (e.g. climate change, inequality, gun control) require action by society as a whole. Ideally we would negotiate and find policies that address the priorities of both progressives and conservatives. However, that doesn't currently seem to be possible.

<comment><USER25> > The issue that I see is that due to the electoral college

Please read the federalist papers.

<comment><USER24> Care to elaborate?

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER26> How would, " _What happens after prisoners become accountants / lawyers / bankers..._" sound? To me, it says that trust in our profession is interchangeable with that of trained felons.

I'd rather not have technically proficient felons near passwords, credit card #s, and other personal information.

Edit:

I hate to sound like a Calvinist here, but you have to ask yourself how much a change in behavior is due to "rehabilitation", and how much of it is purely situational.

From what I've seen, they're model employees, until the setback--be it divorce, drugs, financial hardship, stress, etc. Then there is the backslide.

And you don't have to take my word for it. Recidivism rates are very very high.

<comment><USER27> The specific felony matters a lot to me. Someone busted with a gram of marijuana or a bong in Arizona can pick up a felony conviction for it. Someone with a previous embezzlement charge is a different story (even if the embezzlement conviction was only a misdemeanor).

<comment><USER26> I'd also disregard a pot bust.

This Aguirre guy in the article was at least an accessory to a shooting--even though they charged him with much more than that... not the kind of person I want near confidential information.

<comment><USER27> I did _different /lesser_ dumb stuff when I was 17. If my friends were into "street life" instead of cars, computer games, and D&D, I can see a scenario where I'd be along for the ride in one of their/our exploits.

Peer pressure and "going along without thinking through the consequences" in a group of your friends at that age is a real thing and I don't think is strongly predictive of adult trustworthiness. (I generally tend towards the "law and order" side of things.)

</comment></comment></comment></comment><comment><USER28> I love how inmates get a better education and more support from tech companies than the adults who live in the bay area. The bay area has the worst income inequality of anywhere in any developed country. Bootcamps are a scam and cost tens of thousands of dollars and yet inmates, people convicted of severe crimes, are treated to free education. From a business standpoint this makes more sense because inmates have no bargaining power and can flood the coding labor pool, thus lowering wages for businesses. How is a boot camp graduate supposed to compete with modern-day slaves?

By the way the W.K. Kellogg Foundation is a eugenics group. What are they doing here? This program is so fishy.

<comment><USER29> I'm a bit unclear on your perspective here. Are you saying teaching inmates is wrong because they've apparently lost their chance at success in life because of their "severe crimes"?

Regardless of that perspective, here's a truth: most inmates will be released at some point. As a matter of fact, alot of the inequality you reference is a result of those with criminal backgrounds and the socioeconomic conditions that got them those backgrounds. We have a rich set of statistics about what happens to people in that situation: desperation -> crime -> prison -> repeat. Personally I don't like that world. I want to feel safe in my world, and anything we can do to short-circuit that recidivism cycle makes us all safer.

The "but our jobs! but our pay!" refrain is a common one, but our industry has WAY too many job openings for this to be a legit worry (the very presence of the h1b visa proves this). As for salary, as those jobs get filled, whether by bootcamp grads, or journeymen, or trained individuals with a criminal record - it will push income down for some. Some incomes are a product of scarcity, and you only need to look at a supply/demand curve to know what will happen to prices. In the late 90s, you'd spend tens of thousands of dollars to get a basic website. Now you can get one for a few hundred.

<comment><USER28> The entire point of prison is to remove them from society. Why are we spending more resources on prisoners than people who've never commited a crime?

<comment><USER30> > The entire point of prison is to remove them from society.

That is the immediate effect, for sure. But that isn't the issue.

Unless someone is convicted for life without parole, or a death penalty, then they likely will be released into the general population at some point.

Do you want them to have skills that might allow them to support themselves, or do you think a near term investment in education might be cheaper for society and more humane than releasing them with a situation where they have fewer opportunities to make a living?

</comment></comment></comment></comment><comment><USER31> > Issues that absolutely nobody thinks much of outside of the country that > imprisons more people per capita than Xinjiang

<comment><USER32> Would you please stop posting flamebait here? We've already had to ask you this.

[https://news.ycombinator.com/newsguidelines.html](https://news.ycombinator.com/newsguidelines.html)

</comment></comment><comment><USER33> I'm all for the positivity but really??

> Access to an elite organization

In what way is Slack elite?

These writers need to tone done their hyperbole.

<comment><USER34> In what way is Slack not elite? Slack is within the top 10% of companies in the Bay Area by pretty much any metric you choose to rank companies by. By almost any measure, that's elite.

Is Berkeley not an elite school, because it's less prestigious than Stanford?

<comment><USER35> > Slack is within the top 10% of companies in the Bay Area by pretty much any > metric you choose to rank companies by.

What about profitability?

</comment></comment></comment><comment><USER36> I mean at the end of the day this is just a way to get cheap labor.

<comment><USER37> > cheap labor

I'm an ex-con developer. To be fair, my dev roots go back to childhood. I make around a quarter million a year in a mid-range cost of living city in the mid- west US.

<comment><USER38> What industry do you work in?

<comment><USER37> Digital signage</comment></comment></comment></comment>


Caching D compiler – preview version - <AUTHOR> https://email@example.com <comment><USER2> Dmitry Olshansky has written an experimental extension to the D compiler to cache the results of CTFE (compile time function evaluation) between compiles. CTFE started out as just a more capable constant folder, but has evolved into a way to run arbitrarily complex programs at compile time. It's used to generate regex machines and grammar parsers, for example. These can slow down compilation significantly, so the idea with the cache is to remember previous results to avoid recomputation.

</comment><comment><USER3> I've genuinely enjoyed switching to D for hobby game projects. There's some new problems that I haven't quite figured out (like GC allocations ONLY occur at specific points, however, ANY GC could still blow up ANY object which means if you're not careful, you've added an entire dimension to problem solving over that of a C++ project when a finalizer gets called and does something it shouldn't.)

On the otherhand, ranges, native strings, an insanely straight-forward and powerful template engine, compile-time evaluation, native contract programming and unit testing, modules (read: what's a header guard?), make C++ feel like clanging rocks together to make fire compared to D. Actual direct support for multi-dimensional arrays without insane levels of nested template boilerplate code is worth the price of admission alone.

I could honestly go on for paragraphs listing just the features I use on a regular basis that don't exist in C++. C++ is basically "D, a decade behind." Because half the greatest features they're adding to C++ have already been in D for at least a decade.

C++ _finally_ added numeric separators (that Motorola C had ... in the 90's? Or earlier?) 1 million is 1_000_000, not 1000000. Surely, there's no chance of user error in the second version! (Be honest, how many times did your eyes check to see if the second number actually added to a million or had a typo?)

And I say this as someone who programmed C++ for decades until I found D. _It's by no means perfect_, but it's sure of a lot more enjoyable to program in.

<comment><USER4> This is one good description of what D feels like. Something that C++ is slowly adopting from except that it can't get rid of the old cruft.

D at the moment is a the most flexible and powerful tool to build something from scratch. If you care about performance ;)

It's not a ready as a "platform" though, you are still expected to build quite a few things that are usually taken for granted on your own.

</comment></comment><comment><USER5> How does this compare to something like ccache?

<comment><USER6> I'm not too familiar with ccache, but I assume it caches files? This compiler caches expressions, so you can change parts of a file without affecting the cache</comment></comment>


Twitter is broken - <AUTHOR>

...for me, at any rate,
When trying to sign in, I get: https://twitter.com/help_sessions/create
and that page, right now, tells me that:
That page doesn't exist! <comment><USER2> I'm having the same problem. I was signed in and everything was hunky-dory but then I signed out just to test your example... bad idea. Now I'm stuck out!

This happened to me the other day, and I was all confused because normally when a site is down I can Twitter about it but with Twitter down there was nowhere to go. It was only down for a moment though, so problem averted. Still, not sure HN is the right forum for up-to-the-minute chit-chat about what sites are broken...

</comment><comment><AUTHOR> Twitter is available again for me, so yeah, for me it was only down for a few minutes.

As for whether HN is the appropriate forum to "tattle tale" when a well known website is down? Hmmm... Dunno about this one, I just figured it would be newsworthy, sorry if I wasted anybody's time...

<comment><USER2> Not at all. I mean, here I am talking about the same thing.

</comment></comment><comment><USER3> <http://istwitterdown.com/></comment>


Apple Earnings Fall on iPhone Slump - <AUTHOR> http://www.wsj.com/articles/apple-earnings-fall-on-iphone-slump-1469565018 <comment><USER2> This sounds like a lot of the typical WSJ "sky is falling" stuff again.</comment>


The WeWork Manifesto: First, Office Space. Next, the World - <AUTHOR> https://www.nytimes.com/2018/02/17/business/the-wework-manifesto-first-office-space-next-the-world.html <comment><USER3> There's a lot of people, both here on HN and in our industry who roll their eyes when issues of diversity and inclusivity come up, but companies and spaces like WeWork are the result of not having those conversations.

I spent ample time in these places during my "startups are amazing!" phase, it ultimately was disheartening. The people are kind, and they make some gestures towards D&I, but those are limited, and the end result are places like WeWork. The end result is a bland, upper class niceness. The beer is craft, the sandwiches are tasty, the countertops are marble and the bulbs are always Edison. But the ideas they generate, they're just... normal. They're not really strange or weird or delightful.

Furthermore, it's hard to escape the notion that places like this consume more resources than they create. What's the cost of hundreds of well groomed people with impeccable design? I'm not sure, but I'd suspect their carbon footprint is through the roof. But the real cost is that our society has to bend to support them, and that society has fundamental inequities.

I wouldn't expect any meaningful revolution to come out of a WeWork, not because they're not smart people, but because they're people for whom this society works well already, so there's no need for a revolution. What ideas do come out of these spaces? We've seen them already, they're ideas titled towards optimizing your life, because of course, your life is already about as well oiled as you can get. Fine for a small subset of people, but hardly world conquering.

<comment><USER4> i think this is a very insightful comment. i'm one of those people that spend a lot of time discussing and arguing about diversity and inclusion (here and irl) and what i wish people understood intimately what you allude to here

>but because they're people for whom this society works well already, so there's no need for a revolution.

it's very hard to convince someone for whom a system is working that there's potentially something immoral about perpetuating that system. the feeling is that since they're not proximally personally culpable that it's not a moral failing to participate but this is true

>But the real cost is that our society has to bend to support them

capital and resources allocated for wework is capital and resources that could have been allocated else where if our cultural priorities were different and therefore it's to the detriment of "abnormal" peoples that wework exists and persists.

i know i'm basically recapitulating everything you've said but (clearly) i think it merits emphasis.

this prompts the question: how do you do it? i think i'd be interested to know how you became sympathetic or partial if you're not from a marginalized community yourself (and we can take that offline) but this is hopeful as well

>But the ideas they generate, they're just... normal. They're not really strange or weird or delightful.

normative practices by definition normalize status quo. if in 50 years you still want to be wearing plaid, drinking craft beer, and listening to lcd soundsystem then go ahead and continue to exult in wework et al but otherwise you should try to include people that look very much different from you.

<comment><USER5> >otherwise you should try to include people that look very much different from you.

I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin, but by the content of their character. - <USER2>

Perhaps you should rethink your life choices when you're making offices "diverse", read exotic, for rich people to enjoy themselves in.

<comment><USER4> First of all "look" is colloquial for holistically be: "what does a democracy look like - it looks much different from DPRK". Second i have news for you: to first approximation on a global scale the easiest way to find someone that thinks differently from you is to find someone that looks different from you. Now sure if I bias my sample (picking people that look different from me but live in the bay area) then that's worthless and I need to investigate second order effects. Third i think there's something perverse about taking that line and trying to twist it to substantiate an argument for why we /shouldn't/ hire more black people (for example)

<comment><USER5> The idea that there are black people in the first place is a racist one. There is humanity, there are individuals and there are classes, anything else are fever dreams of centuries past.

To try and fix original sin by making it into original virtue ends up in a new apartheid.

There are no black people, there are no white people. Anyone who calls themselves a leftist should be pushing this line as hard as possible.

<comment><USER4> i am as left as they come and what you're missing is

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

<comment><USER5> If race matters always why aren't we talking about the Saxons and the Normans of England. Two races which were segregated by law, with each village of Saxons having group guilt if any Norman was killed on their land.

Race is a construct of the capitalists to divide the working class. That the American 'left' is the most enthusiastic promoter of race today just show what a wonderful return on investment the bourgeoisie got from privatizing the universities and then funding the research in social sciences that benefits them most: cultural, sexual and racial theory/criticism.

Or as Marx put it:

All industrial and commercial centres in England now have a working class divided into two hostile camps, English proletarians and Irish proletarians. _The ordinary English worker hates the Irish worker as a competitor who forces down the standard of life._ In relation to the Irish worker, he feels himself to be a member of the ruling nation and, therefore, makes himself a tool of his aristocrats and capitalists against Ireland, thus strengthening their domination over himself.

He harbours religious, social and national prejudices against him. His attitude towards him is roughly that of the poor whites to the niggers in the former slave states of the American Union.

 _The Irishman pays him back with interest in his own money. He sees in the English worker both the accomplice and the stupid tool of English rule in Ireland._

 _This antagonism is kept artificially alive and intensified by the press, the pulpit, the comic papers, in short by all the means at the disposal of the ruling class. This antagonism is the secret of the English working class's impotence, despite its organisation. It is the secret of the maintenance of power by the capitalist class. And the latter is fully aware of this._

[https://archive.org/stream/MarxEngelsCollectedWorksVolume10M...](https://archive.org/stream/MarxEngelsCollectedWorksVolume10MKarlMarx/Marx%20%26%20Engels%20Collected%20Works%20Volume%2043_%20L%20-%20Karl%20Marx_djvu.txt)

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> More and more I agree with the sentiment of "Let's change the world" being pure BS.

Why grow infinitely until you fail when you could just get really, really good at a few things for a long time (Oh that's right. VCs and their desire for unsatiable "growth").

I'd much rather work for a company that focuses on one or two core competencies than one that tries to everything ok.

<comment><USER7> It's the Shareholder Directive that you want destroyed. Executives in this country have no choice but to maximize value for shareholders. We need to destroy that rule and its surrounding culture if you want to get rid of insatiable growth

<comment><USER8> Stopping optimization, evolution, growth?

Go outside and yell out, "Hey world, I'm good! You can stop evolving now, thanks!"

<comment><USER9> Growth for the sake of growth is how cancer kills you.

</comment></comment></comment></comment><comment><USER10> " But WeWork takes extra steps to encourage fraternization. Like beer kegs that never run dry.

More than most companies, WeWork promotes the consumption of alcohol as an inherent virtue. Posters on the wall encourage people to have a drink. There are wine tastings at WeLive. Company parties feature top-shelf liquor. Mr. Neumann has a well-known penchant for tequila, and a well-stocked bar is prominent in his office.

On a recent Tuesday at 4:07 p.m., the community manager of a WeWork in Midtown Manhattan sent an email reading: "It's time to get your creative juices flowing! Join us on the 5th floor to drink some wine & paint a beautiful picture." Just after noon on Valentine's Day, there was an invitation to share wine and cake in the common area.

Though alcohol is a social lubricant for some, it can be off-putting to many others. Many women have shared stories of feeling uncomfortable with what they described as a frat house culture at some WeWorks, prompting some to leave."

So office space AirBnB for a bunch of frat boys. No thanks.

<comment><USER11> Alcohol = frat boys. Ok.

Back in reality it's a very, very common social lubricant, and is a pretty good... Add-on(?) to we-work that attracts people. Alcohol isn't expensive if brought through a distributor, but most people attach a high 'bar' price to it, so see it as an expensive freebie when really it's not.

Just because some people don't drink means we-work is bad? Also not sure if 'wine tasting' screams 'frat boy'....

<comment><USER10> I've worked in one of these trendy tech companies with a bar. They attract exactly the same kind of employee. Generally a complete bellend twat probably privately schooled and educated on his parent's money with grand delusions about his place in society. If you want to get smashed, there's plenty of pubs near by. No need to enforce your social code on me. I'm here to code.

<comment><USER11> Same, except our bar is made of plywood and is tacky as hell. It attracts our employees. I'm also here to code but some free drinks while I socialize with my colleagues isn't bad, especially given central London drink prices.

</comment></comment></comment></comment><comment><USER9> Yawn. Present: delusions of grandeur, Near-future: toxic culture. Far-future: unethical or even illegal corporate behavior.

</comment><comment><USER12> What on earth is the view of WeWork's core competencies (whatever those may be, other than taking advantage of cheap money) that would lead one to believe they should be running for-profit elementary schools?

<comment><USER13> They are in the right space at the right time, they have the right image, and they are probably backed up by a hefty amount of good luck (and investment money) to boot. There are a million and one co-working spaces, I've spent a huge proportion of my professional life at one co-working space or another, in some form or another, certainly ever since they became a "thing", and my rule of thumb that has come out of all of this is that the fancier and more salubrious (and expensive) one is, the less likely one is to produce authentic or meaningful work (obviously according to my own personal definition of meaningful and assuming that authenticity is important to the worker).

<comment><USER12> _They are in the right space at the right time_

See this, what does this mean? Elementary education seems the furthest thing from their space. Why not start hotels or restaurants or hospitals or grocery stores? Those have about as much overlap with WeWork (uses physical space) as elementary education does.

The _only_ thing that seems to make sense is that parents at WeWork can more easily drop their kids there? But it seems like daycare would be 10x more useful, since it's already expensive and hard to find in big cities, whereas elementary school is universal and free. Granted, some people are going to want to pay for private school but that's a minority of parents, whereas basically all parents of infants and toddlers are paying for childcare one way or another.

I don't get it.

<comment><USER13> > They are in the right space at the right time

I should have made myself clearer by explaining what "space" I was referring to. I wasn't referring to any sort of educational space, I was strictly referring to the abundance of co-working spaces these days, especially "cool" ones. WeWork is the archetype of the cool (and expensive) co-working space.

The area I live in has an abundance of these types of workspaces. It's almost comical. One of the newest (it hasn't completed construction yet) is advertising a creche. I thank my lucky stars that I'm in a privileged enough position that I (currently) earn enough that my partner can stay home and be the primary carer of our daughter whilst I go and work in my studio/workshop in an unfashionable (but surely up-and-coming) part of our city.

</comment></comment></comment></comment><comment><USER14> This will not end well: "He believes there's an energy behind the brand, and he's gotten people to invest at that valuation. He has not tried to explain it in traditional financial terms."

<comment><USER15> Seems like another case of "a fool is born every minute"

</comment></comment><comment><USER16> _"We all understand how complicated and regulated school is compared to the simpler business that we are already in," Mr. Neumann said. "But we decided we're going to go into education. If you really want to change the world, change kids when they're 2."_

Am I the only one who found this a bit weird?

</comment><comment><USER17> So what is the attraction of something like we-work? I've never been in one myself. Obviously investors see a lot more into it than the 1000s of other startups, so it is succeeding despite the haterade.

Is it something like Uber & Amazon? A huge revenue growth trajectory despite being already huge with an ever shrinking loss trajectory?</comment>


Are entrepreneurs hypomanic? - <AUTHOR> http://infoproc.blogspot.com/2009/07/optimism.html

<comment><USER2> Hypomania is pretty much a temporary phase in bipolar/schizoaffective disorders. There isn't really such a thing as being in a perpetual state of hypomania. The debilitating effects of the other aspects of these illnesses (psychosis, mood swings into depression, etc) are likely to greatly outweigh the short-lived advantages of being in a mild state of hypomania.

In the real world, this means the visionary plans and energy levels experienced during hypomania are most likely to be washed away in a tide of depression, or lead to the sufferer doing something irrational like joining a pyramid marketing scheme. There will be exceptions, particularly in creative fields or environments where the sufferer is able to coast or be supported through the negative cycles. Ever work with one of those people who slacks off and fails to meet their schedule most of the time, but occasionally delivers something incredible out of nowhere in the space of a few days?

So, are entrepreneurs hypomanic? The real lesson of this article is to beware of how easy it is to confuse DSM-style bullet point symptom lists with medical diagnoses.

</comment><comment><USER3> To be "normal", you are by definition average, and to achieve anything, you need to be "above average" in some way. If you're "above average", then you must by definition be "abnormal". Considering anything "abnormal" is a disease in psychiatry, then anyone that achieves anything must have some type of psychiatric disease. :)

<comment><USER4> Wellll, not to nitpick, entrepreneurs aren't necessarily achievers.

<comment><USER3> And not to nitpick as well, but I never said that entrepreneurs necessarily were. :)

</comment></comment></comment><comment><USER5> "* He is witty and gregarious.

* His confidence can make him charismatic and persuasive.

* He is also prone to making enemies and feels he is persecuted by those who do not accept his vision and mission."

hm, this reads like the next line should be "he is the most interesting man in the world"...

<comment><USER6> The feelings of specialness combined with frequent impulsive decisions with often bad consequences and the easy enemy making and feelings of persecution... those remind me of sociopathy.

</comment></comment><comment><USER7> A sample size of ONLY 10 CEOS (not all entrepreneurs are CEOs and 30 is a respectable sample size), no control group to see if just about anyone will answer "yeah, that about describes me" to the same questions, no control questions to see if the entrepreneurs will answer "yes, that's me" to stuff that is not hypomanic. What kind of conclusions can you draw from such a study?

</comment><comment><USER8> Quite a few of these remind me of myself at work except, "He acts out sexually." Where do I sign up for that one?</comment>


Behold, Barcelona? Beware, Barcelona. - <AUTHOR> http://www.robbedinbarcelona.com/2011/10/27/behold-barcelona-beware-barcelona/

<comment><USER2> > _Rafa claimed to have lost around 20 thousand US dollars in cash and > valuables that was in a bag_

What the fuck? I don't want to blame the victim here, but really, what the fuck?

<comment><AUTHOR> This doesn't seem to be all that uncommon here; I've read several similar stories--a couple of months ago I read that a woman had been robbed of a bag containing about 40 grand and it was returned to her before she even knew it was missing. It seems to be common for people to bring large sums of cash on cruises to gamble in the casinos. Or they've won it there.

</comment></comment><comment><AUTHOR> If you were an Internet start-up trying to solve Barcelona's rampant thievery epidemic, what kind of start-up would you be?</comment>


Oracle refuses to talk about Free Java campaign - <AUTHOR> http://www.computerworlduk.com/news/it-business/3240584/oracle-refuses-to-talk-about-free-java-campaign/?olo=rss

<comment><USER2> I think the campaign is pointless. If you want to 'free Java', fork it. Then Oracle can choose to get on board or not.

They paid a lot of money to get Java under their wing and they aren't going to just give it away afterwards. Yes, they were for this in the past, but the obviously realized it wasn't going to happen (possibly because it won't work) and chose to buy it instead to further their goals.

<comment><USER3> Problem is, they still have the right patents and the right attitude to kill forks, and as other pointed out it is debatable if the patents grant applies to derivates of OpenJDK.

What the world needs to do is to start from scratch, with a new VM, new specs, a new base class library, plus a compiler that converts Java bytecode to this new VM ... something like .NET / Android, but more cross-platform and less tied to Java's standard library.

<comment><USER4> I strongly agree. There's a real opportunity here to create a truly open VM, one that is designed from the beginning to support functional languages. It would need a major corporate sponsor though, because building a new platform requires a very substantial investment. Microsoft... you listening?

<comment><USER5> Why not Parrot?

<http://en.wikipedia.org/wiki/Parrot_virtual_machine>

<comment><USER3> IMHO it tries to do too much, and doesn't have enough resources.

A platform that resembles Java / .NET would also make porting of existing libraries easier.

</comment></comment></comment></comment></comment><comment><USER6> I think the already glacial pace of Java evolution would not exactly improve if it were handled by an independent entity.

</comment><comment><USER7> If you want a really free Java, Apache's Harmony is a great starting place. The very liberal license means you can use it for basically whatever you want, proprietary or open.

<comment><USER3> The patents pledge doesn't extend to Harmony since AFAIK it hasn't passed the TCK yet, and even if it did, supersets/subsets aren't allowed.

<comment><USER8> Oracle suing the Apache Foundation? That is even worse press than their suing Google.

<comment><USER3> They don't have to sue Apache, they just have to sue their users ... i.e. Android is using Harmony's class libraries, with Google being one of Harmony's customers.

So it is already happening.

<comment><USER7> Most of the suit seems to be about the virtual machine, rather than the class libraries, but to be honest, the whole thing is as clear as mud.

</comment></comment></comment></comment></comment><comment><USER9> They are taking action to improve Java. There will be a Java release in 2011 and one in 2012. Half the people will disagree with the decision, of course.</comment>


Watch Out Yammer And Jive, Google Is About To Enter The Social Enterprise Space - <AUTHOR> http://techcrunch.com/2011/12/24/watch-out-yammer-and-jive-google-is-about-to-enter-the-social-enterprise-space/

<comment><USER2> The biggest benefit I've seen out of Yammer is in the fact that it increased employee interaction, not just document sharing. After my company rolled it out, I was shocked at how many of us took to it. Everyone knows the reason: it looks and feels like Facebook. When we encounter that look and feel, our minds go into "sharing" mode. We get comfortable because it feels like a comfort zone. We share documents, but we also joke around more. Our interpersonal relationships got better, and I'm sure that had a positive impact on our work.

I don't think Google+ will have an equivalent effect because few people visit it habitually, and when they do, most posts are fairly formal/professional instead of playful/casual. Despite Google+'s intentions, it doesn't encourage a relaxed mindset.

<comment><USER3> >I don't think Google+ will have an equivalent effect because few people visit it habitually, and when they do, most posts are fairly formal/professional instead of playful/casual.

The internal Google+ is probably 2/3 playful and social stuff, and 1/3 serious stuff.</comment></comment>


Relay Modern: Simpler, faster, more extensible - <AUTHOR> https://code.facebook.com/posts/1362748677097871/relay-modern-simpler-faster-more-extensible/ <comment><USER3> Struck by this para:

"The native app teams discovered that using GraphQL came with the additional overhead of building queries by concatenating a bunch of strings and then uploading those queries over slow connections. These queries could sometimes grow into the tens of thousands of lines of GraphQL. Also, every mobile device running the same app was sending largely the same queries.

The teams realized that if the GraphQL queries instead were statically known — that is, they were not altered by runtime conditions — then they could be constructed once during development time and saved on the Facebook servers, and replaced in the mobile app with a tiny identifier. With this approach, the app sends the identifier along with some GraphQL variables, and the Facebook server knows which query to run. No more overhead, massively reduced network traffic, and much faster mobile apps."

Firstly, what query could be 10k lines? Secondly, if you're defining the query just by an id, how is that then any different to a fixed REST endpoint or stored procedure?

<comment><USER4> A 10k line query is pretty easy for me to imagine. In GraphQL, every property you want on every object is a line, since you query by property, not by object. In an interface with a whole bunch of widgets, I can imagine it really adding up.

It _is_ pretty much like a stored procedure. But I don't think that's inherently a bad thing at all. The procedures are effectively version controlled right within your application code, and I'm guessing they're persisted at deploy-time.

<comment><USER3> But I thought the headline feature of GraphQL was that the client could choose the shape of the response, hence all those properties. Even then, ten thousand properties seems a huge amount, even for a rich single page app.

If you end up putting that on the server anyway, you're back to fixed responses, no better than a REST API.

<comment><USER4> I guess you mean like a RESTish "super-endpoint", that aggregates a whole bunch of data? Because operationally, it would be really different than making a thousand idiomatically REST queries over a hypermedia API.

If so, there's still a huge difference. In the REST super-endpoint world, you have to modify your API service to suit the desires of individual clients. In GraphQL, the client controls the shape of the query. The detail that the client is sending that query at deploy-time, instead of request-time, doesn't change that.

This also recognizes that queries tend to be parametric, but not fully dynamic. That's kind of built-in to Relay, since the fragments are statically attached to React components.

It's more akin to HTTP caching, to me.

</comment></comment></comment></comment><comment><USER5> Exciting to see! I've been waiting on this since we decided to use Relay for our application about 6 months ago. Relay is amazing but quite an investment (especially mutations).

I'm a bit worried, however, that Relay Modern has focused a bit too much on the internal needs of a massive application like Facebook at the expense of fleshing out some of the rough spots of working with Relay.

Simpler, more explicit mutations is a wonderful improvement, as is more granular control over the cache, but there's no mention of subscriptions or client-side state control (using Redux on top of Relay is... doable, but not as elegant as one might hope for).

That all said, this is an impressive release and congratulations to the team. We're committed to Relay and hope this release grows the community.

<comment><USER5> Follow-up (didn't see the updated docs). Looks like there is some support for client-side state through "Client Schema Extensions" — excited to play with this.

I do also hope that this iteration brings with it better docs — that's the one area where I've looked over at Apollo longingly. On many occasions I've discovered unknown patterns in stack overflow answers that aren't documented anywhere (credit where it's due: the answers are often by members of the Relay team).

And one final tangent: the day when Facebook gives up on flow and adopts Typescript will be a glorious, glorious day.

More here: [https://facebook.github.io/relay/docs/new-in-relay- modern.ht...](https://facebook.github.io/relay/docs/new-in-relay-modern.html)

<comment><USER6> > the day when Facebook gives up on flow and adopts Typescript will be a > glorious, glorious day.

I foresee FB to skip TypeScript and go straight with ReasonML[0], as 25%[1] of the messenger code base supposedly is already converted to Reason.

And I think that is even more glorious development then FB going with TypeScript. :)

[0]: An easier to approach (for programmers coming from mainstream languages; like JS/C++/Java/C#) syntax on top of the OCaml language, and some new tooling. The tools integrate specifically well with BuckleScript (by JaneStreet) which provides the OCaml compiler with a JAvaScript compile target.

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

[https://facebook.github.io/reason](https://facebook.github.io/reason)

[https://github.com/vramana/awesome- reasonml](https://github.com/vramana/awesome-reasonml) (some links to example code in the last section)

<comment><USER7> Last time I looked at reason it was totally new and there was no tooling etc. I got little support from the gitter or whatever it was.

Have things changed? It really interested me at the time.

<comment><USER8> It was a bit tough to get tooling set up and it doesn't work on Windows, but on Mac (and Linux I assume) it's amazing. Better Intellisense support in VSCode than Typescript!

It is very new though, and I haven't got a complete grip of JS FFI with Reason.

<comment><USER9> Hey a quick question — which Flow extension are you using? There's the official one called "Flow Language Support" and another one called vscode- flow-ide.

UPD: sorry, I just realized you were talking about Reason, never mind.

</comment></comment></comment></comment></comment></comment><comment><USER10> Congrats! Relay is what really sold our iOS-only native team to move to React Native. Very excited to migrate to modern version at some point in the future.

( [http://artsy.github.io/blog/2017/02/05/Retrospective- Swift-a...](http://artsy.github.io/blog/2017/02/05/Retrospective-Swift-at- Artsy/#Better.Abstractions..Better.Developer.Experience) )

<comment><USER11> is emission the only react-native app artsy has built/open sourced?

<comment><USER10> Yes, it's the only React native we have apart from trivial demo apps to prove a concept (which stay on a user's repo rather than the artsy org )

</comment></comment></comment><comment><USER12> Is there any great libraries to implement the backend for GraphQL? I think the benefits of using GraphQL on the frontend are pretty obvious, however last time I checked I had trouble of finding good documentation or implementation on how to serve GraphQL requests from the backend point of view.

<comment><USER13> Great question! There are great libraries like Create-GraphQL ([https://github.com/lucasbento/create- graphql](https://github.com/lucasbento/create-graphql)) that can help you scaffold an app on the server side pretty quickly, and it's fairly un- opinionated. That one in particular works with Mongo, but I believe they're rolling out support for other data sources as well soon.

In addition, if you're looking for a hi-fidelity way of building apps without having to worry about the server-side, Scaphold.io ([https://scaphold.io](https://scaphold.io)) is a GraphQL backend as a service that can help. I work full-time here, and we help you get from zero to GraphQL in a matter of minutes.

And with this you have two options:

1) If you want to use the service, by all means :)

2) We're built to the open standard / Relay spec, meaning that if you want to create an app to learn about how the API is structured, that can help as well. Here's more of a primer on how our API is built and works anywhere ([https://docs.scaphold.io/coredata/schema/](https://docs.scaphold.io/coredata/schema/)).

Feel free to reach out if you have any questions on our Slack ([http://slack.scaphold.io](http://slack.scaphold.io))!

</comment></comment><comment><USER14> It seems many people loved GraphQL, a powerful and elegant concept, but then had a rude awakening with Relay as an overly complex, unwieldy, buzz kill.

Node, edge, and viewer are terrible mistakes w.r.t. naming and usability. I'm sure it's very intuitive for FB devs to think in these terms, but the words are specific to a problem domain and just don't translate as well to the general case as other choices might have.

<comment><USER15> That was one of the reasons I ran as fast as possible to Apollo after trying to understand Relay for a bit (that and more or less no tutorials for Relay). The other one was that Relay seems to be one of these "my way or the highway" frameworks, while I prefer libraries which follow my needs and don't force me to do all things the way they want.

</comment></comment><comment><USER16> Hey, Jan here together with Lee from the Relay team. Happy to answer your questions.

<comment><USER17> 1\. Could you two do a Reactiflux Q&A?

2\. Are people on the Relay OSS team willing to answer StackOverflow-type questions on a certain time?

\- I would want to be able to programmatically run relay-compiler. Every time I update my client-side code, webpack detects the change and then runs relay- compiler.

\- And get help figure out some errors related to mutations I'm encountering. I wouldn't want to post these type of things as a GitHub issue because it could technically not be a bug.

<comment><USER18> Hi, I'm Lee from the GraphQL/Relay team

1\. Reactiflux Q&A is a great idea, perhaps someone who organizes that can help set that up.

2\. We're a pretty small team and our primary focus is building great software for Facebook and the larger community, so unfortunately our ability to focus on answering questions is relatively limited. Many people on the team occasionally hop into StackOverflow to answer questions, but we definitely can't make any guarantees about answering them all or answering them in a certain amount of time.

You can run relay-compiler as part of your webpack config as a pre-compile step. Also, if you want to run relay-compiler while you're iterating on your code, pass --watch and it will rerun whenever a file is saved.

<comment><USER13> Hi Lee, Vince here from Scaphold.io.

I can help put you in touch with the guys who run the channel and manage the Q&As. We're actually doing one ourselves on April 27.

I'll reach out on the GraphQL Slack channel.

</comment></comment></comment></comment><comment><USER19> Seriously, your own homegrown garbage collection inside the js runtime? I looked at React the first time it came out and aside from the insanity of using xml mixed with javascript or some kind of pseudo js, it was waaaay too complex. I dont know but it seems crazy to me to write applications like that, it makes xaml look decently simple.

<comment><USER20> I still firmly believe riot.js ([http://riotjs.com/](http://riotjs.com/)) is the best "react-like" tool even though it's almost entirely unknown (sadly) and its website/PR/general presentation is a bit janky.

It's essentially a very very tiny, minimally opinionated structural layer that lets you build html components (called "tags") using almost entirely vanilla JS. It inverts the JSX paradigm: where JSX is "html in the middle of your code", in riot the markup is primary and the code is a supplement to it (expressions in the markup via templates/mustaches, additional tag-specific script added outside of the markup if desired, tag-specific scoped css) so there's no JSX insanity.

It's like a much leaner react/vue, and frankly I love it. It's entirely minimal and you can bring in any library you want to use along with it (e.g. jquery for ajax, redux if you want...). It has virtually no cognitive load (just looking at a sample "tag" file for 2 minutes gives you ~80% of what you need to know), you just pick it up and work with it and just occasionally peek at the docs if needed.

I'm a huge fan of the "minimally opinionated" approach. The fewer idiosyncrasies and custom abstractions in tools, the more productive you are (I'm looking at you, angular!).

<comment><USER21> Several points of agreement here, and now I'll have to check out Riot (which I remember seeing around here a while ago).

But I think that

> html in the middle of your code

is selling JSX a bit short. Tooling and coupling aside (and I agree those are strikes against it), JSX creates a pair of _mutually-recursive_ , formally- defined languages, which you can switch between freely and frictionlessly. I've never seen this before, not even in lisp, where quoting/unquoting is bad enough at a single level.

This—the ability to compose _languages_ —is extremely powerful in general. Even if you don't like JSX _per se_ , I'd bet there is some set of languages that you'd like to be able to use this way. I'd look at the "controversy" around JSX (and Babel and the React dependency) in this light, as a learning experience.

For example, JSX is really just a variation on EX4, which has been around for much longer. A number of "external" factors have put JSX over the edge (of mass adoption), and these mostly have to do with React's popularity. By the time I capitulated and decided to try React, I found that I already had tooling support for JSX, _even though_ I was pegged to Babel 5.8 for reasons.

I think this is the principle behind OMeta: we should be able to iterate on _language_ features as freely as we do on _application_ features. We ship applications, why shouldn't we ship the languages, too? (Of course OMeta came out of VPRI, and Alan Kay's view is that we could just ship the whole dang system!) Anyway, from that perspective, JSX is no more "insanity" than some of the things we do to work around the rigidity of languages-as-silos.

<comment><USER20> Thanks for the insightful response. I think you make a compelling case, and it's something I'll be thinking about (I've gone back and forth regarding what to think about JSX).

In the specific use case of React and Riot, I feel like it's more natural to have markup be the main structure and code to complement it, rather than the other way around, but I don't feel _that_ strongly about it and I find React's approach is still not too bad (imho of course).

I tend to get a bit of an "overly academic" or "cargo cultish" sort of vibe from designs I consider overwrought, and I had a little bit of that sentiment about React back when I worked it, but really it was not a very strong feeling and I'm convinced React is pretty great.

The one that really gives me that vibe is Angular. No offense to anyone who likes/uses Angular, but I view it as a criminal case of abstraction run amok.

</comment></comment></comment></comment><comment><USER22> What are the differences between Apollo and Relay Modern at this point?

Why/when should you choose one over the other?

<comment><USER23> Hi, I'm from the Apollo Client team.

We're going to write some more content in the coming days or weeks about the differences, but here are some of my main thoughts based on following along during Relay Modern development:

1\. Relay uses a build process to generate code for queries. That allows some better performance optimizations and static typing out of the box. However, it prevents you from doing anything which requires arbitrary knowledge of the queries at runtime. It also means that if, for some reason, you can't use the build tooling, you can't use Relay. That's actually the original reason we started working on Apollo instead of using Relay ourselves. Apollo works with regular GraphQL ASTs at runtime, so you can use and write tools to work with those queries in any way you like. While it's not something all apps need, we've found some situations where this is desirable, especially for developers building companion libraries.

2\. Relay doesn't have as many facilities for updating the store and working with mutation results. Apollo Client has a unique way to use GraphQL fragments and queries to read and write to/from the store, the most recent of which is described here: [https://dev-blog.apollodata.com/apollo-clients-new- imperativ...](https://dev-blog.apollodata.com/apollo-clients-new-imperative- store-api-6cb69318a1e3)

3\. The Apollo Store is a plain JavaScript object, which means it can be easily serialized, persisted, hydrated, etc. So for example doing server-side rendering where you also hydrate the state is super simple in Apollo. Part of this is because of Apollo's Redux heritage.

4\. Developer tools - we think it's super important to understand exactly what is going on with your data, both inside your app and across the wire. That's why in addition to sticking to simple plain objects we worked on some developer tools for chrome: [https://dev-blog.apollodata.com/apollo-client- developer-tool...](https://dev-blog.apollodata.com/apollo-client-developer- tools-ff89181ebcf)

5\. One thing we're really proud of is how different libraries in the Apollo ecosystem are owned and maintained by different organizations from the community. This might make the experience of using it a bit less polished, but means that you can easily contribute or start your own projects if you need some non-standard features.

However, it's also great to remark on the similarities, which I think show that the community and Facebook are converging on some common good ideas. In fact, a lot of the initial decisions on Apollo are based on talking to the GraphQL team at facebook about their experiences:

1\. Fully static queries - both Apollo and Relay encourage you to write your queries in the GraphQL language, and avoid manipulating them in unpredictable ways. This is actually one of the ways Apollo diverged from the original Relay release and it's great that it's coming together. Read more here: [https://dev-blog.apollodata.com/5-benefits-of-static-graphql...](https://dev- blog.apollodata.com/5-benefits-of-static-graphql-queries-b7fa90b0b69a)

2\. Colocation of data with the view - both Apollo and Relay enable you to do this. This pattern was one of the best achievements of the original versions of Relay, and we think putting the queries and fragments right next to the UI is a great pattern.

Most importantly, though, it's super encouraging that the GraphQL community is gaining another great tool. The best part about GraphQL is the diversity of approaches to servers, clients, and tooling, and that they can all work together through the specification. Really excited to see this release, and I hope we can all learn from each other and make GraphQL a real pleasure to work with.

<comment><USER24> From what I know of Apollo (which is a lot less than Relay, having worked on the RelayModern compiler), this comparison is pretty good.

(1) is true, for the most part, from the developer point of view. But when you're using the compatibility mode of RelayModern (i.e. sending out a legacy query that contains modern fragments), Relay does runtime query building from the Modern fragments.

(2) Relay allows you to define updaters for mutations, which lets you write client-defined data transformations. This may not be as complex as what's happening in the Apollo client, but I don't have the experience to say. See [http://facebook.github.io/relay/docs/mutations.html#updating...](http://facebook.github.io/relay/docs/mutations.html#updating- the-client-optimistically)

Edit: I'm Matt, and I work on a sibling team to Relay at Facebook, and helped build RelayModern's compiler.

<comment><USER25> Agree that this is overall accurate, especially wrt to Relay Classic. For Relay Modern, however:

> 2\. Relay doesn't have as many facilities for updating the store and working > with mutation results.

Apollo and Relay Modern are about equal in this regard. Relay supports arbitrary writes to the store (either via an imperative API, via a fragment + payload, or a mix of the two), plus similar APIs for updating the store after a mutation or subscription update. This includes the ability to update client- only state.

> 3\. The Apollo Store is a plain JavaScript object,

The Relay Modern store is also a plain object. There aren't currently any convenience functions for serializing/deserializing it, but this is something we're open to adding.

Overall I'd say the main differences is that Apollo has focused very much on easier onboarding and covering a wide variety of use cases (many view layer integrations, developer tooling etc), where Relay is more focused on performance and scalability (hence features such as ahead-of-time optimization, garbage collection, etc).

Either are appropriate depending on your specific needs. I'm excited to see so much iteration in this space!

</comment></comment></comment></comment><comment><USER26> > "Relay Modern is designed from the start to support garbage collection — > that is, cache eviction — in which GraphQL data that is no longer used by > any views can be removed from the cache"

Could we go ahead and implement proper caching as HTTP would do: expiration date per field/models, then eviction based on expiration dates? With an optional max cache size using LIFO, last used or the current model.

That way we don't need to refetch data if the API is set up to cache. It's sort of frustrating that staleness is just defacto ignored by UI right now.

<comment><USER27> Correct me if I'm wrong :

But, wouldn't "garbage collection" solve the problem of many React web apps of consuming too much RAM (e.g. when using Redux, you never expire some keys and throughout the application lifecycle, you never cease of accumulating data inside your stores which makes RAM consumption goes up) ?

<comment><USER25> In general yes, garbage collection in Relay Modern is meant to help constrain growth of memory usage during the course of a session. This is where the declarative nature of GraphQL is helpful; unlike Redux which is accessed via arbitrary selector functions, Relay knows (via queries, fragments, etc) which parts of the cache may still be referenced and can evict records that aren't.

</comment></comment></comment><comment><USER28> My biggest gripe with the original Relay was that it didn't work with any GraphQl schema, but only those that provided a bunch of features like pagination and retrieving any object by id. This no batteries included, high initial bar for using Relay really turned me off of the product. I see that Relay Modern claims to be 'simpler', but I don't see anything about relaxing the constraints on my graphql schema.

<comment><USER24> You _should_ be able to use Relay Modern with any valid GraphQL Schema. If you can't, it's a bug that you should create an issue for! To use your own schema, you just need to specify what it is during the relay-compile step: [http://facebook.github.io/relay/docs/relay- compiler.html#set...](http://facebook.github.io/relay/docs/relay- compiler.html#setting-up-relay-compiler)

<comment><USER28> So are you saying that

[http://facebook.github.io/relay/docs/graphql-relay- specifica...](http://facebook.github.io/relay/docs/graphql-relay- specification.html)

no longer applies to Relay Modern? I can use any schema and Relay will just work?

<comment><USER24> Yes, mostly: if you don't meet the first requirement (having some sort of root field that allows you to refetch an object), you'll have trouble using, for example, RelayModern's RefetchContainer. If you don't meet the second requirement (a description of how to page through connections), you'll need to define how to paginate through connections as part of your component's logic (if that matters to you). And the third requirement: you no longer need to use Relay's imperative mutation API. You can simply describe a specific mutation to refetch, including all of the fields (i.e. via a fragment) that you want fetched every time you send that mutation (fat queries are gone in RelayModern).

<comment><USER29> Did you mean "declarative mutation API"?

</comment></comment></comment></comment></comment><comment><USER30> I'd be interested to read an analysis of how this compares to the backends- for-frontends pattern.

Also, it seems like Relay Modern reintroduces API versioning, but automates it behind a compiler step. Is that a fair characterization? Does the server have to implement some kind of tracking and pruning for unused fragments, or is it expected that the fragments will accumulate at a non-threatening rate and never need pruning?

<comment><USER31> I wouldn't say so, this has none of the maintenance implications that versioning does.

<comment><USER30> Oh? Seems like you still want to support old client versions, which means retaining the fragments that they reference. The question then is what implications that has on a server -- do old fragments need to be eventually garbage collected?

<comment><USER18> Hi, I'm Lee from the GraphQL/Relay team

This technique of persisting the queries (and fragments) to the server at build time predates Relay - we've been using it on our iOS and Android apps since 2013.

At build time these clients submit their query strings to the server and get a small identifier in return which they can use at runtime to reference the whole query. This definitely means that old queries need to be kept around as long as the clients that use them are still active. Since iOS and Android apps seem to last forever, we're still getting traffic today from just about every version of our native apps we've ever shipped, even from 2012 and 2013. Because of this we decided to not bother with garbage collecting persisted queries, in terms of all the other data Facebook retains, persisted GraphQL queries is a grain of sand in a desert. However, with a bit more work, you could easily keep a hit counter per persisted query and go remove any persisted queries which had no recent hits.

</comment></comment></comment></comment><comment><USER32> I'm curious how this compares to Apollo Client 1.0 which was released this week

<comment><USER23> I answered in this comment: [https://news.ycombinator.com/item?id=14143112](https://news.ycombinator.com/item?id=14143112)

</comment></comment><comment><USER33> Still can't see anything about making server-side rendering a first class citizen for relay :(.

</comment><comment><USER34> I've been somewhat out of the Clojurescript loop recently, but this looks conceptually a lot like the om.next model ("colocated queries").

Makes me curious how many people are using om.next in anger. It's always seemed like a good idea (and now with some extra endorsement for the core principle), but judging by GitHub activity (which I realise isn't a perfect measure), the project seems to have rather lost momentum.

</comment><comment><USER35> I'm super excited about this release! Great work Jan, Lee, Joe and everybody else who was working on this! :)

At Graphcool ([https://www.graph.cool/](https://www.graph.cool/)) we were using Relay since the very beginning. It has enabled us to build frontend products at an incredible speed and while staying confident about the data layer. For instance our entire console is written using Relay at its core. (It's open-source btw: [https://github.com/graphcool/console](https://github.com/graphcool/console))

PS: We're also the authors of Learn Relay ([https://www.learnrelay.org/](https://www.learnrelay.org/)) which we'll update to Modern Relay soon!

</comment><comment><USER36> I work at Facebook and had the chance to use Relay Modern for an upcoming product. Was really happy with the performance and collocation of data and view just amazing. Love it :) BTW I realized where Relay's logo came from by chance while fiddling around with PowerPoint's new Morph transitions... [https://gfycat.com/EnviousBothFinch](https://gfycat.com/EnviousBothFinch)

</comment><comment><USER37> Facebook has said that they never remove a property from their databases which seemed nuts to me but with Relay and GraphQL it makes a lot of sense. Why have the need for versioning when the client can request whatever they need.

<comment><USER18> Hi, Lee from the GraphQL/Relay team.

To clarify a bit: we've removed fields from and changed our database schema repeatedly over the years. In fact we've migrated between entire database technologies multiple times over.

What we haven't done is remove fields from our GraphQL API when those fields are still in use by shipped iOS, Android, or web apps.

GraphQL gives us a layer of abstraction to create consistency from the point of view of client apps while allowing iteration of backend services.

<comment><USER37> Oh hey thanks for the reply. I think I misunderstood before. But what you are saying is what I meant to say. That GraphQL is fantastic in that it gives a layer of abstraction away from versions apis with different endpoints.

</comment></comment></comment><comment><USER38> Edit: Nevermind, this has already been answered.

Anyone have insight on relay modern vs apollo?

[http://www.apollodata.com](http://www.apollodata.com)

<comment><USER23> For anyone that comes along, I answered in this comment: [https://news.ycombinator.com/item?id=14143112](https://news.ycombinator.com/item?id=14143112)

</comment></comment><comment><USER39> Maybe I am way off base but "Colocation of data and view" reminds of awful PHP with SQL interspersed with HTML and CSS. Am I wrong?

<comment><USER18> Hi, Lee from the GraphQL/Relay team here

You're not off base at all! It's very similar to that. I think it's important to extract what was good and bad about this old website pattern.

The good is that within a single PHP file you could see both the logic for requesting data (SQL) AND the logic for rendering that data. This colocation was part of what made the early web take off, it was a great developer experience.

The bad is that these interspersed SQL statements were immediately invoked and blocking, which led to utterly awful performance.

One of the core ideas of Relay is that we wanted to bring back that developer experience of colocation while not only retaining good network performance, but actually creating opportunities for network optimization. When you see GraphQL in your Relay code, that is not a blocking immediately invoked network request. It's a description of a part of data needed. Relay aggregates these GraphQL fragments together to submit in few network requests in a non-blocking way to achieve the network performance we expect from modern mobile applications.

</comment></comment><comment><USER13> Congrats on the release of Relay Modern guys! This has been a long awaited moment :)

</comment><comment><USER4> How is it that they make an announcement like this without any actual code in it?

</comment><comment><USER40> One of the things that I've noticed about the javascript community is that they're re-inventing stuff from previous technologies - sometimes badly - <USER2> almost always with a willful ignorance of what has gone before.

While this doesn't look like a bad idea - what they've done is to re-invent stored procedures. Back in the original object orientated wars this turned out to be a mixed blessing. You could get quite sharp performance, but reasoning about the application logic became harder. It might be nice if this kind of issue was at least acknowledged in the article.

<comment><USER41> I don't think this is what they have done. They've invented a client/server data model, schema definition and associated query language. Definitely wheel- reinventing, but imho a useful valid wheel which stored procedures were not. If it were like stored procedures the relay code would be running on the server. It runs in the client.</comment></comment>