13,486 karma · joined Jun 1, 2016 (10y ago) · 4,896 submissions
comment 4y ago · link · parent
Really? There's a motor. So it can go faster, accelerate more quickly, and you can go longer distances.
> Penetration would need to be way higher for the business to actually scale.
Why? If you have those 3 cities you're already dealing with 10s of millions of potential customers.
comment 4y ago · link · parent
a) People think Uber is a disgusting company and scooters were associated with that
b) Some people were leaving scooters in bad places and it seemed like companies didn't have a solution to this, which blew (a) up when particularly bad incidents (eg scooter left on muni tracks) would occur
comment 4y ago · link · parent
Electric replacements that are cheap and take care of those commutes would seem to be obviously much better. I don't know about any C level exec saying whatever they said, but I'd need a lot more actual information to believe that.
Further, I can't drive, I will never be able to drive, because my vision is shit. I can bike, I enjoy biking, but I can go way faster on a Lyft bike and a way longer distance, it's just radically more convenient - if I need to get across the city to see a friend it's basically the lyft bike or a car.
comment 4y ago · link · parent
That said, it would be nice if router security wasn't absolute shit and those devs actually gave two shits about it, but I could say that about so many things.
comment 4y ago · link · parent
I think it's more that interop with C++ is hard and ultimately a lot less valuable than interop with C, which is what the vast majority of languages use for FFI.
> It doesn’t matter how “safe” your language is if the first thing you have to do is make a pure C (even losing potential for automatic lifetime management the C++ would allow) interface.
I don't see how that leads to "it doesn't matter"
comment 4y ago · link · parent
I think it was Plato who asked this question - if I take two pieces of clay and smash them together, which piece grew? You can argue all day about it, and it has some fun implications about identity, but that's philosophy.
comment 4y ago · link · parent
Orrrrr, GC pause just means pauses caused by the GC as part of its implementation's work to manage memory.
comment 4y ago · link · parent
shared_ptr and unique_ptr have pretty significant overhead and are common practice, even for optimized codebases, so I wouldn't say it's impossible at all.
comment 4y ago · link · parent
I would not be surprised to find that even a naive mark and sweep collector is faster than naive refcounting on some workloads. One obvious thing to consider is that the work is delayed, you can perform the sweeping 'as needed'. Even the marking doesn't have to run on any deterministic schedule.
The thing is that, from my naive perspective, run of the mill tracing collector algorithms are just way more advanced than your typical refcount. Most refcounting is just that - either an integer, atomic integer, or both, that gets incremented and decremented based on a number of operations applied to the underlying type. The naive approach has no delays.
Tracing GCs on the other hand, although perhaps not naive ones (could you link me info on the quickfit algorithm? I can not find anything online), might contain epochs that bump allocate in the majority of cases. That'll be particularly nice for benchmarks where allocations are likely very short lived and may actually never need to get to the mark/sweep phase. Your algorithm isn't really documented and I just really don't feel like looking at C right now.
Although naive refcounting is very common it's not the only game in town. Depending on the language you can group refcounts together - for example, imagine you have:
(assuming all fields are automatically refcounted) struct Foo { bar: Bar, baz: Baz, }
In theory, a "copy" of this type would involve 3 increments, possibly atomic increments. Each increment would also require a heap pointer dereference, and there would be no locality of those integers behind the pointers. That would be the trivial implementation.
But depending on the language you could actually flatten all of those down to 1 RC. This is language dependent, and it requires understanding how these values can be moved, referenced, etc, at compile time. You could also store all reference counts in tables associated with structures, such that you have locality when you want to read/write to multiple counters. The pointer dereference is going to be brutal so having locality there will be a nice win. I'd be curious to run your benchmarks through valgrind to see how much the refcount is just spending time on memory fetches that get invalidated in the cache immediately.
Anyway, an example of a pretty slick refcounting GC is what Pony built: https://tutorial.ponylang.io/appendices/garbage-collection.h... https://www.ponylang.io/media/papers/OGC.pdf
Pony has different types for: 1. Local, Immutable 2. Local, Mutable 3. Shared, Immutable 4. Shared, Mutable
You can read the paper where they discuss how they track local variables vs shared variables, the implementation of counter tables, etc.
So I guess to summarize:
1. The results make sense, or as much sense as anything. I'd be interested in more details on the algorithms involved and your benchmark methodology.
2. "Naive" tracing GCs are actually pretty advanced, and advanced refcount implementations are pretty scarce.
comment 4y ago · link · parent
In this case, you're using imperative languages to generate declarative policies. Things just aren't black and white.
Importantly, it doesn't really matter. We say "Python is interpreted" because the it gives you the UX of an interpreted language. We say "Pulumi is imperative" because it gives you the UX of an imperative language. Under the hood they do their own thing, but unless you're trying to have a really precise conversation it's usually easiest to stick to those terms.
comment 4y ago · link · parent
I'm not saying Google won't pay out, but I just think there's a lot of reasons why they might not.
comment 4y ago · link · parent
It would be nice to have companies collectively reject FIPS. I realize that that's a pipe dream, but we do it with patents. Lots of companies pool their patents to defend against trolls on the condition that none of those companies sue each other over patent violations.
If a bunch of companies were like "We won't require you to be FIPS, and we won't get FIPS" or something that'd be cool. Unfortunately, that can't happen with FIPS specifically as it's government mandated, but idk, maybe SOC2 or something?
I hate things so much
comment 4y ago · link · parent
Further, Google exited this market. Do they really care about marketing to these people anymore? Their main revenue is non-consensual tracking, it's not like being mad at Google is going to matter unless you really go out of your way because of it.
comment 4y ago · link · parent
That's a really good way of putting it, I'm gonna steal that (irony unintended). It's totally true - when you purchase software or services it's conditional. You have some voucher that can be redeemed at the discretion of the provider, and there are always many ways (EULA violation, company goes away) that the voucher can be negated.
But when you steal something you aren't beholden to anyone. You actually "own" that piece of software in a way more concrete way. Yes, someone could pursue legal charges and force you to remove it, but it's a totally separate system vs the built-in contract between customer/ service.
comment 4y ago · link · parent
Between their inability to provide support while a service is up and their consistent lack of long term vision/ investment for the services they create, it's just not worth it.
I can't imagine I'm the only one making significant financial decisions based on this sort of thought process.
comment 4y ago · link · parent
comment 4y ago · link · parent
Not to mention that it's mostly text and images that get uploaded to these sites. Videos are the worst case. Let's say there are 1 billion facebook accounts, each one uploads 1GB of data (seems huge), and let's assume that compression just cancels out replication.
That's 1,000 petabytes. On S3 that's in the low 6 figures per year, obviously ignoring the exfil/access costs.
That's not that much. Obviously you want to keep some of it "hot" - profile pictures, recently uploaded pictures, etc. Hand waving, assuming 1% of the data needs to stay hot (seems high), that's 10PB of data. Certainly you're in "big data" land but it's not like there aren't databases that'll handle it.
Not to mention FB invests in tech like zstd.
Cold storage is definitely still getting much cheaper. Dropbox SMR drives are pretty crazy: https://dropbox.tech/infrastructure/smr-what-we-learned-in-o...
comment 4y ago · link · parent
Sort of like using Python to generate Typescript, as random example - my Python code doesn't have to typecheck, but its output does, so I can do absurd shit in Python and still feel good about the output.
One example is something like this: https://www.typescriptlang.org/docs/handbook/2/template-lite...
These are types that are built from string templates. Since strings are loose and can be manipulated in crazy ways like appending, we can now manipulate types in the same way. We can write types that are themselves parsers.
So idk if that's good or not, the downside in C++ is that TMP errors are fucking insane, but the upside is that I can have a function that says "pass me something and I'll call "iter" on it and I don't care what that thing is".
It also feelsy kinda more "typey". Types are just values. Types are just strings or numbers or whatever. They're things, with the constraint being that they must exist concretely (or be inferrable) when the type checker runs. No distinction between types and values seems like it's the ideal.