Hacker News new | past | comments | ask | show | jobs | submit | mhh__'s comments login

Unless you're expecting an LLM to have access to literally all information on earth at all times I find it really hard to care about this particular type of complaint.

My calculator can't conjugate German verbs. That's fine IMO. It's just a tool


Your calculator won't confidently pretend to conjugate German verbs while doing so incorrectly, though.

Yes but a tool for what? When asked a question individuals that don't already have detailed knowledge of a topic are left with no way to tell if the AI generated response is complete bullshit, uselessly superficial, or detailed and on point. The only way to be sure is to then go do the standard search engine grovel looking for authoritative sources.

That's true although I think it not quite the same as freeware in the sense that we can realistically (say) fine tune an open model in ways that don't quite apply to (say) someone sending you a binary

You can do interesting things with executable binaries as well, see WINE :)

memcmp and friends can be a funny one when looking at disasm

Depending on context and optimization settings we might see:

  - Gone entirely
  - A memcmp call has been inlined and turned into a single instruction
  - It's turned into a short loop
  - A loop has been turned into a memcmp call.
FWIW This is also one of the reasons why I think the VM-by-default / JIT way holds dotnet back. I find it very hard to be confident about what the assembly actually looks like, and after that.

Subtly I think it also encourages a "that'll do" mindset up the stack. You're working in an environment where you're not really incentivised to care so some patterns just don't feel like they'd have happened in a more native language.


For what it's worth, I have read .NET JIT disassembly as part of perf work on a couple of occasions. On Windows, at least, Visual Studio enables this seamlessly - if you break inside managed code, you can switch to Disassembly view and see the actual native code corresponding to each line, step through it etc.

> I find it very hard to be confident about what the assembly actually looks like, and after that.

Godbolt is your friend as a DPGO-less baseline. Having JIT is an advantage w.r.t. selecting the best SIMD instruction set.

> Subtly I think it also encourages a "that'll do" mindset up the stack.

What is the basis for this assumption?


> Having JIT is an advantage w.r.t. selecting the best SIMD instruction set.

On paper yes but does anyone really rely on it? multiversioning is easy to do in a aot model too and even then most people don't bother. obviously sometimes its critical.

The more magic you put into the jit also makes it slower, so even though there are _loads_ of things you can do with a good JIT a lot them don't actually happen in practice.

PGO is one of those things. I've never really encountered it in dotnet but it is basically magic in frontend-bound programs like compilers.

> What is the basis for this assumption?

It's not an assumption, it's my impression of the dotnet ecosystem.

I do think also some patterns somewhat related to JITed-ness has led to some patterns (particularly around generics) that mean that common patterns in the language can't actually be expressed statically so one ends up with all kinds of quasi-dynamically typed runtime patterns e.g. dependency injection. But this is more of a design decision that comes from the same place.


> On paper yes but does anyone really rely on it?

Zeroing and copying, all string operations, comparisons like here in the article or inlined, selecting atomics on ARM64, fusing FP conversions and narrow SSE/AVX operations into masked or vpternlog when AVX512VL is available, selecting text search algorithms inside SearchValues<T>, which is what .NET's Regex engine (which is faster than PCRE2-JIT) builds upon, and quite a few places in CoreLib which use the primitive directly. Base64 encoding/decoding, UTF-8 transcoding. The list goes on.

The criticism here is unsubstantiated.

> that mean that common patterns in the language can't actually be expressed statically so one ends up with all kinds of quasi-dynamically typed runtime patterns

This has zero relationship with the underlying compilation model. NativeAOT works just fine and is subject to limitations you've come to expect when using a language based on LLVM (although .NET, save for NativeAOT-LLVM WASM target, does not use it because LLVM is not as good for a language which takes advantage of top-to-bottom GC and type system integration).

I think it is worth understanding what limitations .NET is subject to and what limitations it is not. This sounds a lot like very standard misconceptions you hear from C++ crowd.


> Zeroing and copying, all string operations,

Some of this is isel, some of this is fairly heavy autovec - does it actually do the latter on the fly? I would've thought that for memcpy and so on you'd drag around a hand tuned implementation like everyone else (or do what chrome does and jit a hand-written IR implementation) since its going to be so hot.

Does dotnet have loop autovec now? I can get it to unroll a loop but it seems to fall back to a loop past where N is in simd-heaven territory.


> Some of this is isel

Yes, and it's not constrained by whatever lowest common denominator was chosen at the moment of publishing the application or library.

Anyway

https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...

https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...

https://github.com/dotnet/runtime/blob/main/src/libraries/Sy...

https://github.com/dotnet/runtime/blob/main/src/libraries/Co...

https://godbolt.org/z/MfnWd19n8 (sometimes you get AVX2 cores on Godbolt, sometimes AVX512 so I'm forcing it via NativeAOT for a better example)

Having the runtime pick the optimal instruction set for all the paths above requires exactly zero steps from the user, much like with using DynamicPGO (which is why forms of static PGO are not comparable for the common case).

