Hacker Newsnew | past | comments | ask | show | jobs | submit | grnadav1's commentslogin

A guy w/ 10 weeks Rust experiance and already gave a talk at RustConf?!


The closing keynote at RustConf is generally someone who is new to Rust or has never used Rust but can bring in an interesting perspective. Last year we had Joe Duffy, who I don't think has done much Rust aside from perhaps basic experimentation, but has a lot of relevant experience from running the Midori (Microsoft's safe systems language) project.

(also, the author isn't a "guy")


It's interesting because when I read about how Rust can rewrite iterators code into more performant direct loops I thought about Joe's blog posts that mentioned the same efforts for .NET. Also Span<T>. It seems .NET will have similar abstractions like Rust (of course not all can be migrated).


LuaJIT does the same, down to an absurd level.

From the luafun library readme (which uses iterators under the hood):

https://github.com/luafun/luafun

————

> Let's see an example:

    > -- Functional style
    > require "fun" ()
    > -- calculate sum(x for x^2 in 1..n)
    > n = 100
    > print(reduce(operator.add, 0, map(function(x) return x^2 end, range(n))))
    328350

    > -- Object-oriented style
    > local fun = require "fun"
    > -- calculate sum(x for x^2 in 1..n)
    > print(fun.range(n):map(function(x) return x^2 end):reduce(operator.add, 0))
    328350
> Lua Fun takes full advantage of the innovative tracing JIT compiler to achieve transcendental performance on nested functional expressions. Functional compositions and high-order functions can be translated into efficient machine code. Can you believe it? Just try to run the example above with `luajit -jdump` and see what happens:

    -- skip some initilization code --
    ->LOOP:
    0bcaffd0  movaps xmm5, xmm7
    0bcaffd3  movaps xmm7, xmm1
    0bcaffd6  addsd xmm7, xmm5
    0bcaffda  ucomisd xmm7, xmm0
    0bcaffde  jnb 0x0bca0024        ->5
    0bcaffe4  movaps xmm5, xmm7
    0bcaffe7  mulsd xmm5, xmm5
    0bcaffeb  addsd xmm6, xmm5
    0bcaffef  jmp 0x0bcaffd0        ->LOOP
    ---- TRACE 1 stop -> loop
> The functional chain above was translated by LuaJIT to (!) one machine loop containing just 10 CPU assembly instructions without CALL.


Most of the comments you've posted to HN have been unsubstantive. We ban accounts that do that, so could you please read https://news.ycombinator.com/newsguidelines.html and stop doing that?

This one was particularly uninformed.


You jusk KNOW Elon Musk is gonna beat'em to it ;)


Electric cars and rockets have existed for decades.


Given that top body builders are vegans, I'd guess - not much


The world's top body builders are certainly not vegan across the board...for example the actor/competing body builder who plays The Mountain on Game of Thrones consumes almost 2000 grams of animal fat daily[0].

Also no one should emulate top body builder diets unless they plan on working out like top body builders (e.g. 2-3 intensive training sessions a day).

You might be able to find a few vegan body builders but its certainly not the norm.

0: http://www.businessinsider.com/the-mountain-game-of-thrones-...


Gonna need a source on that.


I somehow doubt you'll get one. A quick Google search suggests they exist, but they're hardly a large portion of the overall bodybuilding community.


Oh I know, I just wanted him to answer that. :)


Why though? He didn't say that "Given that ALL/MOST top body builders are vegans", but that "Given that top body builders are vegans".

And indeed there are some. Which points that there's no necessary connection between being vegan and losing muscle.


He also didn't say "Given that SOME top body builders are vegans".

Top body builders eat meat. Top body builders do not eat meat.

The implication is "The top body builders", but yes, there's wiggle room for when someone challenges the statement.


It would be seriously cool, though, if anyone here could leave a link as a citation to any article, tweet, FB page, whatevs that shows even one top body builder who is vegan as back up for the claim.


Because Google is too difficult? (note to self: cut down snark)...

http://www.greatveganathletes.com/bodybuilders

http://pulptastic.com/beef-up-without-beef/


Google is a thing?

(note to self: quit trying to crack jokes on HN)

;-)


