logs archiveBotHelp.net / Freenode / #2f30 / 2015 / July / 17 / 13
Evil_Bob
in general i hate scripting languages, lua is kindof ok though
k0ga
a good history told with a poor language lost everything ;)
Evil_Bob
heh well said :)
biniar
https://twitter.com/em_m1021/status/621684193127325696/photo/1
stateless
k0ga, yeah well
to learn how to do things you have to do a lot and if you are not retarded you will have inevitably learnt the language quite well
people who think the implementation is trivial but designing is awesome and important suck at both implementation and design
k0ga
well, the guy of this morning couldn't learn the word 'static'
xD
stateless
yeah well that guy was applying for the wrong job
k0ga
I think we chose the wrong profession
stateless
k0ga, btw
do you know the 3rd possible meaning of static in C99?
retard
wow, fc is nice
k0ga
for variables, for functions
and a third?
uhmmm
let me think
ahhh, inline functions
stateless
yeah
k0ga, wait no
k0ga
I always mistake about the exact meaning of static in this case, but I know it modifies inline behaviour
stateless
you mean extern inline?
retard
biniar: i do not comprehend
stateless
it only affects the scope
k0ga, I was talking about void foo(int a[static 10]);
:P
k0ga
http://www.cs.nyu.edu/~xiaojian/bookmark/c_programming/Inline_Functions.htm
stateless
yes
k0ga
for a function inline and static it is not mandatory to emit the code
stateless: this other, I saw once, but I don't remember the meaning
please let me know
retard
this article was worse than i thought
A programmer who remembers all the keywords and function names in every language but never learned how to organize them is not as valuable as one who can use abstraction and encapsulation, who understands time and memory tradeoffs and asymptotic complexity, and who knows ways to make code readable, robust, and maintainable.
stateless
k0ga, it means that a will have at least 10 elements
retard
buzzwords > knowledge
apparently
stateless
retard, 99% of programmers do not understand any of the aforementioned
1% writes good code
k0ga
stateless: and what is the difference form int foo(int a[10])
?
I mean, in both cases it is going to be ignored, no?
stateless
k0ga, I don't think what you said is correct btw
only extern inline requires a non-inline def to exist in case it is not inlined everywhere
so static inline does not require a non-inline def to exist
but it may not be inlined eveywhere
k0ga
"A function defined "static inline". A local definition may be emitted if required. You can have multiple definitions in your program, in different translation units, and it will still work"
stateless
yes but there is no requirement to have a non inline version
k0ga, in your case a is 10 elements
if you put static, it will be at least 10
k0ga
stateless: but it is a pointer
if you do sizeof(a) == 4
stateless
it also means it is never NULL
k0ga, yes
k0ga
ok, I suppose it helps the compiler to detect errors
stateless
k0ga, it means that at least the first 10 elements are valid/accessible
k0ga
yes, I understand it, but since it is a pointer, how does it modify the generated code?
stateless
instead of using the nonnull attribute you can use this although it can be confusing/misleading
but portable
k0ga, not sure, this is an optimization hint
not sure how it takes advantage of it
k0ga
stateless: did you read the C99 part of the page I put?
stateless
which page?
k0ga
http://www.cs.nyu.edu/~xiaojian/bookmark/c_programming/Inline_Functions.htm
stateless
ah yes
no not yet
only briefly
well I don't think we disagree, I misunderstood what you wrote
what I said is that inline or static inline does not require a non-inline version to be present
it may not emit inline code though
extern inline always requires a non-inline version in case it is not inlined everywhere
in any case inline is tricky I avoid it
k0ga
If inline is always used and no extern, then a definition is needed
yeah, I also avoid it
stateless
a non-inline def?
k0ga
for example:
inline int f(void);
int f(void);
stateless
that's not required
k0ga
int t(void) {...}
stateless
int f(void); is not required
k0ga
no, but in this case is mandatory a definition of the function
the rules are too much complex
stateless
yes
:P
k0ga, imaging mixing these rules with __always_inline__ and __gnu_inline__
:P
imagine*
k0ga
a few weeks ago I was with a guy that had problems after changing the version of gcc
and gcc changed from gnu inline to c99 inlline
stateless
yes
5.x?
it changed the default C env
k0ga
I explained him the problem, but he didn;t believe me
two hours later he realized I was rigth
stateless
is gnu99 the default now?
k0ga
xD
stateless
in 5.x/
?
k0ga
I don't know
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 next »