Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)TE
Posts
0
Comments
668
Joined
2 yr. ago

  • the highest possible value for a product

    How do you calculate this?

    the amount of people who has the product - the amount of people who want the product

    As demand increases, the value increases, but at some point when demand exceeds supply (which is common), the opposite happens: the magnitude of the value starts to decrease (though that value is now negative).

    For example, two sellers sell a product, and four people want it. Let maximum value be v_m. Value is calculated to be v_m / (2 - 4) = -v_m / 2. If two more people want it suddenly (so 6 now), it becomes v_m / (2 - 6) = -v_m / 4, which has a lower magnitude despite the higher demand and static supply. This is contrary to how supply and demand actually work, where value generally increases as demand increases (if supply remains static).

    Maybe value means something differently to me than it does to you though. Ideally supply would always equal demand (which makes your denominator 0, breaking the equation entirely since that would be undefined), but that would be really difficult to control.

  • Not really, no. Assuming that all currencies are going down the toilet and your software is supposed to sidestep it in some manner, then all you're really introducing is basically an exchange for a new system of currencies. You end up in the same place in the theoretical future where barter is the main method of trading.

    On the other hand, if you're doing this just for fun, then there's nothing wrong with that, and introducing it that way might get you a better reception. But this is not the future of trade, just a niche tool that some might find useful, which is perfectly fine.

  • This would still be true in a barter system.

    You give your bank 2 chickens. Your account now has 2 chickens. To save people the effort of transporting chickens, you give someone an IOU (bank note) equivalent to 2 chickens, and they do the same for your gas or whatever. Now you have a system of currency and a method of exchanging each currency (chickens, gas, cows, etc) for each other.

    Software is created on this system of currency, and defines conversion rates between each currency. Software defines the value of products relative to each other now.

  • I generally just subscribe to communities that have fun things I'm interested in so that generally remains devoid of politics. Before switching to posts across Beehaw though, I do a mental check on if I'm ready to see how the world is ending today.

    Some days I only stick to subscribed stuff just because I need a break from all that. I'd recommend this approach: subscribe to fun communities across whatever instances have them, and stick to that when you need a break.

  • Depends on what you need to match. Regex is just another programming language. It's more declarative than traditional languages though (it's basically pattern matching).

    Pattern matching is something I already do a lot of in my code, so regexes aren't that much different.

    Regardless, the syntax sucks. It takes some time to get familiar with it, but once you get past that, it's really simple.

  • .NET is more of a runtime and SDKs than a framework, despite the terrible naming of .NET Framework (which is now an obsolete runtime anyway, new naming is just .NET).

    ASP.NET Core (which also is named after the now obsolete .NET Core runtime hilariously) would be closer to the other listed frameworks.

  • If you don’t leave a voicemail, I assume it wasn’t important.

    I get asked sometimes when I don't leave a voicemail why I didn't. It's because I don't really care if you call back. I called because of something urgent, but not important. Just text me instead.

  • The distribution is super important here too. Hashing any value to zero (or h(x) = 0) is valid, but a terrible distribution. The challenge is getting real-world values hashed in a mostly uniform distribution to avoid collisions where possible.

    Still, the contents of the article are useful even outside of hashing. It should just disclaim that the width of the output isn't the only thing important in a hash function.

  • Because you created a first draft. Your first draft should include all that info. It isn't writing the whole doc for you lol, just making minor edits to turn it from notes into prose.

    Without that? No clue, good luck. They can usually read source files to put something together, but that's unreliable.

  • This would infuriate me to no end. It's literally the definition of a data race. All data between threads needs to either be accessed through synchronization primitives (mutexes, atomic access, etc) or needs to be immutable. For the most part, this should include fds, though concurrent writes to stderr might be less of an issue (still a good idea to lock/buffer it and stdout though to avoid garbled output).

  • The main value I found from Copilot in vscode back when it first released was its ability to recognize and continue patterns in code (like in assets, or where you might have a bunch of similar but slightly different fields in a type that are all initialized mostly the same).

    I don't use it anymore though because I found the suggestions to be annoying and distracting most of the time and got tired of hitting escape. It also got in the way of standard intellisense when all I needed was to fill in a method name. It took my focus away from thinking about the code because it would generate plausible looking lines of code and my thinking would get pulled in that direction as a result.

    With "agents" (whatever that term means these days), the article describes my feelings exactly. I spend the same amount of time verifying a solution as I would just creating the solution myself. The difference is I fully understand my own code, but I can't reach that same understanding of generated code as fast because I didn't think about writing it or how that code will solve my problem.

    Also, asking an LLM about the generated code is about as reliable as you'd expect on average, and I need it to be 100% reliable (or extremely close) if I'm going to use it to explain anything to me at all.

    Where I found these "agents" to be the most useful is expanding on documentation (markdown files and such). Create a first draft and ask it to clean it up. It still takes effort to review that it didn't start BSing something, but as long as what it generates is small and it's just editing an existing file, it's usually not too bad.

  • This depends. Many languages support 1 liner aliases, whether that's using/typedef in C++, type in Rust, Python, and TS, etc.

    In other languages, it may be more difficult and not worth it, though this particular example should just use a duration type instead.

  • Ah yes, one of the major questions of software development: to comment, or not to comment? This is almost as big of a question as tabs vs spaces at this point.

    Personally? I don't really care. Make the code readable to whoever needs to be able to read it. If you're working on a team, set the standard with your team. No answer is the universally correct one, nor is any answer going to be eternally the correct one.

    Regardless of whether code comments should or shouldn't exist, I'm of the opinion that doc comments should exist for functions at the very minimum. Describe preconditions, postconditions, the expected parameters (and types if needed), etc. I hate seeing undocumented **kwargs in a function, and I'll almost always block a PR on my team if I see one where the valid arguments there are not blatantly obvious from context.

  • Carjacking is going to mean something completely different with those Samsung car robots out in the wild.

    Also, imagine going home after a vacation and your house is just gone. (Yes I can see that they prepared the ground first, and I think your neighbor's house driving down the street would raise some flags)

    But seriously, this is really impressive. Great job Samsung and Shanghai Construction No 2!