Readit News logoReadit News
hexane360 commented on Python as a second language empathy (2018)   ballingt.com/python-secon... · Posted by u/luu
MrJohz · a year ago
> Java has primitive types, for which it is a copy. But it's more accurate IMO to attribute this as a property of names, rather than a property of assignment. Python's names (and most Java values, and some C# values) have reference semantics. Having understood that properly, saying that Python (like Java) is "pass by assignment" then just follows naturally, and all the usual confusion around this point vanishes. Passing an argument to a function is simply assigning it to the corresponding parameter. (C++'s idea of "references" in the type system is far more complex IMO - e.g. https://langdev.stackexchange.com/q/3798/_/3807#3807 .)

I use pass-by-label for this term, after a visual demonstration of variables that showed them as labels that attach to different values/objects. But I like "pass-by-assignment" a lot — it gives the correct intuition that whatever is happening when I do `x = 5` is also happening when I do `def func(x): pass; func(5)`.

hexane360 · a year ago
Well, except in the case of variable shadowing.
hexane360 commented on Build your own SQLite, Part 4: reading tables metadata   blog.sylver.dev/build-you... · Posted by u/thunderbong
geodel · a year ago
Surprise, that author of blog and submitter here did not mention In Rust as part of title.
hexane360 · a year ago
Signs we may be reaching the Plateau of Productivity
hexane360 commented on Entropy of a Large Language Model output   nikkin.dev/blog/llm-entro... · Posted by u/woodglyst
cbzbc · a year ago
Sorry, which particular part of that paper are you linking to, the graph at the top of that page doesn't seem to link to your comment?
hexane360 · a year ago
Fig. 8, where the model becomes poorly calibrated in terms of text prediction (Answers are "flattened" so that many answers appear equally probable, but below the best answer)
hexane360 commented on One of my papers got declined today   mathstodon.xyz/@tao/11372... · Posted by u/GavCo
aj7 · a year ago
In subfields of physics, and I suspect math, the submitter is never anonymous. These people talk at conferences, have a list of previous works, etc., and fields are highly specialized. So the reviewer knows with 50-95% certainty who he is reviewing.
hexane360 · a year ago
In many subfields, the submitter isn't even attempted to be hidden from the reviewers. Usually, even the reviewers can be guessed with high accuracy by the submitters
hexane360 commented on Energy is frame-dependent, infrastructure of energy is frame-independent (2020)   noswampcoolers.blogspot.c... · Posted by u/leonry
behnamoh · a year ago
latex doesn't load
hexane360 · a year ago
It's MathJax, do you have javascript enabled?
hexane360 commented on Scientific computing with confidence using typed dimensions   laurentrdc.xyz/posts/type... · Posted by u/g0xA52A2A
antononcube · a year ago
Wolfram Language (aka Mathematica) is the best for doing scientific computing with physical unit dimensions.

See: https://reference.wolfram.com/language/guide/Units.html

> The units framework [of Wolfram Language] integrates seamlessly with visualization, numeric and algebraic computation functions. It also supports dimensional analysis, as well as purely symbolic operations on quantities.

hexane360 · a year ago
Note that Mathematica units impose a very large runtime penalty, making them unsuitable for a lot of applications
hexane360 commented on Unusual Raku Features   buttondown.com/hillelwayn... · Posted by u/leontrolski
klibertp · a year ago
I think this is the closest equivalent for hyper: https://groovy-lang.org/operators.html#_spread_operator
hexane360 · a year ago
It's also quite similar to Thread and MapThread in Mathematica
hexane360 commented on Approximating sum types in Python with Pydantic   blog.yossarian.net/2024/0... · Posted by u/woodruffw
hexane360 · 2 years ago
As an alternative to Pydantic, check out the wonderful mashumaro: https://github.com/Fatal1ty/mashumaro

I've also played around with writing my own dataclass/data conversion library: https://github.com/hexane360/pane

hexane360 commented on Boeing Starliner launches first crewed mission   bbc.co.uk/news/live/world... · Posted by u/helsinkiandrew
nordsieck · 2 years ago
> Planes and helicopters do not have the ability to safely eject passengers mid-flight. We largely accept these conditions as a risk of those modes of travel. Why is LES/LAS a unique requirement for space shuttles?

That's a fair point, although my understanding is that parachute systems for small planes are becoming more common.

My view is that flight rate is the fundamental issue at hand. Airplanes and helicoptors fly many orders of magnitude more than these capsules, which means we know they are many orders of magnitude more reliable.

They've also generally been through a long process of refinement - the original airplanes were extremely dangerous compared to modern variants.

Additionally, aircraft can afford to have a lot higher margin of safety baked in to them. Because of how high gravity is on Earth and the nature of the Rocket Equation[1], it's just not possible to have a lot of margin in rockets of capsules. They need to be extremely svelt to launch at all.

And lastly, we have experience with human spacecraft without an LES/LAS - it was the Space Shuttle. And it killed 14 people - easily the most dangerous spacecraft ever created. No one has any desire to build on that particular legacy.

---

1. https://en.wikipedia.org/wiki/Tsiolkovsky_rocket_equation

hexane360 · 2 years ago
Also worth noting that test pilots of experimental aircraft generally wear parachutes, at least for higher risk tests. This includes tests of commercial aircraft.
hexane360 commented on Generate an OpenSCAD case template from a KiCAD PCB   sr.ht/~martijnbraam/turbo... · Posted by u/RobertJaTomsons
tombert · 2 years ago
I found that I didn't really do that once I forced myself to avoid hard-coding numbers entirely. If I only defined variables, and defined variables in terms of other variables, I almost never had to do lots of x-y-z shifting.

Not sure what your workflow is or what you're building so of course what you're doing might be more complicated than what I did, or not lend itself to that, but I've managed to avoid headaches like that.

hexane360 · 2 years ago
This plus make a lot of sketches describing what each variable is physically, and use geometry to derive dependent dimensions.

Libraries like BOSL2 help with placement/attachment of features: https://github.com/BelfrySCAD/BOSL2

u/hexane360

KarmaCake day1385May 19, 2016View Original