Better HN
topnewbestaskshowjobs
Log inSign up

sapiogram

922 karma · joined Aug 18, 2014 (12y ago) · 345 submissions

Submissions

comment 2y ago · link · parent

Or alternatively, the vector was created with `Vec::with_capacity()` or `ExactSizeIterator::collect()`, and had the correct capacity all along.

comment 2y ago · link · parent

It doesn't copy the elements if the source vector is already at max capacity, which you can often arrange for beforehand.

comment 2y ago · link · parent

Not sure what problem you think this is solving, but you can do the same in every language ever with a simple semaphore. Number of permits represent the channel buffer size.

comment 2y ago · link · parent

> In fact, technical progress goes exponentially.

Their point was that ARM is also progressing exponentially.

comment 2y ago · link · parent

Nothing necessarily wrong with that code, but it also kinda smells. Why even store it as bfloat16 at all? You risk getting the numerical disadvantages of both float16-representation, and none of the advantages.

comment 2y ago · link · parent

The only true oof thing is him being in the hospital for a month, the rest sounds no worse than any other open source drama.

comment 2y ago · link · parent

Even with your disclaimer, Tiobe is useless, even as a vague indicator of anything. It ranks Prolog as having higher market share than Typescript for christ's sake, stop poisoning your brain with that snakeoil shop.

comment 2y ago · link · parent

> Why it's deemed unsuitable for large, complex, multi-person projects is that enterprise types know only the byzantine OOP mess. And when all you have is OOP, everything is a FactoryFactoryFactory and everything else is "unmanageable".

Have you ever worked in a large, dynamically typed codebase written by other people?

comment 2y ago · link · parent

You mean upgraded to 16MB? Or was it much later?

comment 2y ago · link · parent

> I think Go spent a lot of time implying that goroutines were some sort of special language magic, but I think everybody knows now that they are basically a really good implementation of green threads that can take advantage of some internal knowledge to do optimal scheduling to avoid context switches. It took me a while to work this out, and I got a lot of pushback from the go team when I pointed this out internally.

This comment deeply fascinates me, because I get the same feeling every time I go back and read/watch early Go resources from Rob Pike and others, but I've never actually heard it articulated before. I've always thought that surely they weren't that ignorant about PL theory and history? Or maybe Rob Pike himself was, but surely his team knew better?

It really feels like they thought they were making some special hybrid between threads and coroutines, combining the advantages of both. Like this 2011 talk[1] which demonstrated a classic coroutine code pattern implemented with goroutines and channels. But as time went on, goroutines became fully pre-emptive, and their programming model is now identical to threads. Using them as coroutines only leads to misery (read: data races) in my experience. They're faster than OS threads, sure, but that's an implementation detail at this point.

When do you think they eventually realized they were re-inventing the same green threads Java had created and scrapped 10 years earlier?

[1] https://www.youtube.com/watch?v=HxaD_trXwRE

comment 2y ago · link · parent

> It just goes to show that often the user ((or developer) experience is typically more important than the technical merits of a product.

I think Go still won on technical merits, because it never really competed with other compiled languages, instead mostly converting Python and Java programmers. Compared to those, startup time and memory usage of go programs are leagues ahead, and the quality of the codegen doesn't change that much.

comment 2y ago · link · parent

While those influences are important to Rust's history, they were mostly removed from the language before 1.0, notably green threads and the focus on channels as a core concurrency primitive. Channels still exist as a library in stdlib, but they're infinitely buffered by default, and aren't widely used.

comment 2y ago · link · parent

I totally agree that Go is best suited outside of systems programming, but to me that always seemed like a complete accident - its creators explicitly said their goal was to replace C++. But somehow it completely failed to do so, while simultaneously finding enormous success as a statically typed (and an order of magnitude faster) alternative to Python.

comment 2y ago · link · parent

Might be an issue of software support, it just "feels" easier to have two monitors instead of using one monitor as two.

Related: what's your window management setup?

comment 2y ago · link · parent

This can't be real

comment 2y ago · link · parent

Totally agreed, I always assumed leetcode was primarily used as a proxy for IQ, with the added benefit of testing basic coding competence.

comment 2y ago · link · parent

For sure, competing on costs is GlobalFoundries' entire business model at this point, and it seems to be working well for them. I'm not sure Intel is able to make that transition though, they'd have no choice but to manufacture their CPUs elsewhere to stay competitive. They might as well sell off their foundry business at that point.

comment 2y ago · link · parent

TinyGo is not Go, it's more accurate to see it as a dialect rather than a separate Go implementation imo. Many packages (even the stdlib) don't compile under it, and as I understand it, certain language features involving runtime reflection are likely to never be supported.

comment 2y ago · link · parent

It's not an exact comparison, but at work we have tons of Go apps running in Docker containers with a 50MB memory limit. For lighter workloads, it works just fine.

comment 2y ago · link · parent

Their main motivation seems to be CI, where people often lint the entire repo on every PR.

comment 2y ago · link · parent

Yes, because you lint everything in CI. Otherwise, linter warnings will start creeping into your codebase immediately, and the tool becomes much less useful.

comment 2y ago · link · parent

I do appreciate that he linked previous years' prediction at the bottom. Predictions are still too vague to be falsifiable even with hindsight, but it's a start.

comment 2y ago · link · parent

That doesn't exclude sodium batteries as a factor. Quite the opposite imo, since that technology is also highly speculative.

comment 2y ago · link · parent

Was it <10% at peak price as well?

comment 2y ago · link · parent

I don't find it clickbaity at all. I mean, it makes it sound like the price of lithium dropped massively, but isn't that exactly what happened?

comment 2y ago · link · parent

What?

comment 3y ago · link · parent

Wonderful comment, thank you!

comment 3y ago · link · parent

You won't be able to do much astronomy with a smartphone camera mounted to a cubesat, unfortunately. It would be very cool, but not useful.

comment 3y ago · link · parent

Well, sometimes. God help you if your project needs to use TLS, for instance.

comment 3y ago · link · parent

> You think they let inexperienced developers touch the YT code base without proper code review?

Yes

1
89101112