Fortran is still a thing - <AUTHOR> https://wordsandbuttons.online/fortran_is_still_a_thing.html <comment><USER2> FORTRAN has multidimensional arrays, and the compilers know about them and optimize aggressively. Most other languages don't. C people just do not get multidimensional arrays. They think an array of arrays is good enough. I tried to convince the Go people to put in multidimensional arrays, with no success.

Years ago, I had an amusing fight with the C++ committee over this.

In C++, you can overload the "[]" operator:

       int& operator[] (int i)

But you can't do that for multiple arguments.

       int& operator[] (int i, int j)

Why? An obscure feature of C and C++ is that the precedence of the comma is different for function argument lists and subscript lists. In

       foo(a,b)

is a function call with two arguments.

       foo[a,b]

is an invocation of the comma operator, which ignores the second operand. The syntax charts reflect this. So I proposed that the syntax for comma usage be the same in both "()" and "[]" forms. If you see "foo[a,b]" in a C/C++ program, it's almost certainly an error. I searched through large volumes of code and was unable to find a single use of the comma operator inside brackets.

But no, there's a "save the comma operator" faction.

C people just do not get multidimensional arrays.

<comment><USER3> > C people just do not get multidimensional arrays. They think an array of > arrays is good enough.

I have to say, i dont get what you are trying to say. Do you have a source that explains it?

What is the difference between a multi dimensional array and arrays of arrays? And what does a FORTRAN compiler optimize here? It is a piece of memory written and organized in a certain way. What is there to organize. You basically have a pointer to a memory region with an offset for the position at row X and column Y.

What am I missing? Are you only talking about the syntax for the final address? What has that to do with the compiler? Do you mean the parser?

<comment><USER4> an array of arrays is not necessarily contiguous in C(++). Indeed, if allocating on the heap, you end up with a bunch of discontiguous memory that's not necessarily correctly aligned.

A good tensor implementation accounts for strides that are SIMD compatible (eg; each dimension is a multiple of the SIMD register width).

<comment><USER5> An array of arrays is necessarily contiguous in C - this is implied by the type. An array of _pointers to arrays_ will, of course, not be contiguous - and is the only way to get a dynamically sized heap-allocated 2D array in C (VLAs give you stack-allocated arrays, with all the size limits that entails).

In C++, this all is best handled by a library class.

<comment><USER6> Heap-allocated dynamically-sized NxM matrix in C99:

        double (*mat)[M] = calloc(N * M, sizeof (double));

<comment><USER5> Ah, good point. I always forget that VLA types in C99 are actually _types_ , and so you can use them in these contexts as well.

It's a shame they killed VLAs as a mandatory language feature. They didn't make C into Fortran (which I think was the hope, between them, complex numbers, and "restrict"?), but they did make some things a great deal more pleasant to write.

</comment></comment></comment></comment></comment></comment><comment><USER7> I'm actively working on multiple Fortran projects, including one that's being written from scratch just in the last year in modern Fortran 2018.

Modern Fortran looks completely different from the old school FORTRAN77 most people probably imagine. Gone are the days of fixed-format, where the columns actually mattered, and gone are the days of unreadable ALL CAPITAL LETTERS, and gone are the days of GOTO.

I developed a Fortran implementation of Python's argparse[0] recently to use for another project. The code is nothing like the monstrous spaghetti code of days past---although I do still obsessively line up my code in columns, this isn't important.

[0] [https://gitlab.com/bwearley/f-clap](https://gitlab.com/bwearley/f-clap)

<comment><USER8> Do you know of any learning opportunities such as internships where one can learn and apply Fortran?

<comment><USER9> Look up for jobs in weather agencies, climate research, ocean model research and computational physics.

<comment><USER5> I've noticed that Fortran comes up a lot when talking to people who do fluid dynamics simulations.

Curiously, it often does so in context of Python. One specific example I can remember was a library written in Fortran, with unit tests written in Python.

<comment><USER9> Fortran and Python go together very well (they complement each other in just the right ways and there's all the bindings / data structure compatibility with Numpy that you need). Glue code / UI in Python, Numerics in Numpy + homegrown Fortran, that's how I'd implement a numerical model from scratch today.

<comment><USER10> Just out of curiosity, what do you use for calling Fortran from Python (e.g. f2py, ctypes)? Do you have any suggestion about how to combine them together (e.g., for parallel calculations)?

<comment><USER9> So I haven't yet had the chance to do it myself, but yes I'd look at f2py first and how to integrate it with Numpy.

</comment></comment></comment></comment></comment></comment></comment><comment><USER11> I've done a bit of HPC work, and Fortran is very much "still a thing" there. MPI[1] is pretty much the only game in town for between-node parallelism, and MPI comes with interfaces for C, C++ and Fortran. The only other language that's even been run at petascale is Julia, and as far as I can tell that's still using Julia's `ccall()` under the hood to interact with the MPI C libraries [e.g., 2].

Certainly legacy code is part of the picture, but not always as directly as one might think. Probably the biggest factor is that Fortran compilers tend to be _very good_ \-- partially a chicken and egg issue (e.g., Intel puts effort into into ifort because its HPC customers want to use Fortran), but I think there's also at some level a tradeoff between language convenience versus ease of optimizing into machine code. To give one concrete example, until C99 added the `restrict` keyword, it fundamentally wasn't possible for the compiler to optimize C code as heavily as it could optimize Fortran in certain common situations because of pointer aliasing issues.

It's probably also worth noting that modern Fortran is a long way from f77.

[1] [https://en.wikipedia.org/wiki/Message_Passing_Interface](https://en.wikipedia.org/wiki/Message_Passing_Interface)

[2] [https://github.com/JuliaParallel/MPI.jl](https://github.com/JuliaParallel/MPI.jl)

<comment><USER9> The chicken-and-egg thing also applies to GPUs btw., Nvidia & PGI have supported GPU computing on Fortran for ~8 years, since the early days of CUDA.

<comment><USER11> That's a good point. Hierarchical parallelism is becoming increasingly important, so having one language that can be used both within-node and between-node is very convenient, and could add to the lock-in factor.

<comment><USER9> Good point and this is btw. exactly where Nvidia is heading. There will be a point in the future where you just program kernels and/or map/reduce functions and/or library functions and then call them to execute on a GPU cluster, passing in a configuration for network topology, node-level topology (how many GPUs, how are they connected) and chip-level topology (grid+block size).

The address space will be shared on the whole cluster, supported by an interconnect that's so fast that most researcher can just stop caring about communication / data locality (see how DGX-2 works).

<comment><USER12> > The address space will be shared on the whole cluster, supported by an > interconnect that's so fast that most researcher can just stop caring about > communication / data locality

There will always be people who will care because locality will always matter (thanks, physics). Improvements in technology may make it easier and cheaper to solve today's problems, but as technology improves we simply begin to tackle new, more difficult problems.

Today's chips provide more performance than whole clusters from 20 years ago and can perform yesterday's jobs on a single chip. But that doesn't mean clusters stopped being a thing.

See also The Myth of RAM, [http://www.ilikebigbits.com/2014_04_21_myth_of_ram_1.html](http://www.ilikebigbits.com/2014_04_21_myth_of_ram_1.html)

<comment><USER9> I do think there's a paradigm shift coming. it's a combination of the ongoing shift away from latency- to throughput oriented design with the capabilities shown in new interlinks, especially nvlink/nvswitch. This allows DGX-2 to already cover a fair amount of what would otherwise have to be programmed for midsized clusters - if it can be made to scale one more order of magnitude (i.e. ~ 10 DGX) I think there's not much left that wouldn't fit there but _would_ fit something like Titan. There's not that much so embarassingly parallel that the communication overhead doesn't constrain it, and if doesn't, you _again_ don't care much about data locality as it becomes trivial (e.g. compute intensive map function).

</comment></comment></comment></comment></comment></comment><comment><USER13> I happen to be one of those "real engineers", working in an aerospace company. When I have to re-do some calculations done 30 years ago (yeah, we need to have traceability of calculations for that long and more ... ) , I grab the F77 source code, build with gfortran or Intel Fortran, and believe me, it builds and runs. From Windows workstations to Linux clusters. Easy.

Then I get the python code from 6 months ago, and spend hours figuring the right python version, and library compatibilities ...

And when I read the fortran code, made by (physical stuff) engineers, it is ugly but simple - there is one or maybe two ways to do something. Not the 1000000's of ways of doing the same thing in Python. And I don't have to learn 50 new libraries to understand the code.

By the way, Python has been my language of choice for most stuff in the last 15 years ...

<comment> angus-g How do you handle answer changes owing to different environments/compiler versions?

<comment><USER13> Almost every time there will be regression test cases to verify the results,and the new builds will never reproduce perfectly the numerical results. In general is not a issue, has to be handled case by case.

A bigger issue is that modern compilers will raise many warnings, and simple inspection will find many bugs, like array or loop boundaries errors, and when you fix the code you get a different result.

Then it has to be handled case by case as well, since you have to check if that affects safety of flight.

</comment></comment></comment><comment><USER14> I'm working on a Fortran book with Manning Pubs [1]. You can browse some of the projects that accompany the book here [2]. At Cloudrun [3], we're running some 900K lines of parallel Fortran in the cloud for on-demand custom weather prediction. Yes, it's very much still a thing, it's just that the application domains isn't as much in the mainstream media nowadays.

[1] [https://www.manning.com/books/modern- fortran](https://www.manning.com/books/modern-fortran) [2] [https://github.com/modern-fortran](https://github.com/modern-fortran) [3] [https://cloudrun.co](https://cloudrun.co)

</comment><comment><USER15> You can think of R as a wrapper around Fortran, in much the same way that Python is a wrapper around C.

Not only does building R itself require a Fortran compiler, common packages do as well. If you look inside your R package tarballs, particularly of solvers, you will see Fortran.

(Scientific computing libraries in Python also wrap Fortran, but CPython doesn't depend on it. Base R depends on Fortran.)

<comment><USER16> And Fortran is still probably faster than if it used C in most cases of R's use of Fortan. [http://beza1e1.tuxen.de/articles/faster_than_C.html](http://beza1e1.tuxen.de/articles/faster_than_C.html)

There is just a ton of well written Fortran for number crunching and there is zero reasons to not use them. You wouldn't gain speed and you would loss the decades of stability these Fortan scripts have given the scientific community.

I am guessing all of us old timers remember the pain of Fortran in the past.

</comment></comment><comment><USER17> > _...scientists and engineers; not computer scientists and software > engineers, but the real ones._

That's a good one. And well-deserved.

<comment><USER18> I make this joke myself all the time and yet it does sting to see someone else write it.

I do generally agree with the point though, and sometimes I feel that I and people I work with become hung up on things like code elegance and testability rather than actually addressing the task at hand.

<comment><USER19> In the vast majority of scenarios, code maintainability and ability to be tested are the task at hand.

</comment></comment></comment><comment><USER20> It sure is. I know someone who has a very good job writing Fortran for supercomputers with over 20k+ CPUs, powering defense related research.

Also, I started /r/fortran as a joke and then it was taken over by actual FORTRAN programmers.

<comment><USER21> _Also, I started /r/fortran as a joke and then it was taken over by actual FORTRAN programmers._

I had the same experience with /r/cobol. Programming languages never die...

<comment><USER22> Someone should do the same for MUMPS[1] if some Epic employee hasn't already done so.

[1] [https://en.wikipedia.org/wiki/MUMPS](https://en.wikipedia.org/wiki/MUMPS)

</comment></comment></comment><comment><USER23> Fortran II was my first programming language, and a key element to my first summer job, and to my first FTJ. There were a lot of things about it that eventually made me dissatisfied enough that I studied compilers to see why there were such goofy restrictions, dabbling in XPL. I haven't been back, but germane to this article, I visited with my professor with whom I had the summer job 40 years later, and he pulled out the code that I had written that was still in production, It had been changed a bit, but it was still very recognizable. And it survived because, while it was a small part of a very large numerical analysis project, it worked.

The article makes me wonder if I had a problem of this sort again, would I choose Fortran. I'm thinking not, but then again, there are hints that the language has changed significantly over the last 50 years.

I have used many other languages during that time, and am fond of several of them (bliss 36, lisp, various assembler) and dislike others (RPG III, COBOL, perl). Python would be in the middle.

</comment><comment><USER24> Tons of linear algebra and optimization code is still actively developed in Fortran. The most accurate solver I've found for small quadratic programs is a Fortran code maintained by a grumpy German math professor.

<comment><USER25> Link please?

<comment><USER26> BLAS is still Fortran.

[https://en.m.wikipedia.org/wiki/Basic_Linear_Algebra_Subprog...](https://en.m.wikipedia.org/wiki/Basic_Linear_Algebra_Subprograms)

</comment></comment></comment><comment><USER27> Quite a few languages people declare "dead" are doing just fine. We tend to associate languages like FORTRAN, COBOL, and RPG, with the term legacy which implies old an obsolete. Yet these are behind systems we use everyday but just are not aware of it. Plus these languages serve their purpose very well, FORTRAN is excellent in scientific solutions, COBOL and RPG excel in business math and similar.

Solutions to problems are not one language dependent. Exiting systems can have new modern customer facing solutions implemented all the while exploiting the existing code base. In fact there are times were its desirable to keep what is known to work and just give new means to access the code and data behind it.

<comment><USER28> > RPG

I had never heard of this one!

[https://en.wikipedia.org/wiki/IBM_RPG](https://en.wikipedia.org/wiki/IBM_RPG) says:

> [D]eveloped by IBM in 1959 as the Report Program Generator - a tool to > replicate punched card processing on the IBM 1401 then updated to RPG II for > the IBM System/3 in the late 1960s, and since evolved into an HLL equivalent > to COBOL and PL/I.

</comment></comment><comment><USER29> People who proselytize programming languages are missing the big picture. Its always about making computers do stuff and programming language of choice is just an implementation detail.

Having said that, we do need to look into other kinds of computers, I see none of the proselytizing there..

<comment><USER30> > _People who proselytize programming languages are missing the big picture. > Its always about making computers do stuff and programming language of > choice is just an implementation detail._

What if you're missing the big picture?

Many developers don't care about the stuff we make computers do, but are passionate of the tools and implementation details of doing them.

If I work on some accounting enterprise software I could not care less for accounting and the associated business goals. But I could very much like working with this over that tool and finding nice ways to solve various problems towards the (still boring to me) end goal.

Unlike we're working on our personal/hobby/passion projects, the "stuff we make computers do" are usually irrelevant to us -- business owners care about them. But, as programmers, we presumably do care about programming and programming tools and concepts.

<comment><USER29> >Many developers don't care about the stuff we make computers do, but are passionate of the tools and implementation details of doing them

This is a positive characteristic of a hacker. Very much desirable.

Do note that I was specifically talking about proselytizing in a negative sense. One can love their tools and still not participate in dick measuring contest of which tool is better and actively belittle someone else who also loves their own tools.

There can be a constructive discussion about programming languages (it does happen among the PL theorists and hackers), but in general PL theorists are a rare sight.

In a general forum, sadly, many developers do judge a person with what programming language they use, disregarding what they have created. This goes against the foundation of hacker ethics.

</comment></comment></comment><comment><USER31> As someone working with scientific codes in (relatively) modern Fortran, I agree that Fortran is still very strong in its niche. I don't know any other language that makes it as easy to write fast numerical codes, and it's relatively hard to accidentally mess up the performance.

That said, I still find it very much feels outdated as soon as you veer off its core features. Handling strings is a major pain, writing short functions feels overly verbose, and proper testing is difficult. The language is full of arcane details that require reading up on best practices even for simple things such as defining the precision of your numbers.

So while Fortran still is strong in some areas, I do see it as an outdated language, just one that doesn't really have a good replacement yet. Hopefully Julia can replace it for most use cases, or maybe Rust if they figure out their HPC story.

<comment><USER32> > or maybe Rust if they figure out their HPC story.

Does rustc currently have the ability to implement the right optimizations? One of the big things that FORTRAN can do is prevent aliasing. Can you prevent aliasing in LLVM?

<comment><USER33> Yes, through the "noalias" attribute. Rustc uses it, well, when it's not buggy at least. It's currently turned off pending an upstream fix; we'll have it back on when it's fixed.

<comment><USER34> Is that the last thing blocking "fortran-parity" in rust? Is there a working group hpc would fall under?

Last I checked there was no fast-math on stable, and #[repr(align)] was recently added.

<comment><USER33> I don't know enough about fortran to say, to be honest.

> there was no fast-math on stable

We don't do global flags to tweak things like this, as a rule. You can do it on indivudal operators, or use wrapper types, to get these behaviors.

</comment></comment></comment></comment></comment><comment><USER35> Fortran is still highly relevant in the science community. I worked with a couple senior scientists from a national lab and they mainly only knew Fortran and C/++. Almost all their legacy software was in Fortran so everyone who joined the group had to learn it too. Not coincidentally, they mainly teach Fortran and C++ during my physics minor (same programming courses as majors). I know they introduced Python to the curriculum these past few years though.

</comment><comment><USER36> I find that the industry in general has a bias against gradual improvements of existing projects. Several times throughout my career, I've worked on mainline supposedly-legacy products while other teams work on greenfield rewrites, and the result is invariably that I'm able to improve the left-for-dead legacy project faster than the rewrite group can make something new --- and up with an objectively better product.

The difficulty of continuity is overstated. It's very rare that something is so far gone --- even Fortran --- that it can't be improved by insensible degrees into something just as modern and usable as something started from scratch.

</comment><comment><USER37> I disagree.

Why is Fortran still a thing? _technical debt_

Everyone I know in astrophysics or engineering who can uses something else-- Python, C++, and Julia, are big winners.

The problem is that there are these huge monolithic codebases written in Fortran that are difficult to get out of using. People end up using Fortran because they need a hydrodynamics code, or a navier stokes solver, or a chemical kinetics code, but they can't justify building one from scratch-- that's not how you get a Ph.D., and Ph.D. students and post docs are the people doing the brunt of this work.

There's also the added disincentive that even if you do re-implement a solver in a modern, maintainable way, then your results might disagree with previous published work--not necessarily because your results are wrong, but because the published work probably has bugs that no one has been able to discover or reason about because the code is so complex.

<comment><USER38> > Everyone I know in astrophysics or engineering who can uses something else-- > Python, C++, and Julia, are big winners.

I know many other languages, but for engineering work I have started some projects in Fortran simply because it is a very good fit. Python is not fast enough, C++ is a huge mess, and Julia has just been released, it is not mature enough yet.

You would be surprised of how many people are writing solvers from scratch. It is not the most common job in research, but it still is an active field.

And your point about results mismatch is true, this is a very real problem, but independent of the programming language used. To give a concrete example, many people have reimplemented almost identical material subroutines for FEM packages and obtain different results, but this happens to people using Fortran and people using C++.

</comment></comment><comment><USER39> What is modern Fortran good at? It seems like Fortran's niche has been scientific computing, specifically high performance linear algebra. (I wonder if that makes Fortran good for neural networks.)

In college, I remember attending a great talk by a visiting Stanford compiler prof. who talked about being able to produce faster C++ code by transpiling to Fortran first than by optimizing the C++ or IR directly. Not sure if that's still true, but at the time it seems Fortran was a more restrictive language which permitted stronger optimization.

<comment><USER24> > Not sure if that's still true, but at the time it seems Fortran was a more > restrictive language which permitted stronger optimization.

There is no aliasing in Fortran. In C (and using compiler extensions in C++) you manually use restrict to give the same information to the compiler, but it is a trickier process than in Fortran. Rust inherits this benefit from Fortran, but last I checked they had all related optimizations disabled (and most numerical computing friendly features in Rust tend to be on the back burner).

<comment><USER40> That was due to a bug in LLVM when noalias was used in conjunction with LLVM's stack unwinding facilities. It's since been re-enabled now that the upstream bug has been fixed: [https://github.com/rust- lang/rust/pull/50744](https://github.com/rust-lang/rust/pull/50744)

<comment><USER41> > It's since been re-enabled

It's since been disabled again, due to a new bug (which was also reproduced in C, on both LLVM and GCC): [https://github.com/rust- lang/rust/issues/54878](https://github.com/rust-lang/rust/issues/54878)

</comment></comment></comment></comment><comment><USER42> I think people also forget that there's a decent amount of fortran in numpy. I'm pretty sure they are the originators of f2py as well

<comment><USER43> +1. It is easy to see if you decide to build it from source.

Python is great as a glue. Fortran is great at numeric things (better than C, guaranteed no aliasing allows for more optimizations).

</comment></comment><comment><USER44> "Many believe that it's complex and outdated. Programming in Fortran is perceived like riding a horse-driven carriage to work. Fortran?"

That's incredibly ignorant, and shows very clearly how much we suck ass as an industry, and why we're such a bad industry to work in. I'm currently working on LAPACK, and that's written in F90. Why? Speed!

To add insult to injury, Fortran is really nice to program in, especially modern Fortran, especially targetting the GPU's.

<comment><USER45> Speed and trust. Trust in the algos that were devised and implemented through the history.

Older codes often had a parameter to control a number of significant digits to maintain. Perhaps a limitation in those days, but also it allowed to control error tolerance. Indeed, engineerig it is.

</comment></comment><comment><USER46> One interesting triviality. In modern Fortran you can do "list comprehension":

        integer :: i
        integer, parameter :: n = 20
        integer, dimension(n) :: index = [(i, i = 1, n, 1)] ! list comp

And this works just like range(1, n+1) in Python (array index starts from 1 by default in Fortran).

The list comprehension in Fortran can even be nested (because it is essentially a do-loop), according to this Rosetta Code example: [https://rosettacode.org/wiki/List_comprehensions#Fortran](https://rosettacode.org/wiki/List_comprehensions#Fortran)

</comment><comment> photon-torpedo Article claims that "modern Fortran already has [...] generics" but AFAIK it's still not possible to write e.g. a type-generic sort function (unless you restrict yourself to types all inheriting from a common class, a bit like very early Java). So there's no standard library of basic algorithms and data structures, and you can't even write one, without resorting to meta- programming (likely in a language other than Fortran). From what I have seen about Fortran2018, this will not improve any time soon.

<comment><USER47> You can use "class(*)" and the "select type" construct, and yes, polymorphism.

So to compare to C++ or Java, it a bit like inheritance and RTTI. Not generating type-specialized functions at compile-time like with C++ templates, which is what's needed for high performance.

<comment><USER48> Is there a use case of using polymorphism in scientific computing ? Just curious.

<comment><USER47> Scientific computing doesn't (only) mean small tight loops doing linear algebra. Scientific applications can be millions of LOC, with all the attendant problems of managing complexity at scale. Polymorphism can well be a useful tool to have in the toolbox. Just because it's not an appropriate tool when writing high-performance kernel code, doesn't mean it's not useful elsewhere.

</comment></comment></comment></comment><comment><USER49> Of course real programmers code in FORTRAN.

[http://textfiles.com/humor/rp.txt](http://textfiles.com/humor/rp.txt)

> "If you can't do it in FORTRAN, do it in assembly language. If you can't do > it in assembly language, it isn't worth doing."

</comment><comment><USER50> For something quantitative: the most time on general-purpose HPC systems is likely to be taken by materials science software written in Fortran. There are numbers somewhere for Archer, the UK "tier 1" system, for instance.

<comment><USER51> Specifically, if we're talking about UK solid-state physics/materials science, some combination of CASTEP, ONETEP, SIESTA, ABINIT and maybe VASP.

I'd expect there to be a bunch of GROMACS/CHARMM time for the protein-folders too.

<comment><USER50> VASP is likely to be top. I've not seen much use of abinit. Gromacs, charmm, and siesta don't use Fortran. See also cp2k, elk, quantum espresso, nwchem, and dl_poly, amongst others, which do, and are common. Gaussian is unfortunately common, and I think is Fortran. That's on top of important Fortran codes in ocean and meteorological modelling, and engineering. [https://www.archer.ac.uk/status/codes/](https://www.archer.ac.uk/status/codes/) has a lot of "other", partly because they don't log what actually runs with whatever is in the Cray compute node kernel which would do a similar job to audit, for instance.

<comment><USER51> SIESTA is absolutely Fortran. I wrote Fortran which is part of it. :)

</comment></comment></comment></comment><comment><USER29> I heard my old physics professor say "In FORTRAN GOD is real"

<comment><USER52> Actually, almost all Fortran code says "implicit none".

<comment><USER45> > Actually, almost all Fortran code says "implicit none".

... which would render GOD as of undeclared type. Compilers are such 'agnostics'.

</comment></comment></comment><comment><USER53> There are certainly much more Fortran users today then 30 years ago. It is not only widespread in science and engineering education but subsequently of course also in the research codes. However, there is a gradual shift towards scientific python when high performance is not needed. But as the author notices, Fortran is the prominent language for high performance programming because it is so simple and has linear algebra built in at its hearth.

</comment><comment><USER54> > It stll excels in the good old structured programming. It has features that > mainstream C-like languages lack. For instance, it can exit or continue a > loop from a nested loop.

You can do this in C with gotos. The other things that are mentioned are similarly easy to implement–they just don't have a particularly nice syntax.

<comment><USER12> Fortran has computed goto's (though marked obsolescent). Most mainstream C compilers support computed goto's as an extension, Visual Studio being one of the oddballs.

Computed goto's can _really_ speed up state machines by allowing you to replace conditional branching with unconditional indirect branching. I've never seen switch-based solutions come close, notwithstanding that switch statement optimizations are supposedly part of the bread-and-butter of optimizing C compilers.

Note that GCC's documentation on computed goto's uses an example where they index a static array of label pointers. AFAIU the example does this because it speeds up linking and because its more analogous to Fortran code. But it's easier and more performant to simply store and use the label pointers directly (in place of an integer for indexing the array), and the additional linking cost is irrelevant compared to the amount of symbol linking required for even a simple C++ program.

<comment><USER55> Fun fact - Ethereum's Virtual Machine also allows for computed (and fully dynamic) gotos.

<comment><USER12> That makes sense. gotos make code generation so much easier, and computed gotos are even more powerful. Lua 5.2 added goto precisely to make it easier to machine generate Lua code. WebAssembly lacks gotos and it's a serious impediment--compiling to WebAssembly requires a special "reloop" algorithm which, while conceptually simple for most code, doesn't work well for the type of critical code for which using goto and especially computed gotos are useful for. Reloop doesn't always work and so sometimes the only way to compile to WebAssembly is to add indirection, such as compiling to an intermediate state machine.

I think WebAssembly originally required reloop because it was originally designed as a purely stack-based VM with properties that made it trivial to verify the bytecode (similar to BPF). Then things got much more complicated for performance reasons and I feel like they probably could have added goto support at that point with little marginal complexity. It's clearly possible-- Ethereum did it, BPF permits forward jumps, and eBPF permits both forwards and backwards jumps.

</comment></comment></comment></comment><comment><USER56> He gives this example:

      real, dimension(5) :: a = [ 2, 4, 6, 8, 10 ]
      integer, dimension(2) :: i = [ 2, 4 ]

      print *, a(i)   ! prints 4. 8.

In APL the same is:

        a← 2 4 6 8 10
        a[2 4]
      4 8

<comment><USER57> I guess the speed of APL is comparable to python rather than Fortran?

<comment><USER58> If by Python you mean numpy, then yes.

</comment></comment></comment><comment><USER59> >There were a few caveats though. The applicant had to be a US citizen at least 18 years of age, and the code to optimize had to be in Fortran.

Why would you need to be a US citizen to partake in NASA's competition?

<comment><USER60> Because nationalism (offerring opportunities to aliens is bad!)

<comment><USER61> I think it has more to do with national security; i.e., not sharing our tech with other nation states that might use it against us. That used to be more of a thing a generation ago. For example, it used to be a crime to export certain computer technology to communist China. Now lot of our stuff is built there.

<comment><USER60> That itself is a result of nationalism, even explicitly.

<comment><USER61> But not for the reason you stated.

<comment><USER60> The reason is nationalism, what I wrote in the parentheses was meant as a tongue in cheek paraphrasing of some isolation supporter, I thought it was obvious because I would never call a person "alien" (as in intruder) seriously. The reason here is "nationalism" because that includes the whole history (which is in turn the reason for it).

Sorry for the confusion.

</comment></comment></comment></comment></comment></comment><comment><USER62> FORTRAN is definitely still used all over the place in scientific computing... If you go to a CS department that does some engineering work and work on numerical you might have to write some.

</comment><comment> r-s In University I worked for a professor translating FORTRAN77 code to C. Tools existed for this, but did not produce human readable C code.

There is still a ton of Fortran code in academia.

<comment><USER63> Why ? and did you get equivalent performance afterwards

<comment><USER64> Most languages can access C without much hassle (Ruby, Python, ...), F77 predates this, and while you can combine C and F77 for a particular compiler, it is a painful and unrewarding task (and the result is compiler-specific). It is often quicker to run the F77 though f2c so you have an entirely C codebase (even if f2c is not really readable).

Typically f2c code will be slower than F77.

<comment><USER65> Whatever that can access C can also access Fortran these days. Look at the 3 newest Fortran standards, over the past two decades.

</comment></comment></comment></comment><comment><USER66> Both BLAS and LAPACK are written in fortran aren't they? So that's all the core numerical routines for numpy/scipy and R and I assume many other things.

<comment><USER50> Sort of. The bits of BLAS that make it performant aren't written in Fortran -- either assembler, or the equivalent SIMD intrinsics. (See OpenBLAS and BLIS source.)

</comment></comment><comment><USER67> It recently popped up in a place I didn't expect. In checking out some of the deep learning work around neural style transfer, I found that many of the examples make reference the L-BFGS optimizer. Peeling a layer back, it appears that a commonly used implementation of L-BFGS is in scipy, which is a wrapper around a Fortran implementation.

</comment><comment><USER68> Obligatory quote when Fortran comes up:

"I don't know what the programming language of the year 2000 will look like, but I know it will be called FORTRAN." \-- C.A.R. Hoare, ca. 1982

<comment><USER69> Also "I can write Fortran in any language".

</comment></comment><comment><USER70> if Fortran is built for scientific computing, how does it compare to modern languages that are used for scientific computing for the same area like Julia, R, Python?

<comment><USER71> As other comments mentioned, R is 'wrapper' around Fortran. Numpy uses decent amount of Fortran and so on.

</comment></comment><comment><USER72> I mostly do business software and was curious about doing modeling of physical plasmas. Sure enough, everything is fortran.

</comment><comment><USER73> Nobody calls fortran from lisp? Several libraries are available and would be interesting to hear something about such mix.

</comment><comment><USER74> So is COBOL and several other old languages. Lots of legacy stuff that still gets used and updated.

</comment><comment><USER75> So is there a Ratfor2018?

</comment><comment><USER76> > Its users are scientists and engineers; not computer scientists and software > engineers, but the real ones.

If you're going to belittle a portion of your audience then at least try to be funny.

</comment><comment><USER77> I stopped reading when it implies software engineers are not real engineers.

<comment><USER78> Real engineers are liable if their output fails.

What is one of the first statements made in every software license ever written in the history of computing?

Civil Engineers: Bridge falls down, PE's stamp is on designs, design faulty, is liable = Real engineer.

Software "Engineer": Program fails, money lost. "LOL must be bugz, btw: THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION." = not an engineer.

Can you imagine if an aerospace engineer submitted the designs for a new turbine engine with an asterix at the bottom of the blueprints saying "this engine design is provided as-is without warranty of any kind either expressed or implied, including, but not limited to whether or not it will blow up in flight"?

The programmers for the Space Shuttle program may have been actual engineers, because I'm willing to bet that they submitted documents guaranteeing the performance and operation of the code they wrote.

Yep:

>NASA knows how good the software has to be. Before every flight, Ted Keller, the senior technical manager of the on-board shuttle group, flies to Florida where he signs a document certifying that the software will not endanger the shuttle. If Keller can't go, a formal line of succession dictates who can sign in his place.

[https://www.fastcompany.com/28121/they-write-right- stuff](https://www.fastcompany.com/28121/they-write-right-stuff)

So maybe some programmers can be engineers, if they put their money where their mouths are and don't go "lol bugz, didn't buy support contract" if something goes wrong.

<comment><USER63> If a bridge falls down you blame the contractor :-)

This Happened at Dar Al Hadassah when I worked there

<comment><USER79> You can certainly blame the builder, but the "real" engineers I've talked to all spoke of traditions like a _ring on their pinky_ so that when they are signing their name to a design, they are reminded (as the ring touches paper) that their signature affects real people's lives, and that both their professional reputation and personal liability might be on the line if they screw it up.

If an engineer designs my bridge, and it collapses when more than one car is on it, he can't laugh at me for not giving him a spec that included that requirement. Contrast this with software, where if a database stores plaintext passwords, the programmers are probably protected if there is sufficient documentation that the bosses/customer insisted on it.

I'm grateful to have the flexibility of creating effectively magical things that can change easily to meet changing requirements, but I also feel like there will come a time when we will need to have some similar degree of engineering rigor mandated for software.

<comment><USER80> It's beyond traditions in some regions as well. For example, in Canada, the "engineer" title is protected, so anyone using that title must be a registered member of the provincial association (wherever they practice).</comment></comment></comment></comment></comment>


Linode Manager for iPhone - <AUTHOR> http://www.linode.com/iphone/

<comment><USER2> any plans for android?</comment>


Was Modern Art Really a CIA Psy-Op? - <AUTHOR> https://daily.jstor.org/was-modern-art-really-a-cia-psy-op/ <comment><USER2> I think someone might have overlooked the publication date on this one: _April 1_ , 2020. :)

<comment><USER3> Yet the CIA-modern art connection has been confirmed:

[https://www.independent.co.uk/news/world/modern-art-was- cia-...](https://www.independent.co.uk/news/world/modern-art-was-cia- weapon-1578808.html)

[https://en.wikipedia.org/wiki/Abstract_expressionism#Abstrac...](https://en.wikipedia.org/wiki/Abstract_expressionism#Abstract_expressionism_and_the_Cold_War)

[https://en.wikipedia.org/wiki/CIA_and_the_Cultural_Cold_War](https://en.wikipedia.org/wiki/CIA_and_the_Cultural_Cold_War)

</comment></comment><comment><USER4> Is modern K-pop a South Korea gov psy-op?

<comment><USER5> Is Anime a Japanese government psy-op? And Techno for Germany?

</comment></comment><comment><USER6> This must be a test of gpt-2 or a similar NN writing tool, right? The article is nonsense.</comment>


Airbnb launches AirbnbTV - <AUTHOR> http://tv.airbnb.com Check it out at tv.airbnb.com <comment><USER2> nice..it's here:

<http://tv.airbnb.com/>

I'm sure they will iron out where to put this and the navigation points, etc.

1) Trust Factor..instantly elevated. People who might ask, "now why would I do that?" "who will use this?" - they can put those questions to "bed" by seeing a real person and watching real stories.

2) Huge branding win overall. Fun. Connected. Social.

3) Support - squashed tons of typical support questions with their very simple, clean short, videos.

4) Recruiting - Office Life. Any questions? Looks pretty cool.

They should take these video assets, syndicate them and make sure they go everywhere the eye can see. And track it all. Conversions to booking and what happens to the support queue, after publishing.

</comment><comment><USER3> It looks like a lot of your bottom links are staying on the tv. subdomain, but don't resolve to anything there. (i.e. tv.airbnb/jobs 404s, the links should probably go to www.

<comment><USER4> Thanks, fixed!

</comment></comment><comment><USER5> This reminded me to actually use AirBNB for my New York stay. Hopefully someone agrees to host me before my hostel cancellation policy runs out of a deadline, I'd much rather sleep on a couch than in a dorm.

</comment><comment><USER6> This is a great idea but on first glance I'm confused how this ties in with the messaging and reservation/order placement system on the main site. It seems you can just watch a video but then you have to separately go to the main site and again search for that listing in order to place a reservation for it.

The other question I had about this is how costly is it to host your own video? Or are they riding on top of some external video hosting service?

At the moment it seems Airbnb cherry picks the properties they want to promote with video - they don't allow regular users to upload videos of their properties to augment the images that they can already upload. Why not simply allow everyone to upload videos? Is this a cost issue? Because the current implementation creates an impression of unfairness - why promote only some properties and not others?</comment>


Printable Border Search Pocket Guide ( EFF ) - <AUTHOR> https://www.eff.org/document/eff-border-search-pocket-guide <comment><USER2> Dumb question: These would apply to US Citizens returning from abroad than for a foreigner visiting the US, yes?</comment>


Natalie Portman - Scientist - <AUTHOR> http://www.nytimes.com/2011/03/01/science/01angier.html?ref=natalieportman <comment><USER2> Nice article.

Two sentences jumped out at me.

First:

 _"There are very few who are as inherently bright as Natalie is, who have as much intellectual horsepower, who work as hard as she did. She didn't take a single thing for granted."_

then:

 _If anything, stories like Ms. Portman's show that great success, like DNA, is constructed of a few basic building blocks: tenacity, focus, and the old Woody Allen line about just showing up._

No question about the importance of things like hard work, tenacity, focus, not taking anything for granted, and just showing up. We _all_ have to do these things.

The phrase that really got me thinking was "intellectual horsepower". What is that? And how important is that?

I used to be awfully hasty in judging others, "She is really smart," or "He is so stupid". Then I learned alot from my first mentor. He taught that there often isn't much difference between someone who appears smart and someone who doesn't. Perhaps no one spent enough time with them. Maybe they have other challenges, like family, health, or circumstances. Maybe they're just a fish out of water, spending too much time on things that don't interest him. Or maybe they appear dumb because they actually believe that they are. They've been told so many times that they now believe it.

At first, he sounded like some hippie idealist. But the more we worked together, the more his teachings manifested themselves in the people we worked with. People who appeared dumb blossomed under different circumstances all the time. The were smart deep down inside where no one ever explored. (These people were mostly hourly workers who knew way more than their bosses about running the business.)

To this day, when I see phrases like, "intellectual horsepower", I cringe. We "smarties" aren't that much smarter than most other people, if we are at all.

And just to stay humble, remember: we're all just one head injury from blissful ignorance.

<comment><USER3> _To this day, when I see phrases like, "intellectual horsepower", I cringe. We "smarties" aren't that much smarter than most other people, if we are at all._

I don't think this is true at all. People who are average intelligence or below can be very successful but have no chance of succeeding in high level intellectual pursuits. People who are smart don't understand this, because to them learning anything is just a matter of effort.

I think there is truth in what you are saying, because at a certain level of intelligence, hard work and attitude become more of a bottleneck than ability. This is supported by facts as well, studies have found that success increases by IQ score, but levels off or drops at a certain point where brainpower is more of a handicap to mental health than a benefit.

<comment><USER4> What if the reason people are 'smart' is because of the way their brain has organized itself over the years in response to learning so much? Then it isn't that dumb people are dumb, just behind.

<comment><USER3> That isn't reality. The genetic factors of intelligence are well documented. I could have played basketball six hours a day, every day for the last 25 years, and I'd be really really good. But I wouldn't be as good as Lebron James was when he was 12 years old.

<comment><USER5> This recent submission and its discussion is relevant to your claim, "General factor of intelligence g, a Statistical Myth": <http://news.ycombinator.com/item?id=2210147>

I disagree with your claim about Lebron James, but I don't think there's enough data for an evidence-based debate. I do think, however, that people _want_ to believe that others who operate at the genius level in various activities have genetic gifts. It gives us an excuse for why we don't.

<comment><USER6> Why is it so easy to accept that pretty much everything in our bodies is genetic but not intelligence? I don't see why it would be any different. We already know that the brain is not just one big 'computing mass' but instead consists of many thousands of extremely specialized systems interconnected in a genetically-determined way shaped over thousands of years of evolution. If some of these systems are missing or not connected properly because of some genetic alteration it causes a wide spectrum of effects in our mental development. We know depression has a genetic element. We know downs syndrome is genetic. We know that identical twins separated from birth are remarkably similar, not just in how they look but also in how they act, how they see the world, what kind interests they have and so on.

It's naive to think everyone is born equal that way.

<comment><USER7> Everyone isn't born equal, but everything we have doesn't solely come from genetics. Nurture plays a huge role in our development. Saying Natalie Portman is successful solely because of her DNA is wholly disrespectful to her hard work. She didn't get best actress and a masters degree by just slumming it because her genes did all the work.

It's naive and ignorant to ignore nurture in the debate. A lack of Vitamin D or cholesterol can inhibit myelin growth, which notably in the womb causes a miscarriage or still-birth/brain dead baby. It's reasonable to assume that a lack of Vitamin D or cholesterol in a child's formative years is going to cause severe developmental problems.

Natalie Portman has a degree and an oscar for one simple thing: She works hard.

If she didn't work hard she might be a recognizable actress, but she'd be like a huge number of university enrollees in that they never get any degree.

Genetics is a firm foundation, bad genetics can cause lots of problems. But only work is going to build a house, and only hard work is going to build you a mansion.

<comment><USER8> There's a fair bit of evidence that hard work is itself genetic, and the ability to focus attention and delay gratification is largely due to certain brain structures. Those brain structures can be affected by genetics, by environment (eg. fetal alcohol syndrome results in a marked loss of impulse control later), or by practice, but not everybody starts from the same point.

Anyway, your point gets into issues of free will and consciousness that philosophers have been debating for centuries. If everything has a cause, how can we say what we're actually responsible for, and how much is just a reaction to random chance? Perhaps consciousness is largely an illusion: the brain makes decisions based on firmly ingrained circuits that function at a subconscious level, and only later does that bubble up to the conscious level.

<comment><USER9> Even if not everyone starts at the same point that doesn't mean they will continue to stay ahead. People operate under the assumption of a constant veclocity in development. And that development is non-inertial (in the physics sense). The rate of development function could well be logistic or with an asymptote or some like - removing that insurmountable gap implicit in so many statements.

We may all end up near enough (for all practical purposes) at the same endpoint if we all worked hard and performed necessary rotations and frame changes given our situations. The brain is very malleable.

There is also the fact that people start at different places for different areas and that chooses where they end up specializing. And there is probably some self-fulfilling prophecy going on that trains people to avoid smarty pants subjects which are vital for developing rigorous thinking. why is it a matter of pride to be terrible at maths and technical subjects? or the fact of growing up with certain teachers and society all but directly informing you that certain races aren't up for certain more mathy subjects. I can certainly attest to that stuff messing up your ability to keep on when things get difficult.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment> brown9-2 I'd like to take this opportunity to point out another "scientist" (minor) actor not mentioned in this article:

\- speaks Swedish, English, Spanish, some German, some French, some Japanese, and some Italian

\- awarded a Fulbright Scholarship to the Massachusetts Institute of Technology

\- has a master's degree in chemical engineering from the University of Sydney (1982)

<http://en.wikipedia.org/wiki/Dolph_lundgren>

<comment><USER3> Kind of ironic to be so gifted in so many areas, and yet be famous for something you're not even good at.

<comment><USER10> One bad movie pays more than a year in the lab.

<comment><USER11> That's not fair, he has been in tons of bad movies!

<comment><USER10> Directs some of them, too.

</comment></comment></comment></comment></comment><comment><USER12> That was an interesting article. I wish more of the media would highlight Natalie Portman's scientific cred.

The last sentence, "You can be a scientist, but if you want your name in lights, you'd better play one on TV." made me a little sad. Eventually, we get what we celebrate; if we celebrate being a cheerleader (or a beauty queen) more than being a scientist, then we'll get more of those. I don't know how much progress a society can make if everyone aspires to be a cheerleader.

On a positive note: I've been watching bits and pieces of Jeopardy's "Teen Championship" and girls are doing very well in that! I hope the finals is an all-girls affair, that would be great.

<comment><USER13> "I wish more of the media would highlight Natalie Portman's scientific cred"

Can I ask why? It wouldn't make a difference to her performances, so if she chooses to not use her scientific creds why should anyone feel the need to mention them? It doesn't validate her as a person anymore than if she was a talented actress who used to be a waitress.

<comment><USER14> I think ajays said why: _Eventually, we get what we celebrate; if we celebrate being a cheerleader (or a beauty queen) more than being a scientist, then we'll get more of those._

I'm going to stuff words into ajays' mouth but if someone as "cool" as Natalie Portman can be so intelligent, that perhaps helps to counter a little of the anti-intelligence schtick that's common in some areas of life.

That said, many famous people are more qualified and intellectually agile than their public personas and media coverage give them credit for..

</comment></comment></comment><comment><USER15> He's not mentioned in the article, but Dylan Bruno from Numb3rs is an MIT grad (we both played on the football team) and, coincidentally, acted in a movie opposite Ms. Portman :)

Woodie Flowers always used to say that we need an "LA Engineer" (a play on "LA Law for you younger folks) to bring science and engineering into the mainstream. I always cringe at shows like Big Bang Theory that portray smart folks as socially inept - given that association, it's no surprise that many kids would rather be "dumb and cool" than "smart and nerdy" when in fact smart people are just like everyone else.

<comment> brown9-2 _I always cringe at shows like Big Bang Theory that portray smart folks as socially inept_

Fringe makes science look pretty cool, IMHO.

<comment><USER5> From what I've seen of Fringe, it makes a mockery of science.

<comment> brown9-2 I didn't mean to suggest that it portrays realistic science or an accurate representation of the scientific process - after all this is a show whose main plot revolves around travel between alternate universes and non-human shapeshifting sentient beings - just that the show makes it's scientist character the heroes, and not buffoons to laugh at.

</comment></comment></comment></comment><comment><USER16> All right everyone [insert brisk clap-clap], get back to work. Natalie Portman isn't wasting her day wondering about your scientific (or acting) credentials, so you've got better things to do than worry about hers. Go work on your business or some other more fruitful activity.

</comment><comment> contol-m James Franco is very impressive as well. From his Wikipedia page <http://en.wikipedia.org/wiki/James_Franco#Personal_life> :

Franco has been described as having "an unusually high metabolism for productivity...a superhuman ability to focus". Dissatisfied with his career's direction, Franco reenrolled at UCLA in the fall of 2006 as an English major with a creative writing concentration. Having received permission to take as many as 62 course credits per quarter compared to the normal limit of 19 while continuing to act, he received his undergraduate degree in June 2008 with a GPA over 3.5.

He moved to New York to simultaneously attend graduate school at Columbia University's MFA writing program, New York University's Tisch School of the Arts for filmmaking,and Brooklyn College for fiction writing, while occasionally commuting to North Carolina's Warren Wilson College for poetry.[1] He received his MFA from Columbia in 2010. Franco is a Ph.D. student in English at Yale University and will also attend the Rhode Island School of Design.

<comment><USER17> Franco is obviously extremely productive and very bright, but I can't help but focus on the fact that he has a full+ time personal assistant. She's up 18 hours a day with him handing the "details" of his life, so he's free to focus on whatever he wants to focus on.

Sometimes I wonder what kind of difference that would make in my life, particularly when I was in grad school.

And then I tell myself to shut up and get back to work.

<comment><USER18> So... why not make it happen? Perhaps not all of it can be done, but Tim Ferriss talks about having an outsourced personal assistant.

If you are the type who could work all those extra hours, try outsourcing as many activities as possible. Start with housekeeping services, as an example, and perhaps a personal cook.

</comment></comment></comment><comment><USER19> For the geeky types, she has an Erdős–Bacon number of 6 :)

[http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Bacon_number...](http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Bacon_number#Table)

EDIT: it is 6, not 5, sorry

<comment><USER20> I do so desperately want a small walk-on part in a film with Kevin Bacon to get an Erdős–Bacon number of 3.

I know, I know, it's hardly a worthy ambition. But still.

<sigh>

<comment><USER21> Have you tried asking him? A hand-written letter might just work.

<comment><USER20> I yet may do just that. I have, at various times, had speculative versions running around in my head.

Recently a good colleague of mine died very suddenly. I realised that there was so much I had wanted to ask him about, and never got the chance. Last year I got to spend an afternoon with one of my childhood - and adulthood - heroes. That was just 2 months before he died.

If you put up a piece of A0 paper marked off in centimeter squares, and I marked them off one per day, there's a very good chance I wouldn't cross them all off before I die. I'm starting to think of some of the things I want to do for me, as well as the things I want to leave for others.

Maybe I should write to Kevin Bacon.

<comment><USER21> Please post about your progress.

<comment><USER20> If there is any, I will.

</comment></comment></comment></comment></comment></comment><comment><USER22> "Hedy Lamarr complained bitterly that people would look at her face and assume there was nothing behind it. Perhaps it was a case of projection. "When you see a very beautiful face, it's stunning, and you yourself become stupefied," said Lisa Heiserman Perkins, who has completed a documentary about Lamarr. "So you project your own stupidity onto the person you're looking at." "

Now, maybe I'm projecting my own stupidity to this remark but it just seems hare-brained. This effect is very easy to understand: many beautiful people you've met before have little/no interest in science, i.e. appear to be stupid, so your subconscious Bayesian learner assigns a low probability to the gorgeous woman you see having invented a new spread spectrum technique.

<comment><USER23> And yet, there is actually a positive correlation between physical attractiveness and IQ.

<comment><USER22> True, but in most cases this IQ may be dormant, since from an early age attractive people learn that they can get what they want without working as hard as other people. It's like weight lifting on the moon!

</comment></comment></comment><comment><USER24> I'm envisioning a Chuck-Norris-esque meme evolving from said article. Personally, I'm much more of a fan of Greg Graffin, frontman of Bad Religion and Evolutionary Biology PhD from Cornell, who also happens to be a faculty member at UCLA: [http://www.spotlight.ucla.edu/faculty/greg-gaffin_bad- religi...](http://www.spotlight.ucla.edu/faculty/greg-gaffin_bad-religion/)

<comment><USER25> Regrettably, the meme-space vis-a-vis Natalie Portman has already been staked out by hot porridge made of roughly ground corn.

<comment><USER24> I see this image ([http://3.bp.blogspot.com/_KMqOPeCgoT0/S_ABM6dl- II/AAAAAAAAF0...](http://3.bp.blogspot.com/_KMqOPeCgoT0/S_ABM6dl- II/AAAAAAAAF0A/zhu3tXvhHTA/s1600/queen-amidala-5.jpg)) atop a radiantly- colorful meme backdrop, a la Courage Wolf, with such sayings as "I Just Divided By Zero" and "Maybe You Should Have Kept Your Documents in the Cloud, Tesla"

<comment><USER26> Do it. Seriously. I want to see that meme.

<comment><USER24> [http://images1.memegenerator.net/ImageMacro/6023626/I-can- di...](http://images1.memegenerator.net/ImageMacro/6023626/I-can-divide-by- zero.jpg?imageSize=Medium&generatorName=courage-natalie)

[http://images2.memegenerator.net/ImageMacro/6023659/Maybe- yo...](http://images2.memegenerator.net/ImageMacro/6023659/Maybe-you-should- have-kept-those-documents-in-the-cloud- Tesla.jpg?imageSize=Medium&generatorName=courage-natalie)

</comment></comment></comment></comment></comment><comment><USER27> Come on, she is an actress with a BA in Psychology. Lets have this discussion again when she gets her PhD. Until then, perspective.

<comment><USER28> The point wasn't the degree. But more that she made the semifinals of the Intel Science Talent Search -- that in itself is prestigious, but at the same time (and I quote):

"She'd been in films directed by Woody Allen, Tim Burton and Luc Besson, appeared opposite Julia Roberts, Jack Nicholson, Matt Dillon, Uma Thurman, Drew Barrymore and I'm getting tired of typing celebrity names here. She took on the major role of Queen Amidala in the Star Wars prequel trilogy that rocketed her to international fame."

To be honest, I'm not sure there's any degree where the mere act of receiving it would be more impressive than the above feat.

<comment><USER29> "To be honest, I'm not sure there's any degree where the mere act of receiving it would be more impressive than the above feat."

Because being in the presence of popular people is a major accomplishment, right? Far greater an accomplishment than the defense of any original PhD thesis, right?

I can drive to the Viceroy hotel bar right now and be in the presence of a random A-list celebrity if I so choose. By your logic, that act alone sets me worlds apart from the entire body of original research being done by PhD candidates all over the world.

I will _never_ understand the nature of being starstruck. If I want to shut down my rational faculty, I have a bottle of Glenkinchie at the ready.

<comment><USER28> No, she's not Paris Hilton. She was actually cast and did a superb job in roles with all-star directors like Luc Besson, in Leon. It's not that she happened to bump into Luc at a bar. But that she did her homework to be cast and then a great job in the role (and quite honestly I think one of top 1% of performances I've seen, period).

No one is starstruck by Woody Allen. But you're startstruck by his work.

Let me put it to you this way. I'm FAR more certain that you can get a PhD than you could ever get half the critical acclaim or box office receipts that Natalie has gotten.

Although, I'd just love to find out you are actually Will Smith and have just blown my thesis to pieces. :-)

</comment></comment></comment></comment><comment><USER30> Here's the paper she entered into the Intel Science Talent Search: [http://www.natalieportman.com/articles/1998/chemicaleducatio...](http://www.natalieportman.com/articles/1998/chemicaleducation_1998.pdf)

</comment><comment><USER31> I found this article deeply irritating. I didn't even get through the whole thing, but the message was clear. Sure it is great to be a scientist...but everyone really wants to be a movie star. This makes me want to puke. Shining a bright, glowing light on those who are already drenched in adoration and celebrity. The implication is that if you're "just" a great scientist, you still must live with the bitter knowledge that you aren't loved by the masses. And to have the gall to call this a "science" article. This is the sort of shlock that belongs in People magazine.

The New York Times has been reduced to gawking.

</comment><comment><USER32> "Marie Curie - Actress" would have been more interesting.

<comment><USER33> Marie Curie in "Bride of the Toxic Avenger"?

</comment></comment><comment><USER34> What I find fascinating about Hedy Lamarr's patent is that it formed the basis, many decades later, for spread-spectrum communication tech used by wifi and CDMA networks.

[http://en.wikipedia.org/wiki/Hedy_Lamarr#Frequency- hopping_s...](http://en.wikipedia.org/wiki/Hedy_Lamarr#Frequency- hopping_spread-spectrum_invention)

</comment><comment><USER35> In honor of her scholarly pursuits, beauty and skill as an actor, we gave one of our products the internal codename 'Natalie' last year.

</comment><comment><USER36> one of the reasons i loved Avatar is because the foundation of its universe is relentlessly scientific and natural, on top of which there is spiritual and social goodness

another movie like this that comes to mind is The Incredibles, which despite featuring superheroes has clear respect for physics

i sure wouldn't mind more movies like that. i think there is greater creativity from starting with a rigorous foundation

</comment><comment><USER37> Dexter Holland, lead singer of the California Punk group The Offspring, was valedictorian at his High School has a BS and MS from USC, and is currently ABD for a PhD in Molecular Biology.

Additionally he has, not only his pilot's license, but his APTL license (which requires 1500 flight hours) and is a certified Flight Instructor who has made a round-the-world flight in 10 days.

</comment><comment><USER24> Inspired by a comment in this thread, I created a "Courage Natalie" meme generator so you can have fun with how smart she is: <http://memegenerator.net/courage-natalie>

</comment><comment><USER38> She went to Harvard while filming movies (with a grueling schedule to boot). How many of you can say that you went through an equal or greater gauntlet?

I for one believe that shows intelligence and hard work.

</comment><comment><USER39> Each of the actresses highlighted is Jewish.

</comment><comment><USER40> Does this girl have a flaw? haha

</comment><comment><USER41> Headline: Rich Person Does Well.

</comment><comment><USER42> Well yeah...she is Jewish.

</comment><comment><USER43> And let's not forget Tom Cruise. No, wait...

</comment><comment><USER44> I like Natalie. I can't help but wonder, genuinely, if some of her academic success was influenced by her star stature. I've seen evidence that she is indeed quite bright. On the other hand, how many profs are going to give Natalie Portman a B?

<comment><USER6> Now that you mention it, how is Emma Watson doing at Brown University?

</comment></comment><comment><USER45> My favorite celebrity/scientist is Mira Aroyo <http://en.wikipedia.org/wiki/Mira_Aroyo>. Musician, model and a published research geneticist from Oxford University's Biochemistry department. She co- authored an article published in Molecular Microbiology in 2003 and sometimes sings in her native tongue - Bulgarian.

</comment><comment><USER46> The fact that she would rather make movies with Ashton Kutcher instead of spending time trying to solve the problems that plague mankind show what type of person she really is.

<comment><USER47> No it doesn't. Not one bit.

</comment></comment><comment><USER48> I find this articles lack of hot grits disturbing.

<comment><USER49> I know it's (barely) related to the current thread, but Queen has an astrophysicist as a lead guitarist... Face it, some people can pull this multi-discipline s*ht off.

<comment><USER50> There's also Brian Cox (there must be something in the UK water about turning out musicians/physicists):

<http://en.wikipedia.org/wiki/Brian_Cox_(physicist)>

<comment><USER8> Also Tom Scholz of Boston. MIT-trained mechanical engineer, worked for Polaroid, and then left to found one of great classic rock bands.

<comment><USER50> In that vein, all three members of the J. Geils Band were engineering students at my college (WPI) ;)

And apparently the lead singer/guitarist/keyboardist for OK Go (although I think that was after I left)</comment></comment></comment></comment></comment>


World's first fully electric bus fleet quietens Chinese megacity - <AUTHOR> https://www.theguardian.com/cities/2018/dec/12/silence-shenzhen-world-first-electric-bus-fleet <comment><USER2> Does anyone know what companies the electric buses are from? Albuquerque just had to return BYD electric buses because they could not perform as advertised: [https://www.abqjournal.com/1246094/abq-rejecting-all-byd- art...](https://www.abqjournal.com/1246094/abq-rejecting-all-byd-art-buses- switching-to-non-electric.html)

I'm wondering if the technology is mature enough to actually be practical for this, or if Shenzhen will end up having to do an early fleet replacement because they jumped the gun.

<comment><USER3> The ones pictured in the article are BYD. I couldn't find any figures for the makeup of the fleet overall, but I imagine it's mostly BYD, as they seem to be by far the dominant player in the electric bus market, both in China and worldwide.

<comment><USER4> No data but last week when I was there, I pretty much only remember seeing BYD busses and electric fleet. BYD is headquartered in Shenzhen iirc

</comment></comment></comment><comment><USER5> Don't forget the other note there - at the end of the year (end of this month) Shenzhen's taxi fleet will be required to be electric ... this hasn't been happening overnight, there have been electric cabs on the streets for a couple of years now, petrol powered cabs have been required to charge a 3 yuan 'petrol tax' so people prefer the blue electric ones

</comment><comment><USER6> The city i live in Sofia, just got 20 electric busses [0], and are planning to bring 142 new LPG (propane) busses. This is a big deal! However, given that about half of the country's electricity is still from coal, not sure how "clean" those busses really are. (30-35% is from Nuclear power)

[0] [https://sofia.bg/web/sofia- municipality/start/-/asset_publis...](https://sofia.bg/web/sofia- municipality/start/-/asset_publisher/HMYVGw6PDFKh/content/twenty-electric- buses-meeting-the-highest-euro-6-emission-standards-are-running-in-sofia)

<comment><USER7> There are still 2 basic sources of benefit. First, power stations generally use turbines which are much more efficient than internal combustion engines. Even after accounting for inefficiencies electric often comes out better. The other benefit is that it decouples the vehicle from the energy source.

<comment><USER8> Third, it moves the pollution out of the city center.

<comment><USER9> But minus points because transfering the energy and storing it in a battery loses some.

Still, China is probably completely content with getting the pollution out of the city.

<comment><USER10> Transmission loses 1-2%, batteries lose maybe 5%. Compare that to 30% losses for an ICE, above generator losses.

<comment><USER11> 30% is the efficiency of the energy in fuel being turned into work.

You need to consider the efficiency of the power generation, power lines, battery and then the electric motor. Any other comparison is misleading.

<comment><USER10> Correct that his is thermal efficiency, and I apologize for not breaking into out earlier.

An ICE is ~20% efficient.

A combined cycle gas turbine is ~60% efficient, transmission systems ~98%, LiIon ~99%, motors around 85-90%. The first is thermal, the rest are electrical. Well-to-wheel this is about 50%.

My point was just that you really do get a large efficiency improvement (50 - 20 = 30) by electrifying cars. Climate argument aside, energy is simply being wasted.

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> To play the devil's advocate: Shenzhen opened a metro/subway not before 2004 (being only the 8th city in China with a subway). And looking at the system map, it has as much stops as an average 500k inhabitants city in Germany. That's embarrassing for a city with a population of 12M.

Building subways is orders of magnitudes more expensive than running bus lines, even if they are electric. But it's an old standing answer to still thrilling problems of urban traffic...

</comment><comment><USER13> The article talks about barriers electric bus expansion after 2020 when the federal government is scheduled to eliminate subsidies.

However, the buses are going to get cheaper because battery prices keep falling. In the not-too-distant future they will be as cheap as diesels. I think the government is eliminating subsidies because it thinks the expansion is going to continue anyway.

Then there is the problem of charging stations for taxis. But electric car sales in China are exploding, and more and more stations are being built in all the cities, so this is only a temporary problem.

The big thing Americans should be worrying about is that electric buses, autos and trucks are going to take over the world market starting around 2023-2025, and it is looking like China is going to dominate.

<comment><USER14> The stations are pretty important in China since many people in the bigger cities don't have parking spots they control for their cars where they could charge overnight (many even have to park wild). This is less of an issue in the states for daily commuters.

</comment></comment><comment><USER15> On a side note, what happened to China's elevated megabus/trolley?

<comment><USER16> It was a silly concept that has been scrapped, IIRC.

</comment></comment><comment><USER17> Capitalism beat Communism in the 80's but it really seems Chinese 2.0 Communism is whipping its butt. I'm very jealous that they get to ride Maglev trains and I can't even get high-speed rail. :/ In the future it's going to be good to be Chinese, unless you like Democracy that is.

<comment><USER18> > _Capitalism beat Communism in the 80 's but it really seems Chinese 2.0 > Communism is whipping its butt..._

In fairness, _" Chinese 2.0 Communism"_, is really just market capitalism.

<comment><USER19> ...with lax safety standards and little consideration for property rights.

We could build the Melbourne - Sydney high speed rail line in 3 years if we didn't care about a) the people who built it or b) the people whose houses were in the way.

<comment><USER20> How many would benefit vs how many are inconvenienced? Seems like the beneficiaries easily outnumber the few who lose out.

<comment><USER21> Another benefit would be that people would pay much greater attention to local politics. You would need to make sure that the bus road goes through your neighbor's house, not your house. Whoever ignores the local democracy, loses their house; that is a powerful incentive for participation. What could possibly go wrong?

</comment></comment></comment></comment></comment><comment><USER22> Anyone near Futian who can go take a look and provide first-hand feedback?

<comment><USER23> It's not just the busses and taxis but lots of bikes are electric too. Most of Southeast Asia is full of loud mopeds but Shenzhen now has these small electric bikes which people make deliveries on (similar to other parts of Asia), except quieter.

Another fun fact is that the local government restricts electric bike ownership over a certain capacity to citizens. It'll be hard to get one as a visitor. I'm not quite sure why.</comment></comment>


ChoiceTweets — wearable Twitter gear - <AUTHOR> http://choicetweets.com/ <comment><USER2> It depresses me they'll probably make some quick cash before being forgotten.

</comment><comment><USER3> Wow. Just wow.</comment>


Enter a three dimensional representation of code - <AUTHOR> https://store.steampowered.com/app/777890/Primitive/ <comment><USER2> I'm not convinced if this really adds any additional insight over say a regular call stack or something similar. As can be seen in the demo video, all the visualisations are still 2D and are simply laid out in 3D and are connected by lines.

While this looks cool as a demo, I'm simply not sure if there's any real added value here, at least for now.

The title is misleading as well, all code is still shown as a flat file, it's just rendered at specific spot in 3D space.</comment>


Uruguay is now generating 95% of its electricity from renewable energy - <AUTHOR> http://qz.com/566773/uruguay-is-now-generating-95-of-its-electricity-from-renewable-energy/ <comment><USER2> also, on Guardian UK: [https://news.ycombinator.com/item?id=10669272](https://news.ycombinator.com/item?id=10669272)</comment>


Advanced biological computer developed - <AUTHOR> http://www.sciencedaily.com/releases/2013/05/130523180318.htm <comment><USER2> Article link (paywall for full-text): [http://www.cell.com/chemistry- biology/abstract/S1074-5521%28...](http://www.cell.com/chemistry- biology/abstract/S1074-5521%2813%2900167-1)</comment>


Setting up an Android Tablet for Handicapped Children - <AUTHOR> http://a1.blogspot.com/2012/09/setting-up-android-tablet-for.html

<comment><AUTHOR> If anyone has any questions, feel free to ask. Having been through this a couple times now I'd be happy to help.</comment>