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…
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…
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…
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…
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:…
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.
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…
> 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"…
> 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…
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…
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.
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.…
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…
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…
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…
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,…
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.
Julia's lambdas look like `x -> f(x,2)`, with no backslashes. The pipe `x |> f` is indeed the same.
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…
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…
Other things are OK too. I quite like that if/elseif/else/end only needs one closing, no other openings. I don't know whether using {} for both types & blocks would be hard to parse, maybe it's possible. I have heard &…
It goes to `literal_pow`, one way to check is to overload this: Base.literal_pow(::typeof(^), x::Int, ::Val{n}) where {n} = (println("power $n"); float(x)^n) pow = -5 2^-5 # yes 2^pow # no, hence an error
It's not so pretty, but what are the alternatives? Making indentation meaningful has downsides (copy-pasting can go very wrong) and using up ascii characters just for this means they can't do other things (like…
I think we're getting there, slowly. Quite a lot of people who don't in any way think of themselves as programmers now reach for python/R/julia for tasks that would once have been done in Excel.…
I guess it could poke you every time you say `strides(A)`? Here's a recent example of an upgrade, from code with stride calculations to a more abstracted version, which is generic to offsets & number of dimensions:…
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…
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…
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…
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…
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:…
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.
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…
> 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"…
> 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…
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…
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.
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.…
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…
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…
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…
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,…
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.
Julia's lambdas look like `x -> f(x,2)`, with no backslashes. The pipe `x |> f` is indeed the same.
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…
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…
Other things are OK too. I quite like that if/elseif/else/end only needs one closing, no other openings. I don't know whether using {} for both types & blocks would be hard to parse, maybe it's possible. I have heard &…
It goes to `literal_pow`, one way to check is to overload this: Base.literal_pow(::typeof(^), x::Int, ::Val{n}) where {n} = (println("power $n"); float(x)^n) pow = -5 2^-5 # yes 2^pow # no, hence an error
It's not so pretty, but what are the alternatives? Making indentation meaningful has downsides (copy-pasting can go very wrong) and using up ascii characters just for this means they can't do other things (like…
I think we're getting there, slowly. Quite a lot of people who don't in any way think of themselves as programmers now reach for python/R/julia for tasks that would once have been done in Excel.…
I guess it could poke you every time you say `strides(A)`? Here's a recent example of an upgrade, from code with stride calculations to a more abstracted version, which is generic to offsets & number of dimensions:…