Redian新闻
>
老码农骂小码农的强文。
avatar
老码农骂小码农的强文。# PDA - 掌中宝
d*f
1
回来发现自己被打成文科生了。
avatar
w*g
2
Linus Tovalds骂瞎写代码的小码农,荡气回肠,应该下发所有码农学习。
Christ people. This is just sh*t
.The conflict I get is due to stupid new gcc header file crap. But what
makes me upset is that the crap is for completely bogus reasons.
This is the old code in net/ipv6/ip6_output.c:
mtu -= hlen + sizeof(struct frag_hdr);
and this is the new “improved” code that uses fancy stuff that wants
magical built-in compiler support and has silly wrapper functions for when
it doesn’t exist:
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
and anybody who thinks that the above is (a) legible (b) efficient (even
with the magical compiler support) (c) particularly safe is just incompetent
and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and there
’s no reason for it.
The code could *easily* have been done with just a single and understandable
conditional, and the compiler would actually have generated better code,
and the code would look better and moreunderstandable. Why is this not
if (mtu < hlen + sizeof(struct frag_hdr) + 8)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);
which is the same number of lines, doesn’t use crazy helper functions that
nobody knows what they do, and is much more obvious what it actually does. I
guarantee that the second more obvious version is easier to read and
understand. Does anybody really want to dispute this?
Really. Give me *one* reason why it was written in that idiotic way with two
different conditionals, and a shiny new nonstandard function that wants
particular compiler support to generate even half-way sane code, and even
then generates worse code? A shiny function that we have never ever needed
anywhere else, and that is just compiler-masturbation.
And yes, you still could have overflow issues if the whole “hlen +xyz”
expression overflows, but quite frankly, the “overflow_usub()“ code had
that too. So if you worry about that, then you damn well didn’t do the
right thing to begin with.
So I really see no reason for this kind of complete idiotic crap.
Tell me why. Because I’m not pulling this kind of completely insane stuff
that generates conflicts at rc7 time, and that seems to have absolutely no
reason for being an idiotic unreadable mess.
The code seems *designed* to use that new “overflow_usub()“ code. It seems
to be an excuse to use that function.
And it’s a f*cking bad excuse for that braindamage.
I’m sorry, but we don’t add idiotic new interfaces like this for idiotic
new code like that.
Yes, yes, if this had stayed inside the network layer I would never have
noticed. But since I *did* notice, I really don’t want to pull this. In
fact, I want to make it clear to *everybody* that code like this is
completely unacceptable. Anybody who thinks that code like this is “safe”
and “secure” because it uses fancy overflow detection functions is so far
out to lunch that it’s not even funny. All this kind of crap does is to
make the code an unreadable mess with code that no sane person will ever
really understand what it actually does.
Get rid of it. And I don’t *ever* want to see that shit again.
Linus
★ 发自iPhone App: ChineseWeb 1.0.4
avatar
g*n
3
文科理科差不了太多,还是工科最理智。
avatar
g*g
4
三行代码,骂的功夫,300行都码完了。
avatar
l*t
5
工科生最机械

【在 g******n 的大作中提到】
: 文科理科差不了太多,还是工科最理智。
avatar
g*e
6
这就不懂了 大公司里都讲究分工,你两行写完了,人家写helper func的人喝西北风去
啊?
avatar
w*a
7
你们不好好支持博导,我在墙街就不给你们发房顶
avatar
t*t
8
我经常以文科生为荣。

【在 d********f 的大作中提到】
: 回来发现自己被打成文科生了。
avatar
g*n
9
工科包含了机械以外很多专业。

【在 l****t 的大作中提到】
: 工科生最机械
avatar
d*f
10
不用支持阿,我就是感慨连最基本的signal sampling都搞不明白的人也能开始搞科研
,还把成果发到nasa网站上,真是有钱能使鬼推磨阿

【在 w*******a 的大作中提到】
: 你们不好好支持博导,我在墙街就不给你们发房顶
avatar
R*d
11
你感概也没用, 想想怎样推磨对你前途有帮助

【在 d********f 的大作中提到】
: 不用支持阿,我就是感慨连最基本的signal sampling都搞不明白的人也能开始搞科研
: ,还把成果发到nasa网站上,真是有钱能使鬼推磨阿

avatar
l*t
12
机械 这里是个形容词
看吧? 这就是工科生。。。

【在 g******n 的大作中提到】
: 工科包含了机械以外很多专业。
avatar
B*W
13
隔行如隔山,也许人家学科对你所谓的singal有很多共识,比如变化应该是连续的,某
些特别高或者特别低的值会被当成outliner剔除。不要把自己的锤子到处乱砸。Signal
sampling又不是科研宝典,人干么要去学。别的不说,很多学科都不用这个词儿,啥
signal。
shit,忘了您老是行为艺术博导了

【在 d********f 的大作中提到】
: 不用支持阿,我就是感慨连最基本的signal sampling都搞不明白的人也能开始搞科研
: ,还把成果发到nasa网站上,真是有钱能使鬼推磨阿

avatar
d*f
14
恩,我知道你们变暖教连牛顿三定律都不买帐,谁妨碍你们变暖谁就得打倒。的确为了
钱没啥不能干的

Signal

【在 B**W 的大作中提到】
: 隔行如隔山,也许人家学科对你所谓的singal有很多共识,比如变化应该是连续的,某
: 些特别高或者特别低的值会被当成outliner剔除。不要把自己的锤子到处乱砸。Signal
: sampling又不是科研宝典,人干么要去学。别的不说,很多学科都不用这个词儿,啥
: signal。
: shit,忘了您老是行为艺术博导了

avatar
w*a
15
博导你别和他们一般见识
生物,地理的这种房顶应该全部掐掉
把钱让给我们这种墙街的人才对

【在 d********f 的大作中提到】
: 恩,我知道你们变暖教连牛顿三定律都不买帐,谁妨碍你们变暖谁就得打倒。的确为了
: 钱没啥不能干的
:
: Signal

avatar
d*f
16
我从来没说要掐掉生物,我是说生物根本不需要几百亿房顶,政府不给钱,药厂也会给
。美帝现在在hard science都全面落后欧洲,就是因为生物吃掉的饼太大

【在 w*******a 的大作中提到】
: 博导你别和他们一般见识
: 生物,地理的这种房顶应该全部掐掉
: 把钱让给我们这种墙街的人才对

avatar
H*g
17
他们是不是都叫你博经理?

【在 d********f 的大作中提到】
: 回来发现自己被打成文科生了。
avatar
R*d
18
博起来

【在 H********g 的大作中提到】
: 他们是不是都叫你博经理?
avatar
G*Y
19
你就是文科生,别装了

【在 d********f 的大作中提到】
: 回来发现自己被打成文科生了。
avatar
y*g
20

还好没打成体育生

【在 d********f 的大作中提到】
: 回来发现自己被打成文科生了。
avatar
t*t
21
这叫留面子

【在 y****g 的大作中提到】
:
: 还好没打成体育生

avatar
n*r
22
打得好。不要以为反对变暖教你就是正义的化身。
看了你的帖子, 思维水平和变暖教的戈尔大统领弱智有的一拼。被人揪了辫子还百般
狡辩。

【在 d********f 的大作中提到】
: 回来发现自己被打成文科生了。
avatar
s*k
23
老爷明显装在装萌你都看不出来。。。
看吧,这就是文科生

【在 l****t 的大作中提到】
: 机械 这里是个形容词
: 看吧? 这就是工科生。。。

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。