Better HN
topnewbestaskshowjobs
Log inSign up

improbable22

677 karma · joined Jan 8, 2017 (9y ago) · 329 submissions

Submissions

comment 7y ago · link · parent

Many modern buildings are indeed wasteful, maybe they could use half the AC. But comparing to traditional buildings which were grand public spaces may be a bit misleading -- that mosque in Cairo may well occupy the space of 100 apartments, and provide cool shady space where the occupants of 10 of them can sit, and zero bedrooms.

comment 7y ago · link · parent

If your AC is producing 25-degree air, it'll be quite dry, which London is not. (But Harare is, I believe.) That said 25 should still be fine, but there are days which are 30 & humid, which are pretty uncomfortable. Not so many, but more than 1% I think.

Most buildings there are also designed much more for winter. The windows seal well but often don't open that wide, and there will be a fire door making sure you can't get cross-ventilation, etc.

comment 7y ago · link · parent

No, I think you should simply download the ordinary version. Jupyter, Juno, etc. are easy enough to install locally. I forget the precise details, but I think JuliaPro comes with certain versions of packages, and it's less confusing just to get the latest of what you need (using the built-in package manager).

JuliaBox (and https://nextjournal.com/) are cloud services, but if you have a real computer and want to do this for more than a few minutes, just install it. (There's also no need for virtualenv etc.)

comment 7y ago · link · parent

One more advantage to these libraries being written in Julia is that, if they are almost do what you need but not quite, it's often pretty easy to reach inside and patch the function which needs changing. You already speak the language and don't need to stop the world to do this. The barrier to doing this to (say) numpy is just much higher.

comment 7y ago · link · parent

While this probably isn't a practical way to do any real work, running it with --compile=min gives some idea what might be possible soon:

    $ julia --compile=min -e '@time (using GR; plot(rand(20)))'
      0.375836 seconds (368.83 k allocations: 20.190 MiB, 1.65% gc time)
    $ julia --compile=min -e '@time (using Plots; plot(rand(20)))'
      4.302867 seconds (6.41 M allocations: 371.485 MiB, 5.07% gc time)

comment 7y ago · link · parent

The default Array does not have a size as part of its type. There's a package StaticArrays which does this, typically faster below about 100 elements. But this isn't useful for catching mistakes before you run it, obviously.

Plotting is indeed slower than ideal, have not used Gadfly but Plots is more like 15s after restarting, then 10ms each time after. GR is faster, 5s or so the first.

comment 7y ago · link · parent

> will break naive min/max calculations which start accumulator with +/-inf.

Wouldn't the equivalent pattern just be to start at +/- typemax(Posit) or whatever? As you would for integers, which lack infinity.

comment 7y ago · link · parent

Like I said, what's most readable is problem-dependent. Sometimes it's about modular arithmetic, but sometimes it's about not having to say Γ(n+1) too often.

The number line concerns real numbers, not elements.

comment 7y ago · link · parent

Ever heard someone talk about their zeroth kid, without making a programming joke? English counts objects one two three. I've never heard of a natural language doing otherwise, we would surely translate what they say when pointing at two apples as "two".

Mathematicians of course label objects however suits the problem at hand. It's extremely common to write say c_0 + c_1 x + c_2 x^2 + ... for a taylor series starting with a constant, or start at -1 or -n if that's tidier.

comment 7y ago · link · parent

Indeed, and for a little longer than 12 years!

Flipping through a few of his notebooks, I guess he's from the part of academia that was core Matlab-land, engineering-style number-crunching. Mathematica is mostly people doing symbolic things, and people doing lots of stats are yet another story.

comment 7y ago · link · parent

You should think that the cost is basically per floor area. The cars are already as light as they are willing to go (for crash safety etc). The minimum acceptable space gets you to a price that a trainload of people per day can afford.

The beds with their own screens look nicer than the ones in trains I've taken (and at comparable density) and far far nicer than anything in the air I've ever had. (Also nicer than the airport lounges I've slept in between flights...) There are also private cabins which I'm sure cost double.

comment 7y ago · link · parent

Indeed it's subsidised, IIRC "about half" is a decent ballpark figure. This is worth bearing in mind when people complain about Ryanair getting not-full-price landing spots, not paying road tax, or whatever.

Tourists pay 25% VAT on everything, so it's not like they pay no taxes. I think literally having to prove residence (or citizenship? or tax-residence?) sounds like the sort of bureaucratic hell I'd rather not encounter at the ticket machine. But note that some countries find a way, e.g. Switzerland has 50% discount cards which are far too expensive to make sense for tourists, but make it cheaper for locals.

City transport is a different game, and harder to calculate down to individual levels -- you need all those 10%-full 11pm trams so that people can get home, on some days.

comment 7y ago · link · parent

Yes to all this.

I also wonder whether cars ought to have something less loud than the horn, for communicating with people who aren't encased in metal. Like trams (many places) have a little bell.

comment 7y ago · link · parent

Anyone else used the wired ones like TFA, or the numerkeyless variant? Presumably these are simpler to get right than bluetooth (which I presume you're describing).

comment 7y ago · link · parent

You can buy spreads which are just hazelnuts and chocolate. But they cost several times as much as nutella, unsurprisingly.

comment 7y ago · link · parent

LyX is also structured in the sense you describe.

But somehow I never realised that TeXmacs is actually not TeX at all, I assumed it was another front-end. How on earth did it get such a confusing name?

comment 7y ago · link · parent

I guess "easier" is a relative term; welding something together in your garage is never going to be as easy & efficient as buying the Toyota... but what the binding constraints on the field's progress are I don't claim to know.

But since you seem to understand the paper a bit, may I ask: I thought convolution was done by FFT, shaving N^2 to NlogN and all that. Are these automated compilers they discuss smart enough to find that, or are they literally re-arranging (1)? Or is it all so memory-bound that this question makes no sense?

comment 7y ago · link · parent

A related fun fact, when slicing several dimensions:

    >>> a = np.arange(9).reshape(3,3) # a matrix
    >>> a[0:3,0:3]          # ranges are treated independently
    array([[0, 1, 2],
           [3, 4, 5],
           [6, 7, 8]])
    >>> a[[0,1,2],[0,1,2]]  # but arrays are treated at once
    array([0, 4, 8])

comment 7y ago · link · parent

A warning sign that your faith in 0-based indexing may be faltering -- catching yourself writing comments like this :)

    # element at the top right. i.e. (1, 2) aka (0, 1) in python
    A[0, 0] * B[0, 1] + A[0, 1] * B[1, 1]

comment 7y ago · link · parent

There is this, though shorter: https://julia.guide/broadcasting

comment 7y ago · link · parent

It would be great if it were quicker. But right now, interactive use is pretty good, like 5ms for a simple plot. It's calling julia from the command line, and thus starting cold, which is more than 5s.

comment 7y ago · link · parent

I thought it had got better, but also I've just adjusted to work around it. Here are some timings today, Julia 1.1, cold start to first plot:

    $ julia -e '@time (using GR; plot(rand(20)))'
      3.931433 seconds (10.38 M allocations: 521.292 MiB, 6.44% gc time)
    $ julia -e '@time (using Plots; plot(rand(20)))'
     19.498644 seconds (57.26 M allocations: 2.844 GiB, 8.07% gc time)
Running with less compilation:

    $ julia --compile=min -e '@time (using GR; plot(rand(20)))'
      0.375836 seconds (368.83 k allocations: 20.190 MiB, 1.65% gc time)
    $ julia --compile=min -e '@time (using Plots; plot(rand(20)))'
      4.302867 seconds (6.41 M allocations: 371.485 MiB, 5.07% gc time)
But, as you say, it's much much quicker once started, like 1-5ms per plot.

comment 7y ago · link · parent

There are indeed frustrating lags due to JIT, but they have got better lately & are being worked on -- if I understand right this is now one of the priorities, after focusing on getting the breaking changes done before 1.0.

Here's how long a vector of 5 random numbers takes, after a cold start, on 1.1:

    $ julia -e '@time rand(5)'
    0.054343 seconds (121.03 k allocations: 6.219 MiB)

comment 7y ago · link · parent

My tip: on recent macs, if you have two keyboard layouts, there's an easy option to make caps lock switch them. (Great so long as you got a mac with a real escape key too...)

comment 7y ago · link · parent

Also works in the Julia REPL, and jupyter notebooks. I'd hope that the tooling for any language which allows unicode variable names would support this.

comment 7y ago · link · parent

I don't know, but you may enjoy this neat paper on such matters:

https://arxiv.org/abs/1603.00299

comment 7y ago · link · parent

OK, I'm glad to hear... you are literally the first person ever to tell me law school wasn't as bad as it sounds!

comment 7y ago · link · parent

Good catch, I did in fact get a B in grammar.

Is there a term for this? "This nonsense should cease" does differ from "you should go" in that it demands an action on an inanimate thing, while avoiding saying who acts.

comment 7y ago · link · parent

It certainly won't stop just because we wish it away. Note the passive voice in "This nonsense should cease." Who, exactly, should do this?

Some junior professor, who's up for tenure based on research output, and teaching prizes based on being liked... in his shoes, would you decide to spontaneously give mostly B & Cs next year, and spend weeks fighting unhappy students?

Thinking about how we'd like the idea system to work is just daydreaming. You've got to think about the incentives facing all the people involved. And at the moment, these seem to point towards inflation.

comment 7y ago · link · parent

One downside of class ranking is that it incentivises destructive behaviour.

Law schools often do this, and I heard many stories of things like (in the days of physical books...) moving the perfect references, a week before the deadline, to an unrelated shelf in order to trip up your classmates.

By contrast the science students tended to collaborate on everything outside of an exam room, and learned a lot from each other this way. Even if their grades were less perfectly reflective of individual understanding.

12345
11