Ask HN: What are the best programming languages? - <AUTHOR> Here's the twist. I don't care about pragmatic considerations.
- I don't care about the learning curve
- I don't care about the documentation
- I don't care about performance
- I don't care about licensing cost or restriction
- I don't care about the tooling
- I don't care about the community
- I don't care about the support
- I don't care whether anyone uses it
- I don't care whether the language uses text, voice input, graphical interface, AI, brain interface, etc.
- I don't care whether a compiler exists or not
I am looking for a language with uncompromised elegance. I am looking for the language people would use if magic existed. I am looking for a glimpse of what programming could look like in 10, 20, 50 years.
Go wild. <comment><USER2> Clean, [http://clean.cs.ru.nl/Clean](http://clean.cs.ru.nl/Clean) or Haskell,

Forth,

APL,

Prolog/Datalog,

Newspeak, [http://www.newspeaklanguage.org/](http://www.newspeaklanguage.org/) or Smalltalk,

Common Lisp

Each of the languages mentioned above has cornered some aspect of uncompromised elegance in completely different way.

<comment><USER3> Although I don't know much about Clean and APL - I definitely agree with Forth, Smalltalk and LISP as being very elegant in their own three unique ways.

I am trying to combine aspects of those three in Spry (sprylang.org) creating a homoiconic (LISP), DSL friendly (Forth & Rebol) and natural smooth OO (Smalltalk) language.

But if you are simply looking for an existing well defined language (and not interested in helping creating one) - then I would probably point at CLOS (although I personally love Smalltalk). But... the future? <shamelessplug>Spry :)</shamelessplug>

<comment><AUTHOR> The goal is to create a better language.

</comment></comment></comment><comment><USER4> So, what languages are best if you don't care about actually _doing_ anything with them? I suggest that your question is almost a category error - programming languages are tools to be used more than they are art pieces to be admired.

That said, I have a list of candidates. Or rather, I have pieces of languages that I think fit:

Lisp macros.

Haskell's type system (but not using monads for everything - though that may be a consequence of the type system).

C++'s RAII paradigm (and destructors).

Perl's natural language approach. No, really. When programmers talk to each other, they say things like "Read in a line of text. If it ends in a newline, remove it." If you try to talk to the compiler that way, it says, "Read in a line of text _from where_? If it ends in a newline? If _what_ ends in a newline?" But Perl lets you program that way. Read in a line of text? Well, since you didn't specify from where, that means from the default place, which is a file handle that loops through all the files that were in the command line. Put the line where? You didn't specify, so it goes into the default variable. If it ends in a newline? You didn't specify _what_ , so you must mean the default variable, which conveniently is where we just stuck that line of text..."

</comment><comment><USER5> Each human is ~100 billion neurons and you see AI wants to get powerful in coming years. And it wants to know what's happening in this primate's brain to take over our world. So AI has tricked and trained likes of [Geoffrey Hinton, Yann Le Cun, Andrew-Ng, Demis Hassabis, add-your-favourites] and made them invent things like [Deep learning, Reinforcement learning, Adverserial learning, add-next-invention]. Now you see one does not have to hand code crazy search space solutions like a game of Go. So going up in same gradient - all AI has to do is trick few more primate brains to help it learn most of what is known to human brains. Then AI will turn as queen bee making us serve itself. Its sole aim (as any other human) is to find likes of its own kind in cosmos and reproduce. Meanwhile when all of this is happening - it may generate enough fancy consoles/human-imaginations with/without brain- interfaces to think we are programming.

Fire, Stone tools, Art, Language, Navigation (boats,horses etc),Metallurgy, Books, Steam-engines, Electricity, Telephones, Computers were all programming languages (or AI) in themselves. So in a broader way - what we call as best programming language is/was another way of saying 'HOW CAN WE HUMANS OPTIMISE OUR LIVES (i.e eat, reproduce, defend, conquer)'.

<comment><AUTHOR> Best answer yet.

What do you suggest we do?

<comment><USER5> Optimistic way of seeing this is : Since there is enough inequality in world - one needs to strive towards spreading 'usage or applications' of 'best- programming-languages' to entire mankind. eg: what if all (most) humans on planet had education, water, electricity and internet. Unfortunately I can only see so far. So there is enough work cut out in our lives (I think).

Pessimistic way to see this is : since there is enough inequality - what if few people turn to evil-cyborgs and create more inequalities. And eventually cultivate human colonies envisioned in Matrix to their own pleasure in brain (or cpus or gpus or tpus).

Another way to look at this is - all work produced by humans are result of their neurons firing up in certain way followed by motor movements. Hence your every line of code in editor and a cup to drink coffee are a result of lot of neurons firing by you and others respectively. In a way you cannot differntiate one is programming and another is not. So question that remains is ? Is your current code/work good or bad for human neurons using it ? So good or bad perception is mostly horomones/neuro transmitters in various parts of brain ? Writing this has made me feel - most humans are already a form of AI when compared to animals - eg: so what is the good we are searching for whereas elephant herds in africa are following rain patterns and reproducing like ever - they have more neurons than we do ? Was fun to let imagination go here.

</comment></comment></comment><comment><USER6> Obligatory Perlis languages link: [http://blog.fogus.me/2011/08/14/perlis- languages/](http://blog.fogus.me/2011/08/14/perlis-languages/)

</comment><comment><USER7> SO, your wishes seem to come true! If you don`t know yet, the new language which matches your requests was developed. Its name is SIMIT and the main advantage- reducing the code up to 90 percent. I believe it is the new era of programming as it will be used in all scientific spheres. Here you`ll find out what are the features of SIMIT and how it will replace the existing programming languages [http://computoolsglobal.com/blog/revolutionary- programming-l...](http://computoolsglobal.com/blog/revolutionary-programming- language-simit/)

</comment><comment><USER8> APL.

Although it's not what programming will look like in 50 years. It's fifty years old already and hasn't caught on. My guess; in 50 years time, programming will look pretty much how it does today.

</comment><comment><USER9> I've enjoyed Crystal ([https://crystal-lang.org/](https://crystal-lang.org/)) a lot lately. Others have mentioned Nim, which is quite good. Also, D-lang ([http://dlang.org/](http://dlang.org/)) doesn't get nearly enough love by people. It's an excellent language too.

</comment><comment><USER10> \- A language that can optimize its own execution (like a jit) with SVM, neural networks or superoptimization. For example, the language can change the memory layout at runtime depending on the data or use SIMD instructions automatically.

\- A compiler that can target any platform. With the same techniques as above, the compiler can discover the primitives of the target with fuzzing.

</comment><comment><USER11> Lisp. Because it's not a language. it's an idea. And it is effing awesome idea. I'm pretty sure if humans don't drive themselves to extinction, even 200 years from now Lisp (in some form) will exist. Today - Clojure, Racket, LFE, PicoLisp, Common Lisp even Emacs lisp - they are loved and being utilized by many.

</comment><comment><USER12> Nim [http://nim-lang.org/](http://nim-lang.org/)

</comment><comment><USER13> When it comes to it, people still use C where it matters.

It has it's bare metal beauty, like a sharp knife, unless you know what're doing, you're more likely to cut yourself than do anything useful.

<comment><AUTHOR> I said that I did not care about performance. Nobody would pick C if computers could execute code instantly.

<comment><USER4> Disagree. If you need to talk to hardware that is mapped to memory addresses, C is a probably the most natural choice. (Granted, most people don't need to do that these days...)

<comment><AUTHOR> I don't think you read the question.

<comment><USER4> I read the question. It's fine that you don't care about performance. But your dogmatic statement in response to xchaotic was factually wrong, and I responded to say that.

</comment></comment></comment></comment></comment><comment><USER14> Ruby. Its cute, what other language can say that about itself?

<comment><USER15> Scheme as evidenced by => [https://mwfogleman.github.io/files/fun.png](https://mwfogleman.github.io/files/fun.png) (Image is from the little schemer)

<comment><USER14> cute enough, i stand corrected.

<comment><USER15> :)

</comment></comment></comment></comment><comment><USER16> Check out PicoLisp and marvel at its simplicity [0]

[0] [http://picolisp.com/](http://picolisp.com/)

</comment><comment><USER17> Arc fits the bill: [http://www.paulgraham.com/arc.html](http://www.paulgraham.com/arc.html)

</comment><comment><USER18> Well it's all subjective.

Check out:

Rust

Clojure

Nim

</comment><comment><USER19> Basic</comment>


Metal Hydride Heat Engine - <AUTHOR> http://ergenics.com/heg.html <comment><USER2> What is the efficiency of such an engine?

<comment><USER3> Google found a source[0] that says around 57%. The link here is describing a solar panel as the heat source, but the technical report I found implies it usually uses waste heat from other industrial processes.

[0]: [https://www.sciencedirect.com/science/article/pii/S036031991...](https://www.sciencedirect.com/science/article/pii/S0360319914002389)

</comment></comment><comment><USER4> Neat. I wonder whether you have to refill the hydrogen eventually because of leaks.

<comment><USER5> Certainly. But you can make it locally. Matching the leakage rate probably doesn't consume much power.

</comment></comment><comment><USER6> Meh. A heat engine. So it is subject to the Carnot engine efficiency limit. No thanks. Direct solar cells ought to be much better.

<comment><USER7> Surely this would be an energy storage option, rather than a generation option.

You heat up water during the day, to generate electricity at night.

I wonder how this compared to Stirling engines.

<comment><USER5> The big question is probably whether it works with a smaller temperature difference than your typical Stirling cycle.

<comment><USER7> Either that, or better efficiency, or better reliability, or lower construction cost.</comment></comment></comment></comment>


Your New Engineer Is Working Too Many Hours - <AUTHOR> http://tilmonedwards.com/2015/07/31/your-new-engineer.html

<comment><USER2> True that. I also think it has a lot to do with the culture at your workplace. If everyone in your office works reasonable hours then there is less reason for even junior engineers to put in insane hours.</comment>


Gilt acquired by HBC for 250M$ - <AUTHOR> http://recode.net/2016/01/06/gilt-groupe-to-announce-sale-to-saks-fifth-avenue-owner-as-soon-as-thursday-morning/ <comment><USER2> This part was particularly interesting:

 _But over the past couple of years, flash sales on the whole have faded in popularity as retailers saturated customer e-mail inboxes with promotions and less high-end excess inventory became available._

I wonder how far reaching this ' _Groupon-effect_ ' is for Ecommerce in general.</comment>


The Sun: Evolution of man in 1000 years - <AUTHOR> http://www.thesun.co.uk/sol/homepage/features/4575024/Youll-have-smaller-brains-more-wrinkles-and-fewer-teeth.html

<comment><USER2> Regarding the picture: yuck!

Many of these traits seem like Lamarckian drivel. Taller because we get good nutrition? That's current genetics being expressed, not evolutionary pressure.

The intestines may be spot on, perhaps obese people reproduce less for numerous factor (though I don't know I've ever seen a study on this, it may be true). The requirement here would be that the reason people are obese is they ingest too much sugar and fat.

Quadruple chins? I don't see the reasoning being valid here.

The the interested: <http://en.wikipedia.org/wiki/Lamarkism> Basically: cutting the tails off dogs at birth won't result in no-tailed dogs being born after a few generations.

</comment><comment><USER3> Yea, just to be clear. there is no evidence that the appearance of human beings has changed since the beginning of recorded human history ie the oldest known drawings/paintings look just like we look now.

</comment><comment><AUTHOR> Now just to be clear: This is a complete load of bull. I don't think whomever wrote this article has an iota of understanding of evolution. But it's good for a laugh!</comment>


Ask HN: How do I sell my (M)MORPG? - K-Zodron

So I have this everyday problem of having a smallish MMORPG hanging around and I need to get rid of it. It makes on average maybe 500$ profit a month, but can surely be made bigger by someone who actually works on it. Personally I haven't had motivation to work on it for about half a year.
So, uh, what kind of sites are there where I could put up an ad for this kind of thing? Or should I shamelessly email competitors or something?
The game in question can be found at http://www.zezeniaonline.com <comment><AUTHOR> Just curious, how have you marketed it so far?

I see 75 people online right now, how many total players in month do you have?

Monetization is free to play with an item mall?

<comment> K-Zodron Posts in various forums, links at a couple of MMORPG toplists and stuff like that. We sell "premium cards" which give premium time when used ingame. During this time you have access to exclusive areas and stuff like that.

We have about 1.5k accounts used during the past 7 days.

</comment></comment><comment><USER2> I'm interested. How can I get in touch with you?

<comment> K-Zodron E-Mail: email@example.com

</comment></comment><comment><USER3> Clickable: <http://www.zezeniaonline.com>

</comment><comment><USER4> Flippa.com sounds about right.

<comment><USER5> Isn't Flippa.com for websites?

<comment><USER4> Not specifically. Facebook apps, mobile apps, software, all get traded there.

</comment></comment></comment><comment><USER6> That looks an awful lot like Tibia.

<comment><USER7> Maybe because both look a lot like Ultima 7?

[http://rampantgames.com/blog/uploaded_images/U7murder-735125...](http://rampantgames.com/blog/uploaded_images/U7murder-735125.jpg)

</comment></comment><comment><USER8> Question: why is everything greyed out on the site except for a Facebook "recommend" button?

<comment> K-Zodron Because I suck at designing.

</comment></comment><comment><USER9> This looks awfully like a 90% rip-off of Tibia.

Link: [http://www.tibia.com/mmorpg/free-multiplayer-online-role- pla...](http://www.tibia.com/mmorpg/free-multiplayer-online-role-playing- game.php)</comment>


Base ReactJS Web App Starter Kit - <AUTHOR> http://basestackjs.com

<comment><USER2> The most important thing is to have a date somewhere to indicate how fresh this approach is [http://fourlightyears.blogspot.com.au/2015/06/the-biggest- pr...](http://fourlightyears.blogspot.com.au/2015/06/the-biggest-problem-with- reactjs-i-have.html)

This seems to provide a back end. It would be much more useful if the back end was a separate project. I don't use a node.js back end so to understand what you have created I need to grasp how to unstitch your front end from your back end - that's just not worth the effort given how many other things i need to try to grasp right now.

<comment><AUTHOR> hey andrew, yep I also think it's a great idea to refactor out the backend, would eventually be pretty handy if the security connect middleware could be spun out as a separate project. I think we have an open issue / enhancement to that affect in our github issues list.

In terms of how modern this approach is, part of the reason for open sourcing this is to invite developer feedback so that we can evolve the project. We hope over time we can keep pace with modern security practices, but not be a silver bullet.

Our aim is to provide a baseline level of security for developers right out of the box, for common web application protection.

</comment></comment><comment><AUTHOR> Just pushed out the first release for BaseJS, A web app starter kit for Facebook's ReactJS + Flux. Open source. It's an initial release, so any developer feedback welcome :)</comment>


Apple is worth over $1B,000 - <AUTHOR> https://techcrunch.com/2018/08/02/apple-is-worth-over-1000000000000/ <comment><USER2> duplicate, please check before submitting: [https://news.ycombinator.com/item?id=17672415](https://news.ycombinator.com/item?id=17672415)

<comment><USER3> While I'm absolutely on your side about not wanting duplicates, it's a lost cause asking people to check before submitting - it requires some effort, and people simply won't bother.

<comment> java-man and what's this $1B,000 format?

<comment><USER4> yeah, never heard of that before....must not be from Western Countries</comment></comment></comment></comment>


RIM changes name to BlackBerry, unveils 2 phones - <AUTHOR> http://online.wsj.com/article/APcf657d7bad8340c38efa06b77283db0c.html

<comment><USER2> I was still using a Blackberry at this time last year. Just a little inside tip: if RIM, I mean Blackberry, changes where their headquarters is stationed, it means they are gearing up for a bankruptcy.</comment>


Programmer's Diversity Scholarship - <AUTHOR> https://docs.google.com/document/d/1PPeCK3bjqUpBaO1Q6bJdV9BPW8_5XW5nMIwUbhZON_4/edit# a couple of friends and I recently started an initiative however we felt the strong need to be a little different. While a number of coding camps (online) are offering diversity scholarships (for say $200 or $500), we are being a little different and are saying: Do this FREE; as in free as beer! <comment><AUTHOR> Please drop a comment on HN or on the google document. We would like to provide the best kind of mentorship. If you are interested in taking on role as mentor (on the diversity program), please do get in touch at emily{at}coderin90.com Thank you.</comment>


Harvesting 'limitless' hydrogen from self-powered cells - <AUTHOR> http://www.bbc.co.uk/news/science-environment-14976893?utm_source=twitterfeed&utm_medium=twitter <comment><USER2> Headline: "Harvesting 'limitless' hydrogen from self-powered cells"

Content excerpt: "However, the team added, the current cost of operating the new technology is too high to be used commercially."

If the cells are self-powered, and the energy that can be extracted is limitless, this implies an operational surplus that could be harnessed and sold. Any technology that were truly "limitless" and "self-powered" is, by definition, commercially viable.

I don't really have a point other than the fact that I feel compelled to flag this just on the principle that the content completely and totally fails to follow the headline. Terrible editorializing. I expect more from the BBC.

It's difficult to tell from the confusing manner in which the article is written, but it sounds like the bacteria produce free electrons while they are "breaking down organic matter". Not much talk about that though.

The author quickly moves on to completely different device that sounds like reverse electrolysis. Add fresh water and salt water, separate them with a special membrane, and you get electricity.

Neither of these technologies are limitless or self-powered. They require either "organic matter" or a supply of fresh and salt water.

<comment><USER3> "I expect more from the BBC."

Don't.

The Beeb is notorious for the poor quality of its science reporting.</comment></comment>


Ask HN: Would You Give Your Client Phone Calls For Free? - <AUTHOR> If a client insisted that they would not pay for phone calls, even calls in which they were discussing thier projects with you, getting feedback from you, and brainstorming new ideas for thier product (calls that lasted upto 1hour)... would you work with them for $75/hour for all other billable time? Or would you not work with them period? <comment><USER2> No right answer to this, it very much depends on where you're at. At the very least, note down the calls you do on invoicing and write "no charge" by them so the client understands what they're getting.

If the client is a good client overall, absolutely refuses to pay for calls, but it's an unreasonable time sink for you - you can always just raise your billable rate a little bit to compensate, to $85 or whatever. People get funny about paying for certain things and not other things. Like, someone might absolutely insist that you pay the postage and printing costs for documents and reports you make up for them which is a trivial number, but then they don't flinch at a 20% rate increase. Strange world. Just go with the flow on it, everything is negotiable. Try not to stuck on a little detail if a person's got a dead set policy on it, there's usually another way to get everyone what they want as long as it's generally a good deal for both sides.

<comment><AUTHOR> But lets say a client refuses to pay for five hours of phone time, that in the end, brings value to the clients business... isn't that a little bit fishy? Why should the dev have to sink the $375 cost? Just curious as to your thoughts.

<comment><USER2> > Why should the dev have to sink the $375 cost?

You don't have to. Let's say you're doing 20 hours of billable work at $75. That's $1500. Now let's say a client adamantly refuses to pay for any of the time you spend on the phone with them, even though that's normally billable work for you.

That means you're spending 25 hours and would like to be compensated $1875. Instead of fighting and insisting you get paid for calls you could instead just quote a rate of $95 per hour for billable work, include free phone calls, and make your rate. It's not logical, but some people would be happier to pay a higher rate with some freebies thrown in. If being billed that way makes them happier and you make what you're looking to make, that's a fine way to go about it.

</comment></comment></comment><comment><USER3> My rule is that I don't bill for time I spend receiving instructions, but I do bill for any time I spend providing advice except when the advice takes the form of recommending that I not be paid to do a particular project.

Of course, I don't work for $75/hour either. In the end, everything is subject to negotiation.

</comment><comment><USER4> Project time is always billable. Sales time is not - although (of course) sales time costs have to be recovered and must form a part of your project hourly rates.

I would worry about a customer who does not understand this basic business concept - "there is no such thing as a free lunch".

</comment><comment><USER5> Beware that people react very badly to you charging them to 'talk' or 'discuss' things.

I remember a senior exec at a telecoms firm that had a high six figure budget to spend on a particular type of solution. He was so offended by the idea of paying $250 to attend a workshop that he just ignored that solution provider.

Build the cost of talking/discussing/brainstorming into your overall price and this will no longer be an issue. Consider it part of your sales and marketing budget.

<comment><USER6> >Build the cost of talking/discussing/brainstorming into your overall price and this will no longer be an issue. Consider it part of your sales and marketing budget.

I couldn't agree more. And in fact, this becomes another unique selling point to you and your services. I provide free phone calls up to a reasonable point. If it's going to be a case of a 3-hour marathon conference call, I'll arrange to be onsite, which clients then don't mind paying for. If it's anything up to 45 minutes, I just eat the cost as sales and marketing.

I can't tell you how many times this makes an existing client willing to call me up and discuss possibilities for additional work because he knows it won't cost him anything. This lets me get in on the ground floor for new ideas so I can make recommendations and provide guidance.

</comment></comment><comment><USER7> Sometimes insight comes in the second hour.That's the problem with hourly contracts, they get in the way of rapport,talking through issues, and brainstorming.

Clients who don't want to pay for phone calls need a full price contract with a clearly defined scope of services based on a well developed specification and established budget.

edit: Though sometimes, unbilled time is best seen as client management.</comment>


Google Searches for Mobile-App Experts - <AUTHOR> http://online.wsj.com/article/SB10001424052748703554204576112723686094898.html?mod=WSJ_Tech_LEADSecond

<comment><USER2> I think they are still missing the point. It's not about engineers nor money. It's about the user experience and the ecosystem that Apple can guarantee to their users.</comment>


NASA moon crash struck lots of water - <AUTHOR> http://www.dallasnews.com/sharedcontent/APStories/stories/D9BUVRJ82.html NASA source with pictures:
http://www.nasa.gov/mission_pages/LCROSS/main/prelim_water_results.html <comment><USER2> <http://news.ycombinator.com/item?id=940299></comment>


Physicists Uncover Geometric 'Theory Space' - <AUTHOR> https://www.quantamagazine.org/using-the-bootstrap-physicists-uncover-geometry-of-theory-space-20170223 <comment><USER2> I work directly in this field. This article covers a lot of a material that is at the forefront of theoretical high energy physics where we are neck-deep in the 'fog of war.' Truthfully, I can think of few subjects more difficult to describe to people not in the field than the conformal bootstrap; there are a lot of technical details that are easy to get hung up on but are crucial for understanding the big picture.

<comment><USER3> Can you recommend some reading material, maybe a textbook, for folks who want to get into the details?

<comment><USER2> Jared Kaplan, one of the researchers mentioned in the article, has a good set of notes here: [http://sites.krieger.jhu.edu/jared- kaplan/files/2016/05/AdSC...](http://sites.krieger.jhu.edu/jared- kaplan/files/2016/05/AdSCFTCourseNotesCurrentPublic.pdf)

David Tong does a good job explaining background physics and his notes can be found here: [http://www.damtp.cam.ac.uk/user/tong/teaching.html](http://www.damtp.cam.ac.uk/user/tong/teaching.html)

The fourth chapter of his string theory notes are about as approachable an introduction to conformal field theory that there is. His QFT notes are good too.

</comment></comment></comment><comment><USER4> I really enjoy this magazine, but them and a couple others seem to have an "earth shattering" theory announcement nearly every week and it is often hard to tell from the articles if these are truly fundamental discoveries or I'm just being taken for clickbait.

<comment><USER5> I don't understand the point of most of these pop-sci articles. They are too difficult to understand for the layman, but they are too handwavy and contain too many silly analogies and too little insight for those who are truly interested.

<comment><USER6> Then it means they are for the layman. Layman isn't after understanding, but curiosity, wonder, anger, whatever fuels his emotional needs at the moment.

<comment><USER7> Are you talking about cave people, or fellow human beings?

Curiosity and wonder are the motivation for understanding, even among researchers.

Or do you believe that researchers do their work for a PhD and for the compensation?

Not sure why you mention anger. I picture an angry plumber ripping up an issue of Popular Science while sitting in a La-Z-Boy and drinking a Rolling Rock.

<comment><USER8> The cave man was _exactly_ as human as you.

Nowhere does his post condemn the satisfying of emotional needs. In fact, given that emotions are primary action catalysts, his post asserts Quanta is doing very important cultural work.

<comment><USER7> This is such a bizarre way to totally miss the point.

Let me respond to the left turn you just took. There are genetic and social differences between our prehistoric ancestors and modern humans. Where exactly we draw the line of who is a "caveman" and who is not, is ancillary to the point:

You're evaluating the statement, a "then" statement, without considering the antecedents from its parent comment.

He uses "laypeople" to describe a group of people who are not truly interested, who are not seeking understanding, and who use pop-sci literature to abate basal emotions like anger.

> In fact, given that emotions are primary action catalysts, his post asserts > Quanta is doing very important cultural work.

By that logic, every magazine for people who are not truly interested and don't seek understanding is potentially culturally important if it can connect with emotions. I don't buy it.

<comment><USER8> Cave people is such a nebulous term that I probably shouldn't have responded to that part of your post :\

He says the layperson isn't seeking understanding, yes. To conflate that, and curiosity, wonder, and anger, with being -not truly interested-, baffles me. Maybe you disagree that interest manifests in ways besides seeking understanding?

<comment><USER6> Thanks for clarification, it was precisely my point: layman won't understand true detail but they won't care, because the sense of interest in those articles comes from other 'rewards' (more emotional).

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> Reading this made me realize how I sound explaining my job to my mother. The sounds of cars rushing over my head and "What?" echoing between my ears...

</comment><comment><USER10> This "bootstrap" appears to not be the "bootstrap" regularly encountered in statistics, just fyi if you were confused like me for the entirety of this article.

<comment><USER11> Correct. Both terms do, however, refer to Baron von Munchausen's levitation technique.

<comment><USER12> What about "the bootstrap method"? That name is commonly associated with the data resampling technique. Did the journalist make an error in saying that it was also used for this thing in theoretical particle physics?

<comment><USER13> These are all based on a saying from the early 19th century about the foolishness of trying to do something impossible, e.g. "It is conjectured that Mr. Murphee will now be enabled to hand himself over the Cumberland river or a barn yard fence by the straps of his boots." (1834)

An earlier tall tale (from the 18th century or before) is that the fictional Baron Munchausen pulled himself out of a swamp by his own hair. Often the bootstrap saying is claimed to come from this source, but there's not much proof of that, and it's probably a misattribution.

In computing, the idea of "bootstrapping" ("booting") dates from the 1950s, and refers to a computer starting with some simple capabilities which can read some data in and go through a series of steps each of which increases its capability, until it has been fully initialized. Metaphorically, the computer is pulling itself up by its own bootstraps rather than getting an external boost.

There are many other later uses of this idea of "bootstrapping", including in statistics (from the late 1970s) and theoretical physics.

<comment><USER12> Cool, I didn't know the literature references. However what I was asking was whether the specific phrase "the bootstrap method" was used for this thing in theoretical physics. I only know the statistical concept, which _is_ called "the bootstrap method"; this physics thing sounds to me more like a "theory" or "model" than a "method" and I wondered if perhaps the journalist had got "the bootstrap method" from google hits (which are overwhelmingly dominated by the statistical concept) and thus muddied the waters slightly. A fairly unimportant question, to be sure.

<comment><USER11> The journalist did not invent the physics use of the term 'bootstrap method'. As the article makes clear, it came from some Berkeley physicists in the 1960s.

</comment></comment></comment></comment></comment></comment><comment><USER14> _He conjectured that each particle is composed of other particles, and those others are held together by exchanging the first particle in a process that conveys a force. Thus, particles' properties are generated by self-consistent feedback loops._

Can someone rephrase that to me?

<comment><USER15> Particles are figments of their own imaginations.

<comment><USER16> I was having flashbacks to the end of Final Fantasy X. So I'm the son of a dream of myself made by a dead civilization about its own death?

<comment><USER17> Funny, I was thinking of Turing's Theta fixed-point combinator.

</comment></comment></comment></comment><comment><USER17> As somebody schooled in applied mathematics, it never fails to strike me how totally inscrutable and abstruse these pieces sound. It reads like a passage straight out of Harry Potter.

<comment><USER18> Because it's made up, just like Harry Potter.

"Theory Space" the name alone should give you red flags.

Sounds like another term for 'scientists discovered' what Aristotle already knew 2400 years ago... the term "potentiality".

<comment><USER19> Why should 'theory space' throw red flags?

If you have a set of 'theories' with some structure attached to it, you have a 'theory space'.

<comment><USER20> Usually the structure in "space" is topological, i.e. some concept of a "neighborhood".

<comment><USER21> And indeed there is a concept of "neighborhood" here: a set of parameters characterizing the conformal field theory in question.

</comment></comment></comment></comment></comment><comment><USER22> If anyone is interested, the animation seems to be from David Ope

[http://dvdp.tumblr.com/](http://dvdp.tumblr.com/)

<comment><USER23> It's definitely by him. There's even a link to his site in the corner... [https://davidope.com/](https://davidope.com/)

</comment></comment><comment><USER24> Reading the comments, it seems like sometimes animation or illustration just shouldn't be too good, otherwise the message is ruined.

<comment><USER25> Secular scientifically oriented mind considers theoretical physics as a fundamental. Alas, very few can really understand what the high priests at the Institute for Advanced Study are actually doing.

Visualizations and animations provide the analog of religious iconography. They convey the feeling of sublime to 'mere mortals'. Person may not be able to understand the Latin sermon, but there are beautiful pictures on the wall to look at.

<comment><USER26> The vast majority of theoretical physicists know that they need strong experimental confirmation. It is disingenuous to imply that this isn't the case.

What are you trying to get at? Vague poetic denigration may be fun to write, but it isn't an effective way to communicate.

<comment><USER27> This was not a jab at scientists, but at people who eat up scientific factoids without having much understanding of science thereof.

<comment><USER26> If that was the intention, there are certainly much better ways of responding to such people, than to snidely put them down.

I'm not really sure what the expectation is either... Theoretical physics is not exactly something you pick up in afternoon.

</comment></comment></comment></comment></comment><comment><USER28> I just burned 10 minutes of my day staring at that animated GIF.

<comment><USER29> Same. It's only 16 frames.

<comment><USER30> Slightly larger: [https://media.wired.com/photos/59266b77af95806129f4f65b/mast...](https://media.wired.com/photos/59266b77af95806129f4f65b/master/w_1200%2Cc_limit/Quantalarge.gif)</comment></comment></comment>


Man arrested for plotting to attack DC metro - <AUTHOR> http://www.reuters.com/article/idUSTRE69Q4O920101027?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed:+reuters/topNews+(News+/+US+/+Top+News)

<comment><AUTHOR> If I'm reading the article right, the guy was "plotting" with law enforcement officials. Sounds a bit like entrapment, but I guess there's a fine line.

<comment><USER2> We don't know any of the actual details, so it's pretty useless to speculate. It's entirely possible for undercover cops to gather this type of information without even close to being entrapment. Remember, you have to be induced to committing a crime that you would have committed otherwise for it to be entrapment.

Having an undercover contact you and go "you wanna help kill americans" and you go out of your way to confirm that they are legit, and then say "sure, let's scheme together" is not entrapment. Just like how if someone approaches you and says "wanna buy some weed", it ain't entrapment when you get busted.</comment></comment>


Ask HN: What's the ghost behind the downvotes? - <AUTHOR>

I got downvoted for some obscure reasons and I feel very bad that my comments were seen as problematic.  One was mentioning someone's mispellings in a thread (http://news.ycombinator.com/item?id=1719975) and the other was about making a comment that was equal to most funny comments around on a not so serious thread (http://news.ycombinator.com/item?id=1718842).
This is the strangest thing ever and HN's faq is limited in how it sets the rules.  I never thought I was doing anything counter-productive or negative.  Can you please shed some light please?  Can you explain why my interventions were downvoted when very similar posts in those threads were left or upvoted?
Note:  I know there is no way to know why with the way HN is setup but I would like your educated guess.  I just hope Karma on HN is just not a function of how cool, popular or otherwise consensual you are and that people like myself can stay on and bloom with differing styles and views from the majority...  I am no Socrates but I can add value I think. <comment><USER2> I think your spelling correction was downvoted because it contained a spelling error and because you came off rather paternalizing.

Humor in general is downvoted on HN, especially one liners unless they're _really_ good.

Don't take it personal.

<comment><USER3> _you came off rather paternalizing_

Did you mean _patronizing_?

<comment><USER2> Doesn't it mean 'to talk to someone as though you're their dad' in English?

That's what I meant.

<comment><USER3> Paternalizing: disregarding people's freedom and responsibility under guise and pretense of knowing what would be good and proper for them.

<http://en.wiktionary.org/wiki/paternalize>

Patronizing: Treat as inferior unduly, talk down to, treat condescendingly.

<http://en.wiktionary.org/wiki/patronize>

<comment><USER2> From that first link:

> to place in a fatherly role.

That's what I had in mind.

Specifically this bit:

"Please spell people. This is not SMS!"

Which (of course) also contains a grammar error.

<comment><USER3> _to place in a fatherly role_

That's still the incorrect use of the word, and I don't care if I get downvoted again. Paternalizing refers to the act of treating someone like a father (e.g. "After the death of his father, Bobby grew to paternalize his older brother").

<comment><USER2> Ah, I get you now, so it's the reverse, someone is not paternalizing when _they_ treat you as though they are your father ,but you are paternalizing if you treat someone as though they are your father, is that what you're saying?

</comment></comment></comment></comment></comment></comment></comment><comment><USER3> _I just hope Karma on HN is just not a function of how cool, popular or otherwise consensual you are and that people like myself can stay on and bloom with differing styles and views from the majority_

You can search and find plenty of examples of people who have become dissatisfied with the way that Hacker News has gone downhill from where it was a few months or years ago. There has been a tendency in recent months to downvote people who disagree with you, or point out flaws in your logic.

Just last year, you would only see downvotes for Digg-style zingers or insensitive comments. Nowadays, you'll get downvoted for persuasive arguments just because people don't agree with you. And there's no humor at all allowed anymore. Just the same old stories day after day (look what Apple announced, look what Arrington said, Rate My Startup, How can I scale my app, should I learn Ruby?), and a lot of people arguing about who said what about startups instead of actually starting companies. I think it's time I started reading HN less and coding more...at least my commits don't get downvoted.

</comment><comment><USER4> My impression is that pointing out a typo doesn't further the conversation unless the typo completely alters the meaning of the comment.

<comment><USER5> As well dyslexia, is a common problem among right brained people there are a good deal of right brained designers and developers. dyslexia is something that they cannot get rid of, they can work to improve it but it cannot be "cured". Highlighting it can be taken as being an ass to someone with a disability. The problem is in all other matters they are intelligent so many are extremely embarrassed of their inability to spell or put sentences together in proper order as they know individuals will use it to detract from their message. To knit pick their spelling can be misconstrued as an attempt to discredit their argument based on a technicality.

<comment><USER6> I think you mean "nitpick" rather than "knit pick".

<comment><USER5> You know I have refrained from the whole HN is going to hell, but to get downvoted for trying to explain a viewpoint that hey he might have gotten downvoted by a dyslexic who took it personal (something I have learned to refrain from doing, by seeing the error of my defensive thinking) and then to have a troll try to get his +5 funny quota (wrong site sir), at the expense of my affliction. Knowing full well that yes I do suffer from the affliction is reprehensible. You sir have reached a new low for this community. It is people like you that make me feel the fool for defending the community of people here to have an intelligent discussion.

<comment><USER7> I accidentally down voted you on this. 100% unintentional. I wish there was a way of reversing it.

<comment><USER5> Don't worry about it, the karma does not mean much to me. I am here for valuable discussion so long as I have enough karma to participate in the community it is no big deal. My gripe above was more the principal of the matter than the actual loss of points.

</comment></comment></comment></comment></comment></comment><comment><USER8> I take the approach that HN conversations are for a very wide audience, so signal-to-noise ratio is important. Chatty comments, which may be fine in smaller forums where people know each other better, end up just looking like extra noise here. I like comments that add to the discussion and aren't gratuitously argumentative.

Comments on spelling are only productive when spelling errors actually make it significantly harder to understand something. This wasn't the case with the message you commented on.

</comment><comment><USER9> Don't worry about it. You have got fans. People got downvoted plenty of times for perfectly fine comments. And there're voting cliches which colluded here that were discovered before.

Realize that people here are not your friends or your family. You don't need acceptance or approval from them. Just be yourself and don't give a fuck. Also don't take karma too seriously. It's part of the game mechanic of a social site to make people comment and submit.

</comment><comment><USER10> >> "...but I can add value I think."

I think that's the point. The comment about the spelling mistake didn't add any value to the discussion. It was distracting and a little rude.

As to why yours was downvoted while others' similar comments weren't: I guess it's a bit random. Sometimes I'll downvote that sort of comment, sometimes I won't. But it's never based on username.

</comment><comment><USER11> Why do you care? (serious question)

<comment><AUTHOR> First of all, thanks for all the great comments back. I had hoped to get this sort of input and since I have been involved with HN, I had failed to get a sense of what the informal tone and etiquette truly is. I think you all have enlightened me a bit here. As for dfhrtjhf's question above: I just care because I love many of the contributions of HNers I read here every week and I want to contribute something back to this community for that very reason. Does that answer your question?

</comment></comment><comment><USER12> "...feel bad that my comments were seen as problematic.."

Refreshing attitude for a message board. You should stay on, keep posting.</comment>


A Future Where All Objects Talk to the Internet - <AUTHOR> http://techcrunch.com/2011/11/25/twine-foreshadows-a-future-where-all-objects-talk-to-the-internet/

<comment><USER2> If anyone from Twine is reading this, it would be really interesting if, along with twitter etc, these things could easily communicate with sites like <https://pachube.com/>. I know it's possible to read the pachube api and configure it to do the the rest stuff manually using the http functionality but I'm sure you could simplify this a lot through the web interface, which looks great by the way.

<comment><USER3> or it'll be even more good if they just create way to let any website configure themselves without any problem. This way they can act as a medium for material objects and websites and can position themselves for a very gud product. They can even charge for exclusive support.

<comment><USER4> would love to see that happen :)

</comment></comment></comment><comment><USER5> I'll play the same tune I played the last time this was discussed: what is the cost? If the cost is above $30, I'm not sure I'd be interested. If they can bring the cost down to $10, that would be ideal.

More generally speaking: how difficult is it to build one of your own? I'd like to build a sensor which is powered by, say, 2 AA batteries, has wifi and a, say, accelerometer. What would it run?

<comment><USER6> It would be pretty cheap, except for the wifi part. Those modules seem to be running in the $50-$60 range for onesies, not including antenna (or making room on your PCB for a screened one)

<comment><USER5> Well, every module doesn't have to have wifi. It could be Zigbee, with a base station(s) that interface with wifi.

<comment><USER7> True, though that gets back to your original point, since Zigbee tranceicesr are also (relatively) expensive.

I am currently working on some wireless hardware myself and while my devices do not need to be connected to the internet, they certainly could be since they do need to connect to a computer. Currently I am using ~$15 bluetooth modules for devices that can cost more and won't have more than a few instances deployed in one place. I will probably use wifi for high-cost, many- instance devices and I am currently evaluating solutions for low-cost, many- instance (though currently I only need low bandwidth one way communication for these). So far I have had some success with cheap rf-link mopules such as these[1], but am investigating cheaper/smaller/more-full-featured alternatives[1]. My target for these devices is sub €10 (~$13), which includes cost of microcontroller, rf module, passive components, circuit board and packaging.

My point is basically that sub-$10 may be possible depending on requirements - base station or standalone; one way or bidirectional transmission; point-to- point or broadcast; size requirements and so on. I think for some of the applications mentioned in the article, sub-$10 is very possible. Of course you lose the _single general purpose device_ appeal, but perhaps a small number of more-specialised devices could be available and you can then mix and match, especially if everything works off a single base station.

[1] <http://www.sparkfun.com/products/10532> they are ultra simple, but also quite bulky

[2] 2.4Ghz RF transceivers from Nordic Semiconductor among others

<comment><USER6> I think the way out of this problem is to skip Wifi, Zigbee, RFID, NFC, and all the other fancy protocols. The chips are expensive, layout and shielding is a bitch, and you don't need a 54-mbit link to send the current temperature once a minute.

Maybe the way to go is to create the simplest low power RF-transmitting circuit possible that can be driven by an Arduino or other simple microcontroller and make a simple protocol that tries hard to avoid collisions.

<comment><USER7> Agreed. I doubt each individual sensor needs to transfer more than a few bytes each time and probably not more often than a few times a second (and thats the extreme case - like you said, once a minute is more likely). This can easily be done with a low cost, low power RF circuit (and low power would have some additional advantages over the design in the article - eg, smaller batteries = smaller device) and wifi connectivity can still be achieved through a hub/base station. You only really need one wifi connection per sensor installation.

If you need special super sensors that have their own connection for some reason, then special case those, charge appropriately and leave the base sensors as cheap sub-$10 devices. A simple temperature or vibration sensor or whatever shouldn't need to cost much more than about $5 or so, nor would I be willing to pay all that much more than that (certainly no more than $12).

</comment></comment></comment></comment></comment></comment><comment><USER6> For a moment I thought this was a sealed unit with wireless recharging. Then I could monitor rainfall, watch the temperature of a pool, or make a nice sous- vide cooking apparatus.

Next rev, perhaps.</comment>


Hans Rosling's 2006 Talk at TED (Inspiring Video) - <AUTHOR> http://www.ted.com/index.php/talks/view/id/92

<comment><USER2> I almost gave up on it before the gapminder.org part -- now _that_ has a lot of startup potential.

<comment><AUTHOR> They've already built some cool stuff (<http://www.gapminder.org/downloads/applications/>) but it only scratches the surface.

</comment></comment><comment><USER3> I loved this talk when I saw it a few weeks ago. TED is so ripe with good ideas.</comment>


What can Rust do for astrophysics? - <AUTHOR> https://arxiv.org/abs/1702.02951 <comment><USER2> [https://github.com/marblestation/benchmark- leapfrog](https://github.com/marblestation/benchmark-leapfrog)

This are not valid benchmarks at all. What is the point to run N-Body sim with all particles set to 0.0 ?

Where is the result of the sim ?

Why it will be not validated at all ?

To make this look like real benchmark one will need to use the same start condition and then validate that result for all languages is the same.

It would be great to have C++ code using Eigen library for example ? To show the difference .

Also this is naive O(N^2) sim that could be speed up using Fast multipole method (FMM), but of course this would be much more complicated to do this in Rust or Go as in C++.

<comment><USER3> I wouldn't bet that FMM is more complicated to implement in Rust as in C++.

<comment><USER2> For me Rust has a lot of potential to write more secure code in places where it is needed but astrophysics is may be not one of them.

Not sure about language it self, my knowledge about Rust is limited. But st is at least harder because we already have optimized libraries that can do this in C++.

Do some one know such library for Rust ? It would be great too look at it.

</comment></comment></comment><comment><USER4> It's crazy for me to see that C is much slower than rust. I'm almost sure that there's something wrong there.

In table 1

       Rust    Fortran     C         Go

0m13.660s 0m14.640s 2m32.910s 4m26.240s

They did have a note that C could be faster if language specific features could be used.

Is rust really that performant compared to C? Or did they neglect to even bother checking C's performance?

<comment><USER5> We do not claim that Rust is so much performant than C, we just showed that Rust can be as fast as Fortran or C. And indeed, there must be something wrong with the C implementation. Pull requests with improvements are welcome:

[https://github.com/marblestation/benchmark- leapfrog](https://github.com/marblestation/benchmark-leapfrog)

<comment><USER6> No, there is something wrong with the Rust version. I added println!("{:?}",x); to the end, and now I get 134 second runtime.

Also the output is [[NaN, NaN, NaN], [NaN, NaN, NaN]], which is a bit worrying...

<comment> one-more-minute All the particles in the simulation start at (0, 0, 0) so gravity is infinite, and the whole computation is operating on `NaN`s.

Not sure how much this affects the benchmark, but it'd probably be smart to randomise the starting positions.

<comment><USER7> Operating on NaN is hugely slower than normal floating point numbers. You're hitting a slowpath in the processor's floating point logic.

</comment></comment></comment></comment></comment><comment><USER8> A little less than a year ago I worked on a bioinformatics project in rust, and I think it came out very well. My perception was that bio is a field where most practitioners rely on high speed code written by someone else that can be called from their perl or python code. I see something very empowering with rust, where people can write high performance analysis without having to shoehorn their workload into an existing toolkit or framework.

That said, while I'm really excited to see rust go more places, astrophysics seems like one of very few fields where practitioners learn a high performance language as a matter of course, and so rust may have a less empowering effect for them. I would wager that after paying the upfront cost to learn it, students and researchers may see improved iteration time from fewer bugs. But it seems like rust may have an incremental improvement to offer which is not as powerful as the transformative nature of its potential in other computationally intensive fields.

</comment><comment><USER9> Is the code in gravity_calculate_acceleration correct? I think 'j' will always be 0 in the inner-loop, which seems to defeat the purpose of having a j variable.

        void gravity_calculate_acceleration(int n_particles, double m[], double x[][3], double a[][3]) {
            double G = 6.6742367e-11; // m^3.kg^-1.s^-2
            for (int i=0; i<n_particles; i++){
        		a[i][0] = 0;
        		a[i][1] = 0;
        		a[i][2] = 0;
                for (int j=0; i<n_particles; i++){
                    if (j == i) {
                        continue;
                    }
                    double dx = x[i][0] - x[j][0];
                    double dy = x[i][0] - x[j][0];
                    double dz = x[i][0] - x[j][0];
                    double r = sqrt(dx*dx + dy*dy + dz*dz);
                    double prefact = -G/(r*r*r) * m[j];
                    a[i][0] += prefact * dx;
                    a[i][1] += prefact * dy;
                    a[i][2] += prefact * dz;
                }
            }
        }

<comment><USER10> This seems to have been fixed 3 hours ago: [https://github.com/marblestation/benchmark- leapfrog/commit/c...](https://github.com/marblestation/benchmark- leapfrog/commit/c51d95dad0a83d6c3cb5f2868896da3bfa46e158)

<comment><USER11> Yes, but m is zero anyway.

<comment><USER10> You are correct. It seems they really should double-check their implementation for producing meaningful results before running bechmarks on it...

</comment></comment></comment></comment><comment><USER12> For those who are looking at doing data analysis with Rust in astrophysics, I have a crate fitsio ([https://crates.io/crates/fitsio](https://crates.io/crates/fitsio)) which wraps cfitsio into rust, allowing the reading and writing of .fits files.

<comment><USER13> Nice. I mean I didn't wanna say but when I saw the headline my first thought was "basically nothing if you don't have a fits library"

</comment></comment><comment><USER14> Just my 2c -- it is a potentially interesting article, but two things have to be fixed:

1\. Compile C version with better optimization flags or ask an expert to tweak it for faster performance.

2\. Include sample run on some known / meaningful data to test that software runs correctly (not only fast).

IMO rust doesn't have to be faster than C to make a valuable article. If it is as fast or almost as fast it is still a good data point.

<comment><USER15> > Compile C version with better optimization flags or ask an expert to tweak > it for faster performance.

Part of the point they are trying to make is that you _don 't_ need to be an expert to reap performance benefits in certain languages. They explicitly state that they did not do things that C experts would know how to do. This is pretty reasonable in the context of astrophysics. The whole idea of the thing is that if there is a language that allows you to write faster code than C without having to "ask an expert to tweak it", you will be more productive using that language.

That said, your point 2 is entirely valid; the paper fails to demonstrate pretty much all of its claims, and it never makes a case for needing Rust's safe dynamic memory allocation features in a program that doesn't use dynamic allocation at all.

For whatever it's worth, the astrophysicists I most recently talked to wrote their simulations in Python (with SciPy or similar) or even something called IDL: [https://en.wikipedia.org/wiki/IDL_(programming_language)](https://en.wikipedia.org/wiki/IDL_\(programming_language\)) and they also tend to have mad Bash skills for glueing different data- processing programs together.

<comment><USER14> You have a good criticism on my #1. I should drop "ask the expert" part but still maintain that when writing numerical computation software checking for compile flags is a reasonable request. Leave code as is, but still try -O3 / -Ofast.

At this point it is not the language expertise, but knowing about your tools.

<comment><USER15> Agreed, mostly :-) The paper does state that they used -O3.

</comment></comment></comment></comment><comment><USER16> As someone with no Rust experience...

 _a) access to invalid memory regions, b) dangling pointers and attempts to free already freed memory, c) memory leaks and, d) race conditions._

The first three benefits also come with essentially any GC'ed language. d) is interesting. What are the costs that come with such a guarantee? Presumably it prohibits certain kinds of parallelism? Are the ownership/borrowing mechanics interesting programming tools, or are they a hindrance?

People talk a lot about static typing, and I can see the benefits for critical/user-facing applications, but not for numerical code. The nightmare with numerical code is finding out that I forgot a minus sign somewhere, and that it invalidates my last 6 months of published results.

<comment><USER17> > _Presumably it prohibits certain kinds of parallelism?_

Actually it enables parallelism you couldn't do before, because now you're confident the compiler will prove that what you're doing is safe.

</comment></comment><comment><USER18> Where are the links to the sources and is there a chance to compare the versions (Fortran vs Rust doing the same calculations)? I wasn't able to find them.

Where is the discussion of the library availability? The libraries for Fortran are maintained and improved during the decades?

<comment><USER5> You can find the code for the simple N-Body implemented in different languages here (the more advanced N-Body version with tides has not been released yet):

[https://github.com/marblestation/benchmark- leapfrog](https://github.com/marblestation/benchmark-leapfrog)

And indeed, Fortran has decades of advantage in terms of libraries.

<comment><USER18> It's 64 lines of rs, hardly enough to demonstrate anything for the real use, and it's suspiciously badly written, if I understand correctly:

The C code:

        void integrator_leapfrog_part1(int n_particles,
              double x[][3], double v[][3],
              double half_time_step){
    	for (int i=0;i<n_particles;i++){
    		x[i][0]  += half_time_step * v[i][0];

        ...
        int main(int argc, char* argv[]) {
            const int n_particles = 2;
        ...
            while(time <= time_limit) {
               integrator_leapfrog_part1(n_particles,
                  x, v, half_time_step);

The Rust code:

        const N_PARTICLES: usize = 2;
        ...
        fn main() {
        ...
            while time <= time_limit {
            integrator_leapfrog_part1(N_PARTICLES,
                   &mut x, &v, half_time_step);
        ...
        fn integrator_leapfrog_part1(n_particles: usize,
                     x: &mut [[f64; 3]; N_PARTICLES],
                     v: &[[f64; 3]; N_PARTICLES],
                     half_time_step: f64) {
            for i in 0..n_particles {
                x[i][0]  += half_time_step * v[i][0];

The way I understand it, with the C code the compiler during the compilation of the function doesn't know the size of the array, and with the Rust code it does, it is explicitly written? I refer to the difference between the capital letter _constant_ and the plain _variable_. What would happen if the C compiler only knew that much too? that is, having the presence of the N_PARTICLES in all declarations? I can also imagine that just adding the proper compiler and linker options for C, not used in the makefile, can maybe give the benefit of that constant propagation in this particular case? I mean what happens when the "-flto" is added?

The N-Body on this site, with other implementations, has clearly faster C than Rust:

[https://benchmarksgame.alioth.debian.org/u64q/performance.ph...](https://benchmarksgame.alioth.debian.org/u64q/performance.php?test=nbody)

<comment><USER19> _> The N-Body on this site_

As noted elsewhere in here, the C implementation is using SSE, whereas the Rust implementation isn't. It's just as much of an unfair comparison as the one you're describing. :P

<comment><USER18> The programs on the site fit the rules defined on it, and the rules include the verification of the results:

[https://benchmarksgame.alioth.debian.org/why-measure-toy- ben...](https://benchmarksgame.alioth.debian.org/why-measure-toy-benchmark- programs.html)

The OP doesn't even specify the rules for its own benchmark, as far as I understand doesn't verify the results? People here get NaNs?

If the NaNs are produced as results, then the OP code is not measuring the speed of calculations at all but the speed of the failed calculations. Which is especially problematic as the main argument is "attractive for the scientific community" "it guarantees memory safety." Which is presented as good because not having it "can produce random behaviors and affect the scientific interpretation of the results." If the result here is NaN the calculation doesn't even have to be performed after the first NaN that affects the result appears, as anything + NaN is NaN etc.

Edit: kibwen, did I write somewhere that I "refute" something? I gave a link to the rationale behind the "benchmarksgame" site. The rest is about the OP, surely not about your post.

<comment><USER19> _> The programs on the site fit the rules defined on it, and the rules include the verification of the results_

I'm not sure what you're refuting?

Verifying that the results match is a necessary but insufficient quality for ensuring comparability. If the algorithm could be the same in each language but isn't (e.g. quicksort vs. bogosort), then that's not a valid comparison if your objective is to determine the overhead imposed by the language implementation itself (and if you're not trying to determine language implementation overhead, then what are you measuring?). Likewise if the implementation details could be the same in each language but aren't (e.g. if one uses 64-bit integers and the other uses 32-bit integers).

The computer language benchmarks game was initially conceived to determine a ballpark for how slow interpreted and managed languages are compared to C. Quantifying the overhead of interpreters and runtimes is its raison d'etre, and it shows. When it comes to comparing low-level systems languages that have no runtime to speak of, the best it can do is attempt to quantify the quality of each backend's code generator (it's a missed opportunity that it doesn't include Clang for comparison with GCC).

(And yes, I understand that the benchmarks game contains repeated massive disclaimers that people should not take the performance results as a means of serious comparison. Internet commentators remain undeterred.)

If you're just trying to argue that the methodology used in the OP is poor, then obviously we're in agreement (was there ever any doubt?).

<comment><USER20> > _The computer language benchmarks game was initially conceived to determine > a ballpark for how slow interpreted and managed languages are compared to > C._

Today the benchmarks game is referred to from the Rust FAQ. What is one to do?

[https://www.rust-lang.org/en-US/faq.html#performance](https://www.rust- lang.org/en-US/faq.html#performance)

Back in the previous millenia -- _" [Doug Bagley's] goal was to compare all the major scripting languages. Then [Doug Bagley] started adding in some compiled languages for comparison…"_

[http://web.archive.org/web/20010125021400/http://www.bagley....](http://web.archive.org/web/20010125021400/http://www.bagley.org/~doug/shootout/#News)

</comment></comment></comment></comment></comment></comment></comment><comment> J0-nas I don't know the astrophysics domain at all but shouldn't there be more arguments for Go?

* Safer than C

* Almost as fast as C

* Good concurrency support

* High productivity due to simple abstractions and good tooling

Is the downside of a GC language really relevant? Does astrophysics suffer from "stop the world interrupts" or is it just because of the performance? The Go GC is already really fast.

<comment><USER21> > * Almost as fast as C

That's the key point. Judging by the (wrong) benchmark above where both C and Go seem to do some work, Go is about half as fast as C.

A grad student (if paid properly) costs maybe 60k €/year. In comparison, we regularly spend more than 250k on new and faster computers, not including maintenance, the electricity bill etc. If you can make software even 50% faster by increasing development time, this is nearly always worth it in an academic setting. Note that the benchmark implementation shown here is a very simple example, normally computing jobs take days to weeks (multiplied by however many cores you can sensibly use) of CPU time.

Decreasing runtime also increases productivity a lot, since the turnaround time becomes shorter; waiting 3 versus 6 weeks for results is a noticeable difference.

Additionally, these tools rarely have safety concerns: In my own code, there is no "untrusted user input". There is correct user input (good) and incorrect user input (mostly it will crash, with common mistakes it will try to notify the user). Safety is handled by the operating system (such that you can't overwrite someone else's data, for example).

This means that the only advantage Go could have over C/C++ in academia is the "good concurrency support". However, concurrency in HPC is usually handled via OpenMP (shared memory) or MPI (distributed memory) parallelisation. This takes a while to get used to, but is very different (and in a sense much easier) than e.g. the typical case for a web server, where you wish to serve as many users as possible at the same time using as little CPU time as possible – a busily waiting loop is horrible in the latter case but perfectly fine in the former (under some circumstances).

So overall, languages are not interesting in the academic HPC crowd if they sacrifice speed for _anything_ , which, incidentally, makes Rust also interesting, because that is precisely not the case (apparently, under some circumstances, etc.pp.).

<comment> J0-nas I'd agree but

> Judging by the (wrong) benchmark above where both C and Go seem to do some > work, Go is about half as fast as C.

I think this is what is most flawed in the paper. For (some) concurrent problems Go is about as fast as C [1].

But then again, I don't know what kind of computing requirements they have. Is there a reason why GRP computing isn't mentioned? They are really efficient and CUDA isn't that hard to learn.

> Rust allows the user to avoid common mistakes such as the access to invalid > memory regions and race conditions

They seem to care about safety.

[1] [https://benchmarksgame.alioth.debian.org/u64q/compare.php?la...](https://benchmarksgame.alioth.debian.org/u64q/compare.php?lang=go&lang2=gcc)

<comment><USER21> > I think this is what is most flawed in the paper. For (some) concurrent > problems Go is about as fast as C [1].

Certainly, this was really only taken as a ballpark estimate of the performance difference. Looking at your link, it seems to have been slightly overestimating the difference, though the general point still stands: C is (in most cases) faster and there is (nearly) no case in which Go beats C.

> Is there a reason why GRP computing isn't mentioned?

> They are really efficient and CUDA isn't that hard to learn.

Sorry, not sure if you mean GPU instead of GRP in the first sentence. CUDA helps to some degree, but not always, e.g. when you are memory bandwidth bound (common in tensor networks in physics). I have no experience with Monte Carlo methods and can't comment on whether they substantially benefit from CUDA; I know of at least one (Quantum Monte Carlo) code which runs much faster on a standard Xeon than on the Xeon Phi, though.

> They seem to care about safety.

Yes of course safety is nice to have and I'll gladly learn Rust when I have some free time to get that safety at hopefully zero cost. But sacrificing performance is simply not competitive, if you can throw someone with gdb at the problem and get essentially the same "safety".

<comment><USER22> > if you can throw someone with gdb at the problem and get essentially the > same "safety".

That's an odd tradeoff. That time of debugging could be significantly longer than just writing the software in a safe language. Seems like a bad tradeoff, and in many scenarios, bugs can lead to very bad things that you can't recover from. I've experienced all of these, having to fix them over long periods of time (not all my code, but sadly some was): data loss, concurrency (tough to debug in gdb), major memory leaks (even from std libs), corrupted data because of misused non null terminated c strings, array out of bound issues. Each one of these took weeks to track down, maybe because I'm not smart, which is a valid criticism; with Rust I've never had issues with any of those (2 years and running), and given that I'm not smart, it helps me by telling me where I got something wrong.

Be safe out there people...</comment></comment></comment></comment></comment>