Readit News logoReadit News
mxz3000 commented on Parsing protobuf at 2+GB/s: how I learned to love tail calls in C (2021)   blog.reverberate.org/2021... · Posted by u/fanf2
aidenn0 · a year ago
It mentions C++ support; it would seem to me that C++ has very few tail-calls. Consider:

  foo()
  {
    auto a = SomeClassWithADestructor();
    return bar(); // This is not a tail-call because the destruction of a happens *after* the call to bar();
  }

mxz3000 · a year ago
If the compiler can prove there isn't action-at-a-distance between those lines (this might be non-trivial), then can't the destructor be called before running bar ? Does the C++ spec necessarily say that destructors are called at the end of the block, compared to, let's say, as soon as the variable is no longer used?
mxz3000 commented on A List of companies that use Array Languages (J, K, APL, q)   github.com/interregna/arr... · Posted by u/tosh
mxz3000 · a year ago
For the experts in this thread: is there any benefit to using these so called array languages compared to using something like numpy (or even pandas/polars) ?
mxz3000 commented on A new map of medieval London   londonist.substack.com/p/... · Posted by u/domh
ggm · 2 years ago
Enormously powerful but also.. enormously confusing and slow to render on a tablet. I think it should all be there but perhaps less could be shown at first? Great to scroll around in but.. laggy
mxz3000 · 2 years ago
renders fine on my 4y old android phone

Dead Comment

mxz3000 commented on Gamers Nexus: Asus Scammed Us [video]   youtube.com/watch?v=7pMrs... · Posted by u/justinclift
lakomen · 2 years ago
I'm never buying Asus again.

Ordered a motherboard from Amazon Germany which was sent from Amazon US. The IPMI card is defective. I contacted Asus support, he was playing on time, I could've replaced the motherboard no questions asked 1 month after purchase, but since Asus support wasted my time now I can't.

Asus support told me to do a RMA, which I did. I would've contacted Asus US, but that wasn't possible, I had to talk to Asus Germany. They said they wanted an invoice. Amazon refuses to give me an invoice. Asus Germany RMA says I should talk to Amazon support. I did. 1st time I have to do a lengthy explanation and the Indian support people promise the world and lie to you, after being reached around a few times. They said that they contacted Asus and that Asus will send me a replacement in 3 days. It never arrived. Next time same story. 3 days, it's 3 months later now and no sign of a replacement.

Idk what to do. Probably go to the police.

mxz3000 · 2 years ago
why didn't you just get Amazon to refund you for the defective product?
mxz3000 commented on PDEP-13: The Pandas Logical Type System   github.com/pandas-dev/pan... · Posted by u/hackandthink
esafak · 2 years ago
Does pola.rs fix all this stuff?
mxz3000 · 2 years ago
mostly yes, at $work we're trying to move away from pandas entirely in favour of polars. Polars is mostly faster, with an API that's actually sane and makes sense. No reason to use pandas nowadays.
mxz3000 commented on SciPy builds for Python 3.12 on Windows are a minor miracle   labs.quansight.org/blog/b... · Posted by u/todsacerdoti
crabbone · 2 years ago
I just want to comment on this:

> Meson was going to refuse to accept the MSVC+gfortran combination

Back in the days, I went to Python's core-dev list and asked why. Why would any sane person ever use MSVC for a cross-platform language runtime. And guess what the answer was? Well... The answer was "Microsoft pays us, gives us servers to run CI on, and that's why we will use Microsoft's tools, goodby!"

For reference, Ruby uses GCC for the same purpose as do plenty of other similar languages for this exact reason.

To give you some context, I ran into this problem when writing bindings to kubectl. For those of you that don't know, in order to interface with Python from Go, one needs CGO, and on MS Windows it means MinGW. You could, in principle, build Python itself with GCC (a.k.a. MinGW) (and that's what MSYS2 a.k.a Cygwin a.k.a. Gitbash does), but this means no ABI compatibility with the garbage distributed from python.org.

So, after I had a proof of concept bindings to kubectl working on Linux, I learned that there will be no way (well, no reasonably simple way) to get that working on Windows. So, the project died. (Btw, there still isn't a good Kubernetes client in Python).

---

On the subject of packaging. I've decided to write my own Wheel packager. Just as a way to learn Ada. This made me read through the "spec" of this format while paying a lot more attention that I ever needed before. And what a dumpster fire this format is... It's insane that this atrocity is used by millions, and so much of critical infrastructure relies on this insanity to function.

It's very sad that these things are only ever discussed by a very small, very biased, and not very smart group of people. But then their decisions affect so many w/o even the baseline knowledge of the decisions made by those few. I feel like Python users should be picking up pitchforks and torches and marching on PyPA (home-)offices and demand change. Alas, most those adversely affected by their work have no idea PyPA exists, forget the details of their work.

mxz3000 · 2 years ago
hindsight is 20/20.

Don't criticise people for making certain decisions years ago when those don't match what you'd choose to do now. Often you'll find that they were very reasonable given the constraints at the time.

Also the spec will have evolved over time with changes that would have been made under constraint of the existing system, which tends to produce things that are not as nice compared to something that was designed from the get-go to support the features. This is something that's seen very often in software engineering, and are probably partly a reason why long-lived codebases tend to be dumpster fires in general.

Calling them 'very biased and not very smart' is not very constructive.

That's not to say that the wheel format isn't a dumpster fire (I'll have to take your word on that), or hasn't morphed into one with time & revisions.

mxz3000 commented on Preview of CLion Nova, which uses the ReSharper C++/Rider C++ language engine   blog.jetbrains.com/clion/... · Posted by u/3dsboy08
dataflow · 2 years ago
> Some teams discourage it because it makes code reviews a little harder

Not just reviews, but anything that involves reading the code (which is frequently usage and maintenance). Swimming in a file where everything is auto is a special kind of hell. It's like having no firm ground to step on.

mxz3000 · 2 years ago
I would expect most people to read code in their IDEs, where small amounts of type inference like this is fine because the IDE tells you what the type is.

I agree that if you spend a lot of time reading code in something like GitHub, not having explicit types is annoying, but seriously, who does that?

mxz3000 commented on Classes vs. structs in .NET: how not to teach about performance   sergeyteplyakov.github.io... · Posted by u/GOPbIHbI4
SideburnsOfDoom · 2 years ago
This is where a well-placed .ToList() is called for, to reify avoid re-evaluating the enumeration.

e.g.

var classes = Names.Select(x => new PersonStruct { Name = x }).ToList();

for (var i = 0; i < classes.Count; i++)

mxz3000 · 2 years ago
I also believe that an IDE like Rider will complain that the IEnumerable returned by `.Select` is consumed multiple times.
mxz3000 commented on Rust Compile Times and Code Graphs   blog.danhhz.com/compile-t... · Posted by u/jldlaughlin
wredue · 2 years ago
2 minutes isn’t even really bad build times.

I think that part of “compile times suck” is that, when we are learning, we are building extremely small programs. Hundreds of lines at the very top end. During this phase of our personal development, we build a habit of writing a line of code, then compiling. Then changing an index, then compiling. Then realize we use a wrong variable, then compile. Then <some other minor thing> then compile.

Somewhere along the way, we get to needing to build thousands or hundreds of thousands of lines, and there’s very frequently no build up to this so our habit of making very minor change and then making the compiler tell us what’s wrong hurts.

mxz3000 · 2 years ago
if you have a reasonably good IDE you don't really need to explicitly compile the whole program outside of when you want to run it.

u/mxz3000

KarmaCake day87September 4, 2019View Original