Hacker News new | past | comments | ask | show | jobs | submit | c4n4rd's comments login

No need to spawn another process(uniq), you can use sort -u

;-)


For me, the benefit of a trailing uniq instead of a sort -u is that I'm invariably building towards a "sort | uniq -c | sort -n" anyways.


PM me and let me know how I can help. We can set up an initial set of emails.

1. What you currently do 2. What you would like to be doing/learning 3. Where you want to go From there, we can discuss how we can both work on your development.


Hi, I'd like to talk. Email in profile


PM me and let me know how I can help. We can set up an initial set of emails.

1. What you currently do 2. What you would like to be doing/learning 3. Where you want to go From there, we can discuss how we can both work on your development. Thank you,


How does one PM on HN?


HN has no PM feature - some users who wish to be contacted leave some kind of contact point (e-mail, website, etc) in their profile.


Tweeter and all others you mentioned are private corporations. Their goal is to turn profit to their shareholders - NOTHING MORE.

He who believes these companies exist as a way for the mass population to voice their opinion and as a way to exercise democracy should rethink what these companies are all about.

Note: I do not necessarily agree with that they do, just pointing out what they are all about.


The scary thing is when you realize the so-called news organizations, for the most part, have exactly the same motivations. NYT, WSJ, et al are, after all, corporations too.



Well of course. Who was enough of a sucker to believe that the means of education, information distribution, and public discourse should be privately owned and operated for profit?


So much better if the media was owned and controlled by the government?


No, by journalists!


That's why they need to feel the pain from consumer backslashs. Just look how ridiculous the Pepsi outrage did become.


And look at how quickly everyone forgot about it


What outrage? Serious question, I wasn't even aware there was one recently.


Look up "Pepsi Riot Commercial".

There was a brief and short-lived outrage against Pepsi for a distasteful commercial where a (generic, but people attribute it to BLM) riot was ended by giving a police officer a can of Pepsi.

Or at least, that's what I gathered from reading about it on random comments from unrelated threads on Reddit because I'm out of the loop myself.

E:

Twitter? Meant Reddit. Unimportant change.


A good run down, with a live link to the commercial: https://www.nytimes.com/2017/04/05/business/kendall-jenner-p...


Fine - I'll accept that once Twitter stops pretending they were responsible for the Arab Spring. And Reddit stops talking about how they're a place for free expression. And so on.

By all means, curate your own back yard however you want. But misleading your users as to the nature of that curation should be actionable somehow. Enforced echo chambers are fine and dandy, so long as they are disclosed as such.


Funny. The real world does not work that way. Misleading the public is what power is for.


> Tweeter and all others you mentioned are private corporations. Their goal is to turn profit to their shareholders - NOTHING MORE.

Not sure what that's supposed to mean. Would it be OK for a food company to use expired ingredients if it increased their profit, or for FedEx trucks to run over people if it helped their bottom line? Private corporations have various degrees of responsibility to the general public, depending on how much harm they can inflict. Twitter has become a major platform for public discourse and it's not like people can move their followers elsewhere. Using Twitter's power to suppress certain kinds of (otherwise acceptable) public statements should be a big no-no.


Since 'expired' food is almost always perfectly safe for human consumption there's nothing wrong with selling expired food and there's entire stores that have that business model. - http://www.delish.com/food-news/a46182/wefood-denmark-expire...

http://abcnews.go.com/Lifestyle/inside-bostons-expired-food-...

I used to go into a small store when I was a kid and ask for the expired bread. They'd come out of the back with and entire friggin garbage bag full of bread that 'expired' yesterday. That bag was $1.

FedEx truck running over people is illegal whereas Christian bookstores only stocking pro-Christian material is perfectly legal and good business.


You seem to have added to c4n4rd's post the assertion that this is OK. I don't think it was intended that way. The point is not "This is ok because it lines Twitter's pockets", it is more "This is why it is happening. What else did you expect?"


I think we should expect more, the same way we'd expect food producers to not poison us and truck operators to not run us over. Twitter has become a major platform for public discourse (including elections) and needs to at least have some transparency into their deletion and shadowbanning decisions.


That comes from government regulation. The FDA keeps your food from poisoning you. As of now, there is no structure in place forcing twitter to keep the spread of information alive and well.


I'd also point out that structurally, food companies are strongly disincentivized to quickly kill their customers, as they'd like to sell you something tomorrow, too. (Slowly killing their customers is a potential strategy, though anyone who wishes to dance on capitalism's grave with that has a lot of very pointy questions to answer about the government's involvement with the way the food industry may be slowly killing us.)

Twitter is mostly incentivized to keep eyeballs on their site no matter what. If that means using highly sophisticated machine learning algorithms to lock people in a soft, warm filter bubble in which they are eternally flattered for their opinions and never encounter a reason to leave, so be it.

In fact arguably Silicon Valley's biggest social-media challenge they are facing right now is that the world is trying to force them to recognize that not everybody wants to be locked in the same bubble that a Silicon Valley liberal does, a lesson that they are still trying to resist. It would probably be worth billions for Facebook and Twitter to give up on that dream and instead help people into their own custom soft warm filter bubble. If they don't do it, somebody else will.

I'm not celebrating this, simply observing that every month the money gradient Facebook, Twitter, and so on are facing to head down this road is going to get steeper.


I think your analogies are strained.

A better analogy might be to a broadcaster, who because of a monopoly on a scarce public resources, does have certain responsibilities.

But Twitter isn't a broadcaster (nor are they a public utility), and their value is in their network, which they literally have spent billions of dollars creating. It's theirs to do with as they see fit.


The broadcaster has also spent billions for their network [1] but that doesn't absolve them from responsibilities. Like it or not, Twitter has become a major platform for public speech and it's practically impossible to pack up and take thousands and millions of followers elsewhere. So yes, they have a monopoly on a scarce public resource and should act accordingly. At the very least they should have transparency for their deleting and shadowbanning process. The people who've brought in thousands of followers and kept them on Twitter should have a minimum of rights too.

[1] https://www.cnet.com/news/fcc-rakes-in-45-billion-from-wirel...


Your argument seems to be that Facebook and Twitter are so successful they need to be treated as a public service.

You feel justified in controlling the behavior of a public company, not through the commercial code or any legal basis, but because you ex post decided the terms of service everyone agreed to upset you.


> It's theirs to do with as they see fit.

I don't think you should take for granted that this is true. Even privately owned things still must abide by the law of countries they operate in, and even that is just the most crude level of regulation and responsibility a public service has.

Yes, public service is still public even if privately owned. Anything operating open to the general public in this way has certain responsibilities (above and beyond the law) that go along with that. We live in a civic society and we depend on participants in that society living up to their responsibilities as citizens (including corporate citizens).

A lot of the problems we have in our society now result from the abdication of those responsibilities by the people (and corporations) that act in public without taking responsibility for those actions.

edit, for clarification:

my point is that private ownership does not remove a thing from social responsibilities. I understand that some people disagree with this, but it astonishes me that they do. The basic premise of civilization is finding ways to live together in ways that are a net-benefit.


>A lot of the problems we have in our society now result from the abdication of those responsibilities by the people (and corporations) that act in public without taking responsibility for those actions.

Such as?


the current state of political discourse, while it has many contributors, is certainly partially caused by the abdication of responsibility of the media to pursue truth.

the current state of governance as well is strongly impacted by the pathologies of shareholder capitalism, which leads to businesses seeking to increase their private profits at the expense of literally everything else, including a scorched earth approach to legal regulation that serves the public benefit. the financing of climate-change denial propaganda campaigns by the coal industry is a very good example of this. another good example would be the private prison industry, and its associated lobbyists seeking to increase rates of incarceration.

this applies to individuals as well though, not just corporations. in many places, people have abdicated their responsibilities to their communities, seeking to live in walled off communities that have no interaction with "others" outside the barricades.

I could go on. I think you get the idea.


I've been thinking for a bit that the unchecked free market is effectively just a layer of indirection on politics.

Sure, the government might not be spying on every word I say, but if the only way for me to connect to the internet is through for-profit companies, who are obligated to spy on every word I say to maximize shareholder value, is there any practical difference from living in a surveillance state?

Sure, the government might not be able to send goons after me in my home or my friend's home, but if the only way to get between the two is a private transportation company that asks for the government's goons, is there any practical difference from living in a police state?

Sure, the government might not be able to control the media, but if the media has the freedom to campaign for whatever candidates they like and send their own leaders to work for the government, and non-compliant media is threatened with the inability to access stories that they need for profit, what is the difference from living in a place with state-controlled media?

I absolutely agree with the understanding that private companies can, and often should, do whatever they want. I am also the sort of person who will argue that Twitter or some Twitter-like service should be censoring violent viewpoints (I am pretty supportive of mastodon.social's Terms of Service, for instance). But that's rooted in the same belief: we need to actively make sure that our society is the society we want it to be. It's not enough to make sure that our government is the government we want it to be, and treat everything between the government and the common man as an uncontrollable inevitability.

Fighting for the government to give freedom to corporations to do whatever they wish is very different from fighting for freedom for people.



Based on the comments I see here (about how they wished to learn CS, or CS vs EE), I wish this book had a different title with more of an indication that this is a operating systems book (though not 100%). Computer Science is more than what is presented here.

Big O Notation/Data Structures/Algorithms, ala Dr. Knuth

Proof and theorems

Computer architecture and design (NAND gates and the like)

Language design, interpretation, and implementation

...and much more.

Do not get me wrong, I believe this book is valuable (BIG 'THANK YOU' to Ian Wienand for it). I just wish the title could have been different.


I agree, the book isn't very "bottom-up" at all, perhaps with the exception of "Binary and Number Representation" being the second chapter; the rest of it looks like OS stuff.

This is what I'd consider "bottom up":

https://www.amazon.com/Code-Language-Computer-Hardware-Softw...


My choice for bottom-up book: The Elements of Computing Systems: Building a Modern Computer from First Principles https://www.amazon.com/Elements-Computing-Systems-Building-P...


This is also known as the "nand2tetris" course: http://www.nand2tetris.org/

Great book!


I agree, and these are important CS topics. However, Big O made so much more sense to me after I've had a chance to understand basic machine execution and written a few non-trivial programs.

There's another aspect regarding when to introduce some of these topics - getting kids and new CS students interested and energized about what they are studying. I know the argument could be made that if these topics aren't of interest then don't do CS, but they must be introduced at the right time.


Just a quick note:

1-minute away to get your bot alive .. maybe should be "bot live"? not sure what you intention was here, but one would use "live" more likely in this context.

"Use it, is free" should be "Use it, it is free" or "User it. It's free". English always requires a pronoun before the verb (with exception)


Thanks for feedback! Sometimes I have difficulties with english grammar, spanish is my native language.


I live in the US. Let me know if I can help you with anything.

Abracos.


The "ç" makes an enormous difference here.


The international keyboard mapping on Ubuntu makes ç come out as ć, so I gave up on trying that. :-)


Note: You can find some shows on youtube.

Cheers and abraços


My son liked Fishtronaut / Peixonauta [1] which was made in Brazil and released in Portuguese, Spanish, and English simultaneously, I think (it's on Netflix in the US).

1: http://tvpinguim.com/peixonauta/


Obrigado! We found a few kids shows - Palavra Cantada has a great channel on there, and there are a few Turma da Monica episodes.

But not films like Toy Story.


This is really exciting!!! I was a bit disappointed that the right-pad will be out only in 2017. I am looking forward to that release because there is a high demand for it now.

What kind of load balancing is being used on the back-end? I called leftpad(str, ch, len) with the length I needed and noticed that is not very scalable because it is blocking.

A better approach I would recommend to those using it is to call the API in a for loop. In my tests, it had performance very close to those I see in C or assembly.

I was a bit turned off that the free version can only handle strings up to 1024 in length. I know you need to make some money, but it is big turn off for a lot of my projects.

Edit: I finally signed up for it but still noticed that I am only allowed to use 1024. I called your customer support line and they said I was calling the API from multiple IP addresses and for that I need an enterprise license. Please help me with this issue, it is very crucial at this point as my project is in a complete stop because of this.


Best practice for performance for large left-pad jobs is to call the service recursively using mapreduce. Remember that left-pad(str,pad,n) is equal to left-pad(left-pad(str,pad,n/2),left-pad("",pad,n/2),n). This should run in logarithmic time and is highly parallelizable.

If you don't like the "" magic string in there you could replace it with a call to left-pad(null, null,0).


You should be using emptystring.io instead of the "magic string" or a "null, null" hack.



oh god it's too real


Poe's law for programming culture extremists


if you put https://api.left-pad.io/?len=1017 or anything higher than 1016 it says:

{"errorMessage":"len exceeds 1007 characters. Contact a left-pad.io sales engineer for an enterprise license","errorType":"Error","stackTrace":["exports.handler (/var/task/index.js:33:22)"]}

wow. they even have an enterprise sales engineer! :)


Shouldn't it be leftpad(leftpad (str,pad,n/2),leftpad("",pad,n/2),1)?


You can get right-pad today by using starboard-pad, which is heavily optimized for marine applications and comes with an open seas license.


Can we also get a containerized on-premise version of this service? We'd like the ability to spin up a couple of these behind a load balancer to let us achieve web-scale.


This is why I love Hacker News


I really hope I can get this as a NuGet package. This new LPaaS is the wave of the future!!!1


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: