Hacker Newsnew | past | comments | ask | show | jobs | submit | am17an's commentslogin

Use llama.cpp? I get 250 toks/sec on gpt-oss using a 4090, not sure about the mac speeds


Well a 1000 line PR is still not welcome. It puts too much of a burden on the maintainers. Small PRs are the way to go, tests are great too. If you have to submit a big PR, get buy in from a maintainer first that they will review your code.


This has got to be a hell of a story if it's true.


Usually codebases disallow auto because without an IDE it's difficult to see the type. I think this reduces the cognitive load of C++ a bit. The only time it is allowed is getting iterators types from STL containers.

I remember fretting about these rules when reading Scott Meyer's Effective C++11, and then later to realize it's better not to use auto at all. Explicit types are good types


Hard disagree. There are times when nobody, really nobody, cares about a given type. See the example of std::chrono::steady_clock::now over at cppreference.com. There you have

        const auto start = std::chrono::steady_clock::now();
        do_some_work(size);
        const auto end = std::chrono::steady_clock::now();
        const std::chrono::duration<double> diff = end - start;

        std::cout << "diff = " << diff << "; size = " << size << '\n';
Looking up the (current standard's) return type of std::chrono::steady_clock::now() and spelling it out would serve no purpose here.


With 'auto' it is so very verbose. It can be shorter. Let us put "using TP = std::chrono::steady_clock::time_point;" in some header file to be used in many places. Now you can write

  TP start = TP::clock::now();
  do_some_work(size);
  TP end = TP::clock::now();


I prefer to put the `using` in the block where you need the std::chrono code, which keeps it local and tidy. Putting it in a header is declaring a global type and asking for trouble; at least bound it in a namespace or a class.


Some organizations don't like putting using declarations in headers since now you've got a global uniqueness requirement for the name "TP."


You put the using as class member (private) or as local in the function.


how is TP more descriptive than auto here?


I agree, this would be in the same vein as "STL returns a verbose type, it's okay to use auto here because no-one cares"


> Usually codebases disallow auto because without an IDE it's difficult to see the type. I think this reduces the cognitive load of C++ a bit. The only time it is allowed is getting iterators types from STL containers.

Strong agree here. It's not just because it reduces cognitive load, it's because explicit types allows and requires the compiler to check your work.

Even if this isn't a problem when the code is first written, it's a nice safety belt for when someone does a refactor 6-12 months (or even 5+ years) down the road that changes a type. With auto, in the best case you might end up with 100+ lines of unintelligible error messages. In the worst case the compiler just trudges on and you have some subtle semantic breakage that takes weeks or months to chase down.

The only exceptions I like are iterators (whose types are a pita in C++), and lambda types, where you sometimes don't have any other good options because you can't afford the dynamic dispatch of std::function.


Implicit type conversions blow your reasoning out of the water imho

The number of times someone has assigned a return type to int, triggering an implicit conversion.

I'll take "unintelligible compile errors" any day over subtle runtime bugs.


I guess it depends on your code base and whether you find more bugs from return values implicitly changed with the usual arithmetic conversions or from other aspects of C++.

I have not encountered that many issues with the usual arithmetic conversions on return types, at least not in a way that auto would prevent. Clearly your experience is different.

Perhaps we can both agree that it would be nice to force explicit numerical conversions?

You can _almost_ get this by wrapping the arithmetic types in a union with only one member, but that may incur a performance hit, which is often not a viable trade off.

> I'll take "unintelligible compile errors" any day over subtle runtime bugs.

As would the rest of us, but that’s not the choice that auto gives you. auto can cause subtle bugs with class types. It doesn’t necessarily protect you from integer narrowing, either, as you eventually have to give the compiler a concrete non-auto type.


There are unspeakble types, such as lambdas, that are not exactly easy to handle without "auto". How a variable containing local lambda with captures will look without "auto"?


If it captures variables, it is not possible to manually declare the type. You can however hide it in an std::function. But then you probably get some overhead and some heap allocations in real life.


I know Google’s styleguide discourages auto, but other C++ places I’ve worked weren’t scared of it. The type deduction rules usually do what I expect, unless I have a weird pre-C++11 proxy type that somehow hasn’t been updated in the last 14 years.


It depends. If you write your code based on abstractions/class features, does it matter ehat type it is? If I call calculation->execute() I don't care what type of object calculation is as long as it can execute and returns something that'll I'll use later for other purpose. To me auto in this case is something similar to using pointers to a base class, but even more abstract


I agree that auto should be used as little as possible. There are good uses, though. It is okay to use when the type is trivially inferred from the code. What is auto in "auto ptr = std::make_shared<MyNiceType>();". Everybody who knows any C++ knows. Also, lambdas do not have a type that can be written down, so it is okay to use auto for them.

I also prefer not to use auto when getting iterators from STL containers. Often I use a typedef for most STL containers that I use. The one can write MyNiceContainerType::iterator.


Pre LLM agents, a trick that I used was to type in

auto var = FunctionCall(...);

Then, in the IDE, hover over auto to show what the actual type is, and then replace auto with that type. Useful when the type is complicated, or is in some nested namespace.


That's what I still do. Replacing auto with deduced type is one of my favorite clangd code actions.


I use auto everywhere. It makes code a lot more maintainable and easy to reason about in my view.


> Usually codebases disallow auto because without an IDE it's difficult to see the type.

Really? I've never experienced this myself.


All a LLM does is hallucinate, some hallucinations are useful. -someone on the internet


Agree. I confess to having hallucinated through a good portion of my life though (not medicinally, mind you).


Boy are we going to have egg on our faces when we finally all agree that consciousness and qialia are nothing but hallucinations.


It's bad for consumers period. A deal that hampers 40% of global supply shouldn't be a thing, it's predatory. I know DRAM is not a necessity, but considering that PCs are going to be affected means this affects real things like schools and hospitals. There's being smart while making a deal and there's knee-capping the market with your leveraged to the tits business


but where do we draw the line? Would 39% be okay? and who's gonna draw the line and enforce it?


I hope this is not a serious argument. This deal is OOM larger than other deals


The line imo is the amount of DRAM OpenAI actually needs/can use. If they end up piling some of it in a warehouse just so nobody else can use it, lock em up.


Do they actually have the cash to buy all of this RAM? If not then it should be very illegal.


There's no need to make it illegal: it doesn't happen because the companies with the RAM to sell are motivated by profit. The problem is that OpenAI has plenty of money to buy RAM. They raised $40 billion in April.


You’re just talking about putting limits on capitalism. Be careful, that’s blasphemy.


This is one of my favourite problems, I still remember that it has a very real edge case even though I solved it more than 10 years ago. Thank you for the problem!


I'm guessing if you only calculate based on the digits, the probability is going to be slightly different than the real one, because you only have a finite number of plates you can choose from.


I'm glad you enjoyed! It was a real game I played when driving around.


Is your real name also Seth? This is wholesome and hilarious


Yes, the other name in the problem is my sister's name :)


Sounds like the birthday paradox problem. Is it?


Nearly, but not 8 digits of precision worth.


Can you reuse a plate with 500?


The wording seems to strongly imply no; you need two separate plates with 500 on them.


The non-thinking version is the best writer by far. Excited for this one! They really cooked some different from other frontier labs.


Interesting, I have the opposite impression. I want to like it because it's the biggest model I can run at home, but its punchy style and insistence on heavily structured output scream "tryhard AI." I was really hoping that this model would deviate from what I was seeing in their previous release.


what do you mean by "heavily structured output"? i find it generates the most natural-sounding output of any of the LLMs—cuts straight to the answer with natural sounding prose (except when sometimes it decides to use chat-gpt style output with its emoji headings for no reason). I've only used it on kimi.com though, wondering what you're seeing.


Yeah, by "structured" I mean how it wants to do ChatGPT-style output with headings and emoji and lists and stuff. And the punchy style of K2 0905 as shown in the fiction example in the linked article is what I really dislike. K2 Thinking's output in that example seems a lot more natural.

I'd be totally on board if cut straight to the answer with natural sounding prose, as you described, but for whatever reason that has not been my experience.


From what I've heard, Kimi K2 0905 was a major downgrade for writing.

So, when you hear people recommend Kimi K2 for writing, it's likely that they recommend the first release, 0711, and not the 0905 update.


Ohhh, thanks, that's really good to know. I'll have to give that one a shot.


Interesting. As others have noted, it has a cut straight to the point non-psychophantic style that I find exceptionally rich in detailey and impressive. But it sounds like you're saying an earlier version was even better.


Again, it's just what I've heard, but the way I've heard it described is: they must have fine tuned 0905 on way too many ChatGPT traces.


> I find it generates the most natural-sounding output of any of the LLMs

Curious, does it do as well/natural as claude 3.5/3.6 sonnet? That was imo the most "human" an AI has ever sounded. (Gemini 2.5 pro is a distant second, and chatgpt is way behind imo.)


Kimi K2 has a very good model feel. Was made with taste


What is parallel decoding?


Humbert is a bit on the nose, for those who get the Lolita reference.


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

Search: