skysight-inc/HackerNews huggingface dataset:
I don't like the "central exception handler" idea -- it is invariably too far away from the error site to do anything intelligent.

I do like Erlang's approach with hierarchical error domains ("processes" and "supervisor trees"), and I honestly think Go made a mistake here: The semi-recent introduction of Context acknowledges that a control hierarchy is present and an important part of a concurrent, distributed application and that there are aspects of this that need to flow through everything. The Context exists to permit a caller to call functions and launch goroutines that inherit deadlines, the ability to cancel their work, and so on. But this is a rather blunt and intrusive tool that could have been better solved by baking termination into the goroutine scheduling runtime. Of course, one reason goroutines cannot be forcibly terminated is because everything is mutable all over the place, but you could still have termination induce system-level errors that the goroutine would be forced to handle (or maybe you could safely induce a panic)... but that ship seems to have sailed a long time ago.

And yet a hierarchical approach similar to supervisor trees would have been awesome to have in Go. Managing hordes of complex, "crash only" goroutines in Go gets gnarly fast, and you tend to end up with your own ad-hoc type of supervisor trees that uses waitgroups and maps and what not to corral trees of composed workers to ensure they are all able to cancel, retry + back off, and time out appropriately. Even something like retry with backoff isn't part of the standard library, even though it's extremely core to distributed, concurrent programming.

I think I agree with Go's authors that exceptions are bad, but exceptions in an explicitly hierarchical, supervisor-type process model, where processes are "crash only", actually make sense. It means you tend to design your system into discrete parts consisting of dumb workers (that give up and crash on the smallest error) and slightly less dumb supervisors (that react to said crashes). It's not a panacea, but it's better than the loose, somewhat impoverished set of tools that Go gives you.
This is really interesting, thanks for linking :)
> This is almost always unacceptable in production,

This is not true for almost all software outside of embedded domains. In fact responding to an error near where the error occurred is almost always a mistake. The rare exceptions to this are when "error" is unavoidable due to concurrency (e.g. I/O), and even then many errors shouldn't be handled (misconfiguration, incomplete system initialization, etc.) or should be wrapped and transformed for human consumption (e.g. user tried to access a resource that couldn't be found - we still bubble up).

> you need to catch all the errors and think critically about what should be done when that error is encountered.

If you support this position, you'd support checked exceptions like Java - something that's widely considered a mistake.

There's lots of reasons why it's a mistake. A more important reason has to do with dynamic construction of control flow. If you use any monad design patterns in the construction of your application (easy to do because the monad design pattern is so powerful), you quickly create boundaries that errors need to cross unmolested because they're generic and cannot possibly encode policy. The same criticisms follow through into dependency injection and other forms of modular decomposition that use dynamic recomposition. Java style has you doing utterly pointless things, like wrapping all the implementation errors in a generic module-level error - obscuring the very thing that might theoretically let user code react to the error state!

More philosophically, abstractions fail in implementation-dependent ways. When you encode policy about failure outside the abstraction boundary, you're encoding implementation-dependent behaviour; but you can't put the policy inside the abstraction boundary either, because then the abstraction isn't reusable - different applications have different policies. Error handling is inherently opposed to abstraction. That's why microscopic error-handling close to the cause of the error only flies in small closed systems, like kernels, databases, embedded.
It has probably saved me from getting blind or losing a leg in the next 20 years. From 8.5% A1c to 6.5% and below. Together with the pump I see my glucose all the time, it wakes me up at night if needed and I can eat and live however I like with perfect glucose values.

Every single type 1 diabetic should have the possibility to have one of these systems.

I'll post pictures later when I get home...
China is the first country to force backdoor installation on people smartphones. Not last, I fear.
What is this:see video
I'm getting paid to write Elixir right now.
I mean sell it piecemeal. Add a butt ton of endpoints. Make it easy to use, easy to integrate. Sell it on credit card.
But you still have to write the function a hundred times — once each for every immutable map you'll use.

This is the opposite of DRY.
The channel primitives are also slow and it is really painful to write fast alternatives as you have to resort to code gen.
The classic (or maybe, time-honored) technique for implementing dynamic binding in Lisp interpreters was simpler yet. When the reader produced list structure, that was in the form of cons cells and "atoms" with string name. The current value was part of the "atom" data structure -- code that rebound it would push the "saved" value on the stack, alter the value to suit, and then pop the initial value off the stack and restore it when done. (This is sometimes referred to as "shallow binding".)

Since the interpreter was interpreting the source-code-as-list-structure directly, it could always get the current value by a one-step pointer indirection, with no chasing down hashmaps at all. (The Lisp 1.5 manual documents a slightly more elaborate version, with the current value stored as an entry on a property list, but the idea was again to limit pointer-chasing by the interpreter.)
I think it is accepted that Danes and Swedes are so good at English because movies and tv shows are not dubbed, only subtitled in their countries.
Re: databases in Go, I remember seeing a lot of these concerns a few years ago but it looks like many people found a way to make it work: https://github.com/avelino/awesome-go/blob/master/README.md#...
If it isn't, I'm invoking my right to English incorrectly, given that it's not my native language ;)

