HNHacker News
TopNewBestAskShowJobs

19eightyfour

479 karma · joined February 26, 2017

submissionscomments
19eightyfour··on Benefits of named return values in Go
Got it thanks a lot, that's very clear.
19eightyfour··on Benefits of named return values in Go
I got it. That's a neat example. Do you have to define that deferred function inside the caller, in order to reference the name? Or can you factor out deferred functions to be used by various callers and pass in the return names for them to modify?
19eightyfour··on Benefits of named return values in Go
Ah, okay, thanks. I get it better now. Sort of like decorators in purpose, then.
19eightyfour··on Benefits of named return values in Go
Thanks alot for explaining, I think i get it a bit better now.
19eightyfour··on Benefits of named return values in Go
I'm thinking of it in the way that the interpreter works in JavaScript with tasks. If you setTimeout(A, 0), inside B, then after B returns, A is called, but any other tasks previously inserted into the queue are called first.

So I think that means I was asking about execution in the same context (as in memory context), unless you mean stack frame by context, in which case, I think i understand that because the caller returns the value of the deferred, they are in the same stack frame, and nothing else could insert in that frame between them. I'm not sure you know what i mean, but do i have it about right?

I don't really understand this, but i think I'm getting somewhere.

19eightyfour··on Benefits of named return values in Go
Ok now I got they are in scope. About defer, could you think of it like defer makes a function into a function with multiple entry and exit points, possible to be stopped and resumed, like a coroutine?
19eightyfour··on Benefits of named return values in Go
Is that actually returning err as the deferred return value of test? In other words, to the caller of test it appears test returns the result of the deferred?
19eightyfour··on Benefits of named return values in Go
Cool. Can anything execute between the end of the deferer and the start of the deferred?
19eightyfour··on Benefits of named return values in Go
How does defer interact with named returns?
19eightyfour··on Benefits of named return values in Go
I had a bit of a play around with it. It's pretty powerful being able to see <func name> <params type> <return type> in one line ( or possibly multi line )

It really hammers home the concept that a function is a transformation, and of what into what. And I think this syntax would probably encourage pure functions. And it's so useful to allocate the return in the top line. I really like go.

19eightyfour··on Benefits of named return values in Go
Okay, I think I get it. The format / syntax is pretty easy, simple and clean. I like it. I added a new function that takes two params and returns param, so I think I get this naming the returns now.

https://play.golang.org/p/7bfiSqKY_w

I was also looking for a "spread" / ... operator, but couldn't see a way to do that.

19eightyfour··on Benefits of named return values in Go
I was going to post "But JS has this:

    return { named_var_1, named_var_2 }

    const { named_var_1, named_var_2 } = f()
But then I read the article.

I don't know really what is going on in this article on a quick reading, but it builds by existing sense that go is a really cool language that I ought to get into.

I have no idea if anyone wants to help me understand, but in the last part where he changes to use a named return parameter, he says, you may also "enjoy the cleaner look of the source code, too". To me the only difference I see is the return name, to the right of the existing function signature. What was I missing that makes this actually cleaner?

19eightyfour··on Is it possible to host Facebook on AWS?
I love that, seriously. Machiavelli's Guide to PaaS.
19eightyfour··on Is it possible to host Facebook on AWS?
Could you elaborate on what happened? I don't know about this.
19eightyfour··on Ask HN: How do you stay creative?
That's interesting. I'll have to try that.
19eightyfour··on Is it possible to host Facebook on AWS?
It's not remarkable its Bezos' business strategy.

The way he thinks about things is it's not a threat to his business to have competitors in his space not just because he is prepared to undercut them on cost but because he knows that his true focus is on customer satisfaction. And competition, whether through providing customers with a choice or encouraging his own systems to provide better services is good for his business.

But in this case it's really just because Netflix is too insignificant to matter to Amazon overall. It's just a tiny fraction of their revenue and what they're trying to do.

And if you want to be Machiavellian of course it's good because then Amazon has leverage of Netflix.

Seriously how would it look if Amazon turned down a company because they were competing? It would be an admission of defeat and weakness for AZ. That's not how an "apex predator" thinks.

Keep your friends close, and your competitors....

19eightyfour··on Show HN: Web Page Archiver
That's awesome. I like that you just came out with this when the others have posted...and that it only has 1 point! It's simple and to the point. I may not be your customer base but think the email is a great method of delivery. Especially if the mails were sent with some metadata in the message body that made searching for the mails easy. If you packaged it into a Chrome extension ( easy enough to make ) you could accept payment using the extension APIs and people could just click your extension's page action to save the page. It would be effortless. And a few seconds / minutes later, they'd get an email notification....this is giving me ideas! :) Anyway, I wanted to congratulate you and reach out since yours seems to me just as good as the others and it is perhaps not getting quite as much attentions as theirs. Good luck! :D

P.S I wanted to ask have you had much interest / use / payment for this? :);p

19eightyfour··on Ask HN: How do you stay creative?
How do you find marijuana affects your coding ability?

I think I tried doing some code when in Amsterdam in a coffee house ... with this super high hope that it was going to be great. IIRC, I couldn't think at all. Zero productivity.

But that could have been a consequence of the "setting" rather than the drug. It would be cool to try out coding when high in a THC cowork space in Amsterdam specifically designed for people coding on laptops when high. That could be some hackathon!

19eightyfour··on Ask HN: How do you stay creative?
No. I'm creative and I have a lot of ego. I find ego helps with belief in myself so that I can take risks. When things don't work out, I can use my self belief to spin it in a way that works for me. Elon Musk does the same thing. Ask his wife.

I disagree with your notion. I think that having an ego is necessary to deal with the slings and arrows of failing when from taking outrageous risks.

Take risks. But take calculated risks. If you don't believe in yourself, and trust your own vision, someone might talk you out of it. Or your metric of safe will include acquiescing to or acting with the advice of others.

There's not really a way to rationalize courage in my opinion. And it's not a case of you have it or don't I've found. At some point in my life I feel brave, other times no. What makes courage in my experience is just saying, 1,2,3 do it, and making yourself do it. If there wasn't fear it wouldn't be courage. You have the vision or desire, you're afraid to take the step, then you take it. That took courage.

Ego helps me believing enough in myself to dream up outrageous ideas. I find that if I'm low confidence or not freed from cares and worries plaguing doubters, my mind isn't free enough to dream up, and my heart isn't free or strong enough to take risks. So have ego and believe in yourself (for me, they are the same thing). Having ego lets me enjoy myself, and makes me happy. And enjoying and being happy helps my creative process.

Have ego. But be rational and strategic about your ego and keep it in check. Use it in a way that works for you, not against you. Is my advice.

YMMV.

19eightyfour··on Ask HN: What's your process for building a community around your product?
Go read Tribes. The following is my advice, not from that book.

Same as with creating a community around anything.

1. Define a group of outsiders, explicitly (politics) or implicitly (privilege).

2. This scaffolding sets up the emotional payoff necessary to motivate people to be involved and belong. The nature of community is also the essence of how you create it. Tap into people's reward circuitry. Their tribalistic instincts. If you find such notions repellant, you could be in the wrong business.

3. Apply optimizations, such as letting people advertise recognition and status (reputation), develop mastery ("my skills are improving"), and act autonomously ("I got this").

4. Make a safe space for them to congregate. You need boarder control / bouncing / moderation. You can take an editorial stance yourself, or work with the community to develop it collaboratively.

5. Let them communicate.

Do you really want to do this? A community is like a ginormous multiheaded baby. It will suck you dry and lay waste too all your other plans. But maybe it will also be among the most beautiful and amazing things you've ever helped create. Your call, buster.

19eightyfour··on Show HN: Tesoro – Personal internet archive
The issue is cost. Your costs are disk space for people's archives, instances for people's use, and bandwidth for the fetches and crawls and access.

How can you pay for this if it's free? It's unreliable unless its financially viable.

19eightyfour··on Ways to Invoke a Function in JavaScript
Yeah i got a chuckle out of it when i crashed my console session.
19eightyfour··on Ways to Invoke a Function in JavaScript
"Owned." Heh.
19eightyfour··on Ways to Invoke a Function in JavaScript
Which one of these would be cheating?

    [...{[Symbol.iterator](){return {next(){ return {done:console.log(1)}}}}}];
    JSON.parse("[]",()=>console.log(1))