> autovec

Most performance critical paths which are not explicitly vectorized in C++ or Rust are either very fragile and not autovectorized at all. If you care about performance, it is way better to have good SIMD abstractions. Which is what .NET heavily invests into over (very expensive) loop autovectorization phase. Although at this point it does almost everything else, but there are way more impactful areas of investment. If you care about SIMD - use Vector128/256/512 and/or platform intrinsics instead for much better results.

Although I can't shake off the impression that you are looking for gotchas here and details aren't of particular interest.


And I'm inclined to agree re autovec (fragile or not the code usually isn't that good) but that's to me at least why the JIT aspect isn't particularly attractive i.e. you'd have to do the work anyway, no?

With those flags I still can't seem to get it to do anything particularly interesting to a fixed length memset (e.g. at small N I would expect to see SSE instructions at least)

It looks like you haven't read my messages nor looked at the links.

Isn't it also true that Apple have dozens of different scm / developer platforms scattered around the company? e.g. some teams use gitlab, others phabricator etc etc

I think so as I just saw this on their jobs website:

> We are seeking an experienced Software Architect specialized in source control systems to join our dynamic team. The ideal candidate will have expertise in designing, implementing, and managing systems like GitHub, GitLab, Perforce, Bitbucket, and Artifactory.


Almost certainly yes because Apple acquires a lot of companies.

Many of which take time to be migrated into the mothership.


I do care about the environment but at the moment I'm watching Britain (i.e. home, there are many like it but this one is mine) basically sacrifice itself at the alter of net zero while India proudly announces that it's extracted a _billion_ tons of coal this year.

Energy is expensive and unreliable. Why? Well, its either because we aren't doing enough net zero, or because we have an _enormous_ supply-side restriction enforced by the state. Not all of which is due to environmentalism, to be clear.

I remember having conversations with "serious" adults when I was 14 about why it was mad to bet the house on wind and solar (Nuclear was very uncool at the time). Lo and behold a decade later, we really, really, need that baseload.

There are no energy-poor rich countries.

Some are completely happy being poorer and colder but I think something will snap soon in Britain in particular. Blair will have Ed Miliband disapeared soon.


> (Nuclear was very uncool at the time). Lo and behold a decade later

Over that decade, the UK's one nuclear reactor under construction has gone from site approval to .. still not finished.

https://en.wikipedia.org/wiki/Hinkley_Point_C_nuclear_power_...

Mind you, quite a lot of the no-progress-on-anything can be blamed on Britain's NIMBYs and press. People want electricity but hate pylons; what can you do?


> Energy is expensive and unreliable. Why? Well, its either because we aren't doing enough net zero, or because we have an _enormous_ supply-side restriction enforced by the state. Not all of which is due to environmentalism, to be clear.

I work in the energy sector and there's a huge amount of misinformation/confusion around why energy is expensive (I'm gonna ignore unreliable because that's a whole other can of worms). The energy price is almost entirely set by natural gas, the UK doesn't yet have the ability to turn away natural gas as a source, meaning it basically has to pay whatever's asked.

Even if you don't care about the environment (although I think you should!) and just want cheap energy, more renewable energy and flexibility in the market is exactly what you're looking for. You can actually see this on charts super clearly. Take a look on https://grid.iamkate.com/ specically at the energy mixup and the wholesale energy cost. You'll see that the amount of gas being used is an inverted graph of the cost (i.e. when we're using gas as a nation, that's driving up the price, when we don't have to, energy is a lot cheaper, and sometimes negatively priced)


Of course it does, if the wind doesn't blow what else can we burn?

You don't have to burn anything. You can store energy and release it later with batteries and hydraulic pumps (maybe not enough to take ypu all the way just yet, but a lot further than where we currently are).

Although, if you do want to burn something, you can burn biofuel (basically wood). The UK's only company that does this, Drax, are really not great ecologically, but just focusing on cost, diversifying from gas to a mix with more biofuel would have huge benefits.


An interesting secondary meaning of "design by committee", the reason why what you mention happens, is "design in committee".

People can skip the usual lifecycle and feedback for an idea by presenting jumping directly to committee stage./


That isn't really what the math people are doing. Pricing is easy.


Notebooks: just use Marimo. They've fixed python notebooks.


The difference might be that Google isn't run by a founder.


My hot take is that 3D plotting feels bad because 3D plots are bad. You can usually find some alternative way of representing the data


I work on solving 3D problems: numerical methods for PDEs in R^3, computational geometry, computational mechanics, graphics, etc. Being able to make nice 3D plots is super important for this. I agree it's not always necessary, and when a 2D plot suffices, that's the way to go, but that doesn't obviate my need for 3D plots.


3D plots might be neat if there was some widespread way of displaying them. Unfortunately we can only make 2D projections of 3D plots on our computer screens and pieces of paper.

Maybe VR will change that at some point. :shrug:


This is the correct take. There are almost always better ways to plot three dimensional data than trying to project 3D geometry to 2D.


Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: