HackerTrans
TopNewTrendsCommentsPastAskShowJobs

improbable22

no profile record

comments

improbable22
·5 वर्ष पहले·discuss
OK, I thought you were advocating zero based on complicated index calculations for some algorithm, with mod & div, which is what I was trying to say could be abstracted away. The literal syntax `a=[1,2,3]` makes a one-dimensional `Array{Int,1}` whose first element is indeed `a[1]`. (`b` is an array of arrays, while `c = [1 2 3; 4 5 6]` is an honest 2-dimensional array.)
improbable22
·5 वर्ष पहले·discuss
Maybe less readable than I remembered, sorry! But these `CartesianIndex` things are how you index multi-dimensional arrays.

If by indexing you only mean adding offsets to pointers with your bare hands, this is possible but discouraged. Because you'll produce a buggier and less general version of exactly what already exists. In this case, reversing an N-dimensional array, along any M of its axes, with arbitrary offsets -- there are a lot of ways to get that wrong.
improbable22
·5 वर्ष पहले·discuss
That's not so obvious, the abstractions for multi-dimensional indexing are better than (I think) you're imagining.

Here's a nice recent example: a new reverse!(A; dims) function, which is fast and works on arrays with any number of dimensions. And is completely indifferent to where the indices start:

https://github.com/JuliaLang/julia/pull/37367/files#diff-eb9...
improbable22
·5 वर्ष पहले·discuss
My parents did it the unofficial way, put in 5-10 trees along the road, over a few weekends, with the same style of concrete surrounding that the city used. They are huge now, and nobody ever questioned how they got there. Not 50-years huge, and a faster-growing species than oak, but still a big improvement.
improbable22
·5 वर्ष पहले·discuss
Time is a continuous variable, and kids know this pretty early on: they will happily tell you they are 5 and a half years old. Their second year starts when they are aged 1.0.

English in general makes this distinction: "He is fewer than 6 years old" is simply a mistake, while "less than 6 years old" is fine. (I think some dialects use "fewer" less often, in general, but would be pretty surprised if any prefer it here.)
improbable22
·5 वर्ष पहले·discuss
If you ask kids how old they are, you will often get "5 and a half" etc. They are, correctly, thinking of time as a continuous variable. You "turn 1" when your age reaches 1.0.
improbable22
·5 वर्ष पहले·discuss
If "any language" means "any language sufficiently low-level to have C-like pointers", then no contest!

Surely the point of any language at all is to abstract away some details of the underlying hardware. Both for portability and to make things easier for human brains. How much you should abstract away obviously varies, based on what you're trying to do, and on how varied the hardware is.

And it depends on how much computation & memory you can give your compiler. One reason new languages can have nicer abstractions is that they don't have to compile on 1970s hardware.
improbable22
·5 वर्ष पहले·discuss
> is a general concept that by definition is part of any language featuring mutation.

One counter-example is Mathematica. I can mutate any object any time I like, and doing so is extremely common. Yet under "pointer" its help tells me about some unicode symbols, and some GUI stuff about mouse pointers.

In reality, some of its lists are dense memory like C, some contain arbitrary objects (such as expressions, or high-precision numbers), but these implementation details aren't part of the language, and most users never know them.
improbable22
·6 वर्ष पहले·discuss
> Most of the aerial imagery used in Europe for improving OSM is shot from planes

Yes I know, and not just Europe. But my comment there was specifically about contours, i.e. height data from SRTM. I'm not aware of any project to crowd-source stereo-pair contour drawing, but if you know of one, I'd be interested to have a link.
improbable22
·6 वर्ष पहले·discuss
It depends a lot where you go. In places like Nepal OSM is often better than any map you can buy. In the Europe and especially the US, it's not as detailed as the national maps. They usually also have much better contours (drawn from aerial photos not from the space shuttle).

But still much better than Google maps, which seems very much for cars (at least outside of cities).
improbable22
·6 वर्ष पहले·discuss
MapOut is great. Does one thing but does it very well, without distractions. Has contours (and a 3D presentation) unlike some OSM-based apps. Works well offline. No subscription nonsense, just a few dollars up front.
improbable22
·6 वर्ष पहले·discuss
Some of them make downloading more of a hurdle than others, insisting that you download a whole country, or figure out what region you want.

On MapOut at least, you zoom in too far & then click the tile you don't have. On a good network there's a little more friction than on (say) google maps, but not so bad. A few MB, never hundreds of MB.

(And on a bad to nonexistent network, it's golden to be absolutely sure that it still has what you looked at yesterday.)
improbable22
·6 वर्ष पहले·discuss
If there's a time at which the stars are born, then there's no paradox. Non-star things can stay cold for the same reason comets stay cold in our universe: they can radiate heat in almost all directions (into the black sky) and receive heat from only a few (like the sun on a brief swingpast, still only < 1% of the sky).

But if the stars have been there forever, the comet is effectively in an oven of uniform temperature. The equilibrium state at which it radiates heat as fast as it gets it has the comet's surface the same temperature as the rest of the oven. So it glows.
improbable22
·6 वर्ष पहले·discuss
It's not arbitrary at all, at least in my dialect. "He went to hospital" and "he went to the hospital" mean different things. The first implies that he was a patient, he was there for the purpose for which the hospital exists, the second implies he went to that location for some other reason (such as bringing flowers, or working there).

Likewise "went to school" (as a scoolchild) vs "went to the school" (to collect someone, or to teach). "At university" (a student) vs "at the university" (physical location, for any reason). "Went to prison" (as a criminal) vs. "went to the prison" (to visit his brother, or to fix their telephones). "Does she go to church?" (to church services) vs. "did you go to the church?" (to see the stained glass).

"Go to the doctor" is a bit different, the doctor isn't an institution, he's a person. Although I think that implies you went for medical reasons, if you stopped by to pick up some paperwork, you might say "I have to stop at the doctor's" i.e. his rooms. But maybe that's also because you would probably talk to the receptionist anyway. But "went to the barber" implies you had a shave, while you might "stop at the barber's" to pick someone up.
improbable22
·6 वर्ष पहले·discuss
The discreteness is a distraction here. You are interested in the total flux of light, from all stars in some patch of the sky. If some of them contribute on average less than one photon, that doesn't matter, it doesn't cause some sudden drop-off in intensity.

If it did, the same thing would happen not just for stars, but for all sorts of things. If you position a computer screen on a hiltop far enough away that, on a dark night, you can just make out whether it's on or off, then your eyes are getting about 6 photons per second. It doesn't matter whether these come from a million separate pixels, or from one light-bulb of similar total brightness.
improbable22
·6 वर्ष पहले·discuss
Yes, a spatially infinite universe, with no expansion, but finite time since the stars all turned on, doesn't have this paradox. I think people didn't like this answer because it needs a beginning of time (or at least, of time with stars).

Having expansion just-about implies there must be such a time. Because if you run it backwards, eventually the stars will all be touching each other, and clearly can't then behave exactly like stars do -- something else must have been going on.

Our modern answer does have such a time, and expansion. And the answer for why no stars shine before some time is that they took a while to condense into dense clumps from the initially quite smooth hot gas. What you see in the gaps between them is precisely this hot gas, at the moment it first became transparent to light, this is the microwave background radiation.

In their scenario of infinite time, matter which isn't lit up doesn't help. It would, like your eyeball, get the light of the stars from all directions, and would soon equilibrate to the same temperature as these surfaces.
improbable22
·6 वर्ष पहले·discuss
But I think there are some exceptions for communicable diseases, which they will treat without attempting to bill you. I doubt vaccination would fall under that but don't really know.
improbable22
·6 वर्ष पहले·discuss
Julia's lambdas look like `x -> f(x,2)`, with no backslashes.

The pipe `x |> f` is indeed the same.
improbable22
·6 वर्ष पहले·discuss
You might also like "marp", which works as a VS Code plugin for markdown. Much simpler & less control than Beamer, but does allow equations (which it seems the linked presenta.cc does not, or not yet) and a bit more off-line focused perhaps?
improbable22
·6 वर्ष पहले·discuss
There's some truth in this. I think many of its enthusiasts aren't jaded multi-lingual programmers evaluating a new tool among many. They had some other problem they care about, for which Cython/Numba or whatever was obviously an awful kludge, and eventually they got tired of fighting it & looked around. And then discovered that this new tool they found was a beautiful thing in its own right, and they want to tell people.