19eightyfour··on Thermodynamic Asymmetry in Time (2016)
This is neat. I think there's a way around it tho. What if you can division the futures high entropy states into k, lower entropy states, and subdivide those, and so on. Substructure. Information about some of those substates can flow back from the future and be detected by observers in the present, IMO. It's not easy, but it's possible and it happens. There's still signal. The bandwidth is not nearly as much as the flow from past to present, but it's still more than any single observer can possibly hope to ingest, so some details of the future can be reconstructed by some observers in the now.
19eightyfour··on Wikileaks Documentary Makers Accuse Assange of Censorship
I don't know why people still support Assange so clearly. It was interesting to me that people on /r/The_Donald love Assange so much. Before this documentary, I posted there criticising Wikileaks and it was totally hated on. I find that weird because the idea that Assange is unreliable and fake, was the kind of somewhat-counter-main-narrative idea that I thought people of T_D would appreciate. They seem to see him as some sort of hero. I wanted to point out that he seems to me to have once been good, but then he squandered by trading whatever his mission originally was, with some bullshit idea of being a martyr to serve his ego. I can't respect someone who talks about curing the world of ignorance, and having the courage to tell the truth, but then cowers for 7 years in a embassy because he's too afraid to stand up and tell the truth, whatever it was, about what happened. I mean, I know his existence is useful to the IC and various interests, but I personally just find him disgusting. And I genuinely had some belief in what Wikileaks could have stood for. But I don't really see it as that now. To me, Wikileaks and Assange totally sold out. Sorry to offend anyone who feels very differently. This is just my opinion on it.
19eightyfour··on Hard Questions: How We Counter Terrorism
Do you have some references on this original use of the word?

I had no idea. I'm a post 1980 baby after all.

19eightyfour··on Hard Questions: How We Counter Terrorism
I get that. And I think your ideas are useful, but to me they're not the whole picture. I've explained how I think about things below. Caution: you'll probably find those views too extreme for your taste. I'm fine with that.
19eightyfour··on Hard Questions: How We Counter Terrorism
I've read back over this and some of your other comments in other threads. You have some well thought out opinions, but I'm just of a different mindset.

You're probably too clever for me to be able to argue with. But that doesn't matter to me. Because it doesn't really matter what either of us believe, it only matters what we do. And when I look at the world, I don't see it is the people who win the arguments who win. It is the people who can sway others with emotion, the countries that can better tell their own story, the civilizations that can build something that other people want and the militaries that can deploy technologies that dominate that win. And above all, I'm someone who loves humanity. For what it is. So it doesn't matter to me even if your arguments are right. Because I'm more concerned about what's necessary. I have strong opinions, born of my own experience, based on logic and emotion.

Maybe I have been duped by the MSM, the AI of tech corporations and swindled on a hopeless dream of being a "somebody" / a tech founder / a snowflake whatever, in a consumerist society that needs to worship individualism and the purchase of status, or relief from fear, to drive the economy. I've certainly been duped by my friends and enemies, so, surely, the government, big corporations and the media, with their infinitely better resources, can probably dupe me too.

But I'm fine with that. Because all that really matters to me is how I live my life. I figure most people are living in a delusion anyway. Of one form or another. SO the question is not "do I have the truth?" the question, for me, is "Is my perspective useful?" Does it work for me? Does it help me achieve my goals? Whatever they might be.

And I think I'm good at that, or at least I try to be.

But on the topics you broach I'll give you my clear opinion: our societies, that have something to offer ( freedom, justice, prosperity, equality, harmony ( maybe democracy if you like that sort of thing ) ), are better than the societies that don't have such things to offer. As far as I'm concerned, any violence from people emanating from such places against our own is wrong. Prima facie wrong. Mainly, I think, because, if they were to win, they would offer nothing. So we must win, because we can offer something. So all our wars, against them, are justified to me. I see it as their problem. If their societies didn't suck, if they had devleoped themselves, protected themselves from manipulation and outside influence, then they'd be in a better place. But instead, they didn't keep their houses in order, and they became these breeding grounds for bad things, bad ideas. And I see no problem with wiping them out. If we have to. Just like the human body will kill its own cells if it diseased, I believe we should not hesitate to cut off those parts of our human civilization that are toxic. An extreme view to utter, but not to practice. I'm not saying that makes it okay. I'm saying it's okay, because that's what we say is okay. We have to protect what's good. What's good is certainly not what's perfect. But we have to get down in the dirt, and do bad things, to protect the good.

Maybe you say that's extreme, and you pretend I'm bad, and I don't expect you or many others to agree with me. I got that you would see it differently. But I would just see that as the comforting delusions people adopt to tell themselves they're good and righteous.

I want you to imagine if you have a family, and you are on a camping trip in the forest, far from any outside help. And a group of bandits tries to attack your camp. What kind of family person are you, who would refuse to do anything necessary to protect the good that was their family? I say, that you'd be in the wrong, if you refused to do anything "wrong" to protect your family.

So that's how I see humanity. Essentially good. Worth protecting. But protecting it, and developing our civilization, is not going to be pretty. Look at China. So much achieved. But so much horror and bloodshed to get there. To me that's all there is. The development of the human civilization and the forward march to a better future. There will be blood. But I believe it's worth it. Other people don't. That's fine. To me, their "noble mindsets" are the fruits of the peacetime they now enjoy because of the thousands of years of bloodshed that have brought our civilization to where we can enjoy peace.

TL;DR - I enjoy peace and love as much as the next human. I just think it's fine to do anything we need to protect that and keep moving forward as a species. Yes, it's a war mindset. Yes, the "terrorism is a threat" narrative gets a lot of mileage. But who cares? Nothing is guaranteed in this world. As far as I am concerned, humanity is always at war. If it's not terrorism, it's disease, it's planetary annihiliation. Until we are a multiplanetary species, who can upload our brains into new bodies whenever we like, until we've cured death, we're always going to be at war. So we're on that road. We can't take any chances. We ought not to waste any time. See the threats. Stamp them out. Protect what's good. Excise the diseased parts. Nothing else matters. We do not have the luxury of fanciful meditations, except from the security of an armchair, a secure perch provided by the blood of people who fought and died to bring you to the brief respite from endless horror we currently enjoy. Humanity has a long way to go, and it's not going to be pretty, but I believe we'll get there. You just have to be prepared to get dirty along the way. Get down in the dirt, and muck it out. To save and protect what's good.

You probably care more for argument and logic and facts and finely stated opinions than all of this emotive, rhetoric. But to me, it's not that. It's very plainly how I see things. So, thanks for giving me this chance to express it here. I feel internet conversations are useless, but they give me a chance to know my own thoughts better.

19eightyfour··on The Crypto Anarchist Manifesto (1988)
I don't believe in encryption as a tool that can give any real asymmetry to an individual or conspiracy against the State. I get that you do believe it can.

Another point is -- all governments monitor communications and we don't call them tyrannical. Take the Germans. They're notorious. But people consider the Germany government quite liberal.

Restricting communications does not have to be a tool of "cruel, unreasonable, oppressive or arbitrary use of power or control." It can be deliberate, reasoned and helpful. China restricts their communications and they enjoy a lot of civil harmony, and a huge amount of national pride.

The media in the US practice a form of "information restriction and control" by tightly directing the narratives, and editorial perspective ( and sometimes even the facts ) that people are consuming. That's been the case for a long time. No one's calling it a tyranny, even tho plenty of Americans distrust authority.

I think your model of tyranny and your belief in crypto are unrealistic.

The reason I don't believe in crypto is because I consider everything as "security theatre." IMHO, every single cryptosystem that exists has already been broken. The pretense that it hasn't is just a charade.

Note: I believe in the strong version of the above statement. That RSA / EC / AES / DES and so on are broken. But the weak version, that protocols, physical monitoring, side channel attacks, and other vectors make every practical cryptosystem broken is kind of born out by the events of the last few years.

Whether you believe in the strong or the weak version of that statement the net result is the same, no? I think so, anyway.

← PreviousPage 2 of 11Next →