(yes, I'm being toung-in-cheek by using "English" as a verb here :) )
If using the Dexcom G4, you need to solder one of these to use it with xdrip

https://xdripkit.co.uk/

G5 works directly with the software because the transmitter speaks Bluetooth.
The author discounts this as a good solution because you'd have to re-implement the structure and functions for every single type you might put in the map; i.e. that would be a valid solution iff Go supported generics, but it does not.
Redis on Acid: 0.5M ops/sec, 1ms latency and ACID compliance
Trains do about 30 times better on a tablespoon of diesel, and that's only including the weight of the freight and not the train itself.
This doesn't change much, I guess.

I mean, if you see marked rate for a JavaScript dev is too low, just don't sell yourself as one. Be a "mobile app dev" or a "solution engineer" etc. pp.

In the end you do the same work and get paid more, because people stop judging you by skill A bit skill B.
Otoh, I already have various memory latency and processing issues, having just 1x conventional brainpower.

If not complete military-grade win, it would be nice tradeoff anyway. Alternatives are: placing new heavy brain in abdomen (because stock digestion can't produce so much power by design), or replacing back, coxal and leg bones with carbon variants with embedded batteries, which should be far more expensive than subscription to low-latency BH channel for additional $1000/mo SLA per team. Also consider servicing and failure costs for businesses depending on 5*10x brainpower teams, and reduced labour market.
Strong types, not necessarily static ones.
You're buying the service, not the card.
yes, and they are heavily used under the hood in the standard library, for things like http connection pooling.
I don't think memory is limiting design factor either.
> You can’t have an opinion about something that doesn’t yet exist.

Well, exactly. And if it seems like I expressed that kind of opinion, I apologize, I did not intend to. I'll certainly try the new things.

> you would we telling us how you prefer the horse, perhaps just make it faster.

It seems like you know me well, certainly better than I know myself.
> So less than a billion, net, world wide.

So your retort to "if we ignore that a billion people would migrate in a few months in an attempt to escape poverty" is that it will be "less than a billion", then the article didn't exactly reassure. It's a quibble between basic numbers (population in the third world) vs hypothetical numbers (Gallup's rolodex), not a substantial discussion or disagreement.
Go also supports libraries.
You're good at programming if you work hard at really learning your craft.... learning some things to deep expert level and many things to competence. So many programmers make no determined effort to learn - they are the shit programmers.
I don't disagree. It's just more tedious in static languages.

Let's say we're doing a user registration. In most dynamic languages the JSON body will get parsed into a map. Excuse the fat controller and pseudo-language, but it'll end up looking something like:

func create(conn, params) do
if not Validator.is_email?(params["email"]) do
return error(conn, "email is not valid")
end

if not Validator.min_length?(params["password"], 10) do
return error(conn, "password must be 10 or more characters")
end

create_user(params)
true
end

In Go, if you want this nice and typed, you'd add a RegistrationInput struct with the field mapping tags:

type RegistrationInput struct {
Email string `json:"email"`
Password string `json:"password"`
}

Map the user's input to the structure, handling the error:

var input RegistrationInput
if err := json.Unmarshal(req.body, &input); err != nil {
...
}

And then write the exact same validation checks.

What safety does Go's version buy you?
Show HN: Tagove
> Foreigners never had a voice or a vote

Indeed - and they should not be a beneficiary either. Do you for a moment believe that "New Deal" / "Great Society" laws would ever have passed, if under the understanding that the whole population of the Earth would be entitled to receive it?

> This argument could be made verbatim ... that today are considered bigotry

That does not make the argument erroneous, only un-PC.
So not the pepper itself, but the vomiting afterwards? Very unfortunate and scary, but would have preferred a more accurate headline.
I actually experimented with a "database" of sorts, a redis compatible server with replication, persistence and an extendable API. It was okay as a toy project but never came close to redis performance, even when it only did ping/pong. Plus it had the issue of stop-the-world GC that was how Go worked back then. Not sure how well it would work today.
well not really. I'm saying it could be interesting to ask people that decided not to use go , the reason they choose not to, in order to expand their user base.
Depends upon what is programming? I think it's more like painting. Are you good at painting? How can we define it? If you know to hold a brush you are probably a painter. Are the best artists that get paid more? Or is the ones that are at the right place at the right time?

Back to programming, I feel that web development gets more credit, and as a web developer I can say that most of the development is just boilerplate configuration, made complicated by layers upon layers of unwanted but unavoidable complexity. On the other hand system programmers and game developers do more hardcore programming stuff, but may not be as much recognised outside their closed community.

So in other words depending upon the domain, a good programmer might mean a person who can figure out the configuration better and keep things nice and tidy (read 'standard') while at some other domains it might mean hardcore analytical capability and number crunching..
FTA:

> open borders

also FTA:

> why not charge them more for visas

Someone forgot what "open borders" means.
There isn't a good or bad programmer just various levels of skills.
Second this. More than once I've heard that the best thing a new director can do is learn the current state of things for the first six months. Coming into a team as a new leader and changing things without learning about the team first isn't a good idea. Don't come up with fixes for imaginary, or the wrong, problems.
If there's one lesson to be drawn from Apple's history, it's that first to market is not a good metric for blockbuster success.
That's more a criticism of the standard HTTP server, which is a bit of a black box, apparently intentionally. There's nothing wrong with writing your own server to make up for it's limitations.
Let's take this const map:

const std::map<int, int> constMap = { {1,1}, {2,2 } };

Or take a const map copy-constructed from from a non-const map, if you wish.

How is this not immutable data, and "only provides a read-only view"?

It is linguistically guaranteed to be non-mutating - const-casts excepted of course.

All languages that are constructing const data types on the fly are putting them in a writeable pages in memory, after all.
That is exactly the kind of problem this font wants to solve. Just change the x-height to your taste: https://github.com/be5invis/Iosevka/blob/master/parameters.t...
That's alright if EC2 is all you were using. Past a certain point though, it usually makes sense to begin using managed services like S3, BigQuery, lambda, etc.
If you despise articles like that and hate 95% of HN content, you might be good.
It's interesting that neither China nor Europe is likely to integrate most of them into society.

Islam is not only a religion. It comes integrated with governance structure and laws its adherents need to abide by. The whole belief system is strengthened by 5 times of praying every day and very strong community.

The problem with Islam is not its religion part but the whole structure that resists any integration or adaptation to fit well with other cultures.
If you produce code that works with few or no bugs and is easy for you and your colleagues to maintain and fix, then you're good at programming.

Being a good coder is different from being a rock star coder. In fact, rock star coders can be terrible coders and yet have large followings. Most rock star coders became popular through blogging, tweeting, hacking and/or writing trivial software modules that are widely used. Coders who work on difficult problems don't usually become rock stars.
This whole concept seems like a combination of a desperate wish to be living in a better world and the need to seem interesting at parties. When there's a compelling reason to get such devices you won't have to ask people what they use them for, in the same way that you don't have to ask people why they have a cell phone.
And it being a public service, they generally can't deny you the use of it (at least not 'unqualified', I'm sure there could be some sort of police or court order taken out against people) - but they can specify exactly how you're going to pay for the service.

Also, I'm pretty sure "cancelling" means "forced reissue", not forfeiture of a legitimate ticket or balance.
Yes, especially since the final stage of a game (or even other software) project is the most tedious and stressful.
If you're good at whiteboard programming solving well known interview questions, you're good.

Computer science is a branch of mathematics and it is all about solving problems on whiteboard in front of peers.
BABY BROTHER BY 50 CENT AND NOIRE
Templates don't help C++ build times, but the root problem is that it uses the C model for compilation (several sequential passes).

D compiles faster than Go usually and with templated generics all over its std lib
You should look up proposals for Venusian cloud cities. In many senses Venus is more hospitable than Mars.
Good is relative. Keep improving.

Coding is not enough. Is your code maintainable, interoperable? Did you ship?

What are the priorities of the project? Is your code formally verified not to have bugs? ETH just had such a bug. Has it been tested at scale? Twitter used to have fail whales.

Does your product have a community? Do you manage teammates well?

People live lives, companies build products. Ask yourself, "is my company building a good product?"

To me, someone who is "good" is just someone who has learned the language and main paradigms / tools for it, and can pick up new stuff fast. It's like a native speaker of English who can understand what you're saying and write a book on a new topic that goes over well.

Good means less bugs, maintainable code and playing well with others.
If you have to ask this question, you're not good.
I wrote a plugin for node.js/express that performs basic bot detection and bans bots by IP address until they pay you some Bitcoin:

project: https://github.com/timbowhite/botbouncer

simple demo: http://botbouncer.xyz/

I ran it for awhile on some medium traffic websites that were being heavily scraped. It blocked thousands of IP addresses, but IIRC only received one Bitcoin payment.
You can use cloudfare but it's a small roadblock. I can still crawl that.

Also you can do frontend rendering, it's a bit larger roadblock but you can use phantomJS or something to crawl that.

IIRC there is a php framework that mutate your front end code but I'm not sure if it does it enough to stop a generalized xpath...

Also I used to work for company where they employ people full time for crawling. It will even notified the company if crawler stopped working so they can update their crawler...
And a large nuclear arsenal stationed within its borders as part of the NATO nuclear arms sharing treaty.

Turkey is also in a much more important strategic location than either of those two.
Hardly surreal, that's just my workflow, which works well under Firefox, so I don't see the need to change it. Sometimes, when I reach a few hundred open tabs, I just clean them all up (at a few thousand it was usually becoming slow, so I started to clean up earlier; looks like with the new changes I might be able to reach thousands again)
Alas, too often I see the opposite—good movies without flashy action are called bad and boring :(
Exactly, once you wrap errors with their context, or just at the lowest level wrap it with a stack trace, they become much more useful.
Affordable housing is actually quite scarce inside the city right now, people on average don't really earn that much. The rent controls had no actual effect on price increases. It has been suggested that the rules are simply being ignored and most tenants won't pick a legal fight with their landlords when housing is so scarce:

https://www.welt.de/finanzen/immobilien/article150877146/Die...

There's more than enough housing for higher-income people, so rent control there is moot.
Ask her out.

In the big scheme of things, a person may have several companies but only have one family. The later is of heavier weight.

Some advise if you decide to go in this directiom:

(1) stop bringing up work related frustrations. Ideally, only bring it up once. Discuss it. Close it. As you will be together more often, you may have more oppurtunities to bring up past work frustrations. Don't. Minimize that.

(2) being together more often means you can turn idle time into a business discussion. Leverage that. You can discuss business while stuck in traffic, on a ride home, and so on.

(3) when you two can't agree on a business direction, there are several ways around it. (A) execute two directions separately. See which direction gives better result. Integrate your learnings. Make a new direction. (B) follow the more passionate direction then queue a pivot direction. If the primary direction works out, great. If not, no blame game. Execute the pivot direction fast. Don't get stuck arguing which of you should be followed. It's possible to try two directions at once.

(4) in the far future when a baby comes in, it is highly likely that your significant other will give more attention to the baby than the company. Prepare for this transition.

Best of luck!
Seen yesterday at:
https://news.ycombinator.com/item?id=14826977
I also use S3. I don't see why using Vultr prevents that.
You should read more about proposals for Venusian colonies before assuming that your knowledge of the subject is sufficient for discussion. No one is proposing to live on the surface, and the sulfuric acid is not a particularly large problem.
Go can detect data races as well, not sure it's the reason. Probably performance.
> Another thing I can think of - Go's interface mechanism overhead is usually significant

Yes that's a more likely culprit, interfaces mean dynamic dispatch, outside of hand-rolled codegen I don't think Go can statically dispatch abstractions.
I think you have to work with the language you're in. I had similar frustrations when I first moved into doing some dev in Java and C# and it really bugged me that there was no compile-time guarantee that an Object reference passed as a method parameter would not be modified within that method (as I was so used to using const-refs with in C++)

In retrospect however, I was frustrated with these languages because I was wanting it to be something it wasn't. To my mind, the loss of that feature meant that programs were less expressive - particularly in large codebases - I had to read methods to work out if something was being modified or not.

To complain here about Go lacking immutability and constness features seems to be the same as complaining that it is missing in Python, Ruby or JavaScript. It's a fact that constness isn't a feature of these languages, if you want these features, use a different language.
I'm not sure if I have 100 tabs, but I have a lot. I find it easier than using bookmarks. I have several chromes open, each one with a bunch of tabs. My queen one has but list, API list, work wiki, several tabs for different logs. A couple of forums for third party products we use, bit bucket, maybe a coyote of tabs for third party documentation...
For personal products I might have the skin tab open plus a couple of non admin tabs. I do this for several different sites. And so on... On my Google drive I have easily a dozen open for various documents... It adds up quickly.
Not sure I agree, some people gain confidence in a lag behind skill. But you do have to ask this question to become good.
I don't know what it would do to editor rendering performance, but disabling the `liga` OpenType flag for selections detected as strings would solve the majority of instances of #2

All in all though, this is a purely local dev preference matter - your editor ligature settings never affect the committed code, so neither are really a problem in practice.
No matter where the data comes from, there's so much more validation to be done that types can't handle. Why should validation concerns be split up?
Whistleblowers Win MIT Media Lab Disobedience Award
Cody from Cody's Lab on YouTube did this a while ago.

It was really cool. He's done a few videos on it, including putting it in and taking it out.
My website was on the news a couple of days ago and was doing 2200 concurrent users for a while without breaking a sweat. Cheap hardware. Server-side rendering. Multiple database calls per user to 2 different database clusters.
> If a programmer can’t produce good code, they aren’t a good programmer.

Who cares about good code ? good code doesn't mean anything, the only thing that is important is working code.
If your program works but the code is not "good" people will still use it.

A good programmer is someone who is able to write code that works
Some researchers claim that it helps to create new pathways in the brain which is useful for a lot more stuff.