Here are some [1]. These are however not selected to be 'top' athletes, as far as I know.

I imagine that diet is irrelevant for athletic training, as long as it fulfills certain macro-nutrient requisites. Further, I image vegan athletes are only faced with the increased difficulty of finding and preparing quality sufficient food, compared to others with normative diets, due to lack of demand and meat centered cultures.

Finding an equivalent vegan alternative to chocolate pudding at <500g, 350kcal, 50g protein> for $2.5 [2] seems like a challenge. I'm sure that if they plan their diet, they can meet the same targets - whereas normative diets don't require you to plan anything really. You can just eat 2 of [2] and a chicken a day, and you're done (concerning only protein).

But then again, there are protein powders which balances it out, if we don't take price into account.

All in all, I think diet choices (assuming any choice to be a most healthy variant of chosen diet) mainly impacts long term health, and not short term goals such as muscle gains.

[1] http://www.greatveganathletes.com/strength [2] http://www.njie.se/produkt/propud-protein-pudding-chocolate/...


Seriously, no need to be so sensationalist.

All comment had to say is some top body builders are vegan. Even some notable NFL players are/have been vegan.

Even then, they go out of their way to get enough protein - I think the person you replied to was trying to go for shock value but it was a pretty bad comment.


How many of those vegan body builders don't take massive doses of anabolic steroids?


right. wasn't aware they switched (long ago!) to Oxygen. I'll remove the post to avoid the downvotes


lol vegans have FAR LESS cancer (http://m.huffpost.com/us/entry/2250052.html) but nooo, I won't go vegan - those peoplz ares crazies!!!11


Is it because they are vegan or because vegans live healthier lifestyles?


Exactly. If there was strong evidence for causality I would make a real effort to go vegan. But I suspect it's about being thin and having a high fiber diet, which doesn't require being vegan.


There is strong evidence. https://en.wikipedia.org/wiki/China%E2%80%93Cornell%E2%80%93...

It's the ratio of plant protein to animal protein in the diet. So no you don't need to go hard vegan. But yes, it is the diet and there is hard evidence.


This is something I've had a great interest in for years and have read many studies where there is clearly correlation but so many obvious confounders that claims of casuality are just not supported by the data. If the summary of the sudy you linked is accurate (http://web.archive.org/web/20090223222003/http://www.nutriti...) it is an example in that they studied people with low fat and high fiber diets, but had no group of high fat and high fiber diet. So is it the fat or the fiber or both? They also made no attempt to distinguish between types of fats. So is it animal fat +/- fiber or any/all fats +/- fiber? Further, they talked about fat and fiber not protein. Ultimately they made no claims about casuality, only correlation. Given more recent reports of the effects on diseases of fiber-fed gut bacteria it might be that it's the fiber that's important.

My personal question is, does a high fiber ketogenic diet (high fiber, high fat, low carb) raise or lower cancer risk? I don't know of strong evidence either way.


Criticism of "The China Study" pretty much ends my confidence in it: https://rawfoodsos.com/2010/07/07/the-china-study-fact-or-fa...


Thanks for that link. It's an excellent analysis of the actual data from the study. I'm part way into reading it and right away the author has thrashed some of the claims of the original study. It appears that even some of the basic claims of correlation aren't even correct.

Added: Schistosomiasis infection is such a huge cofounder for colorectal cancer rates that it is ridiculous to have claimed dietary cholesterol from animal sources as the cause.


That's pretty neat.

Nutrition seems difficult to study because there are so many biological mechanisms at play, but we can get a rough picture at the macro level.

Of course someone always blows findings out of proportion and decides to take things to an extreme.


They'd have you believe those are one and the same


not everyone is trying to live as long as possible.


very interesting write-up. is there a way to subscribe to future posts of this sorts?


The usecase for this is not clear to me. Syncing is already done via the cloud, sharing as well. It's cool, but what's more to it?


Most users use it for adding push capabilities to their existing software. Eg you have a web app that uses a REST backend but you want updates to be forced into the browser instead of refreshing the page.

There are also those who use it for chat rooms, live analytics and event MMOs.


Real-time notifications, multiplayer games, status reports of some events happening continuosly without developing dedicated backend for it. These are the examples I could come up at the moment.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: