« first day (210 days earlier)      last day (4746 days later) » 

Xeo
12:14 AM
@Xaade You know you can disable that?
 
12:26 AM
@CatPlusPlus I actually like bash. It is powerful enough to do what you want, yet weird and quirky enough to make every script an adventure...
 
 
1 hour later…
rlc
1:29 AM
@Fred I fed it to a UUdecoder and it spat out garbage but didn't complain. I also fed it to a base64 decoder and it did complain. It's been a while since I've looked at real UU code, though...
Hmm. I also refreshed my memory a bit on Wikipedia. You're right: it does look more like bas64 than UU
I wonder why the base64 decoder rejected it...?
 
@rlc : Please get dropbox :-P
 
rlc
That's not a bad idea, but I don't see what the YouTube error 500 page has to do with that?
Unless you didn't like my use of fileserv?
 
@rlc right, the latter
 
2:41 AM
@als: life teachs all and everytime..nice words... i like that.,...:)
 
3:00 AM
@rlc python -c 'import base64; open("decoded", "w").write(base64.b64decode(open("encoded").read()))' decoded it without an error for me
and yes, that file sharing site sucks :) even codepad or ideone would've been easier
@CatPlusPlus bash isn't bad at all, trying to target posix sh is a chore though
 
3:14 AM
who is catplusplus .. nice...
 
3:47 AM
@frednurk: can you tell me that why compiler is saying that "frames.h" not exit in this code
any one can tellme the reason.. i tried to find out..but did not get...
 
4:01 AM
use "frames.h" instead of <frames.h> above your main()
 
i changed it but even then i am getting the same error
 
paste the exact error on codepad
 
now codepad is not opening,.,i am getting internet error on that page..
 
i am just posting error.. not whole code...
ok
 
4:10 AM
what is the full path to frames.h?
 
Error 1 error C1083: Cannot open include file: 'frames.h': No such file or directory c:\documents and settings\blah\desktop\blah\lectures\VR\loading frames\loading frames\main.cpp 4 1 loading frames
i just have this error.. what do you mean by full path of frames.h?
 
"c:\documents and settings\blah\desktop\blah\lectures\VR\loading frames\loading frames\main.cpp" is the full path of main.cpp
 
ah.,..
 
why is your user name "blah"?
 
because i like blah....
hy why its can't open "frames.h" .. i think i did not make any mistake...
 
4:15 AM
what is the full path to frames.h?
 
i do't know about full path of frames.h... this type of question i am listening first time..
 
what directory is it saved in?
 
ahh .. yes
hold on..
ahh i found my mistake...
but hold on...
actaully i maked the name space as "frames "
and that is in sounddata.h header file
there is no frame .h file
ahh no no .. sorry.. i got it ...
ahhh codeblock is not good...cut cut cut the codeblock
 
4:45 AM
@frednurk: ideone.com/9LSpT
now soundData.h is not found...
why...
now my path is ok...
let me check this file in directory agian
C:\Documents and Settings\blahdessktop\lectures\voice recog\lacture\loading frames\loading frames\soundData.h
 
 
1 hour later…
5:56 AM
@you: nice words:
Treat others with the same respect you'd want them to treat you. We're all here to learn together. Be tolerant of others who may not know everything you know
 
YOU
lol, that's a blatant copy from faq
 
hehe
 
@YOU why did you change your display name? wasn't it Mark Something?
 
@frednurk: no its nice..
@frednurk: i am still getting error of "soundData.h not found." ideone.com/9LSpT
and path is correct now...
 
sounds like it's time to make up a test case and ask on SO
 
6:04 AM
hmm
 
I suspect you have been hobbled by using an IDE, have no real idea what is going on, and must learn that now to fix it yourself
 
hmm
 
hi all
@m
 
for the future, try not using an IDE for anything more than an editor, until you understand the translation model c++ (and c++ implementations) use
 
@Miss hi
 
6:06 AM
@user652795: hi
 
@any one hv idea abt appcelerator titanium
@m
 
@frednurk: well right now i am using console application... not IDE enviorment...
 
@Miss hey u kow anything abt appcelerator
 
YOU
6:24 AM
@Fred, yeah, my previous user id is S.Mark. I use "YOU" on meta, and once copied the profile to all account, I think I can't change the name for 1 month according to limit, IIRC.
 
ah. I remember when that limit was imposed, there was nearly mutiny
 
Error 1 error C2548: 'soundData::loadFrom' : missing default parameter for parameter 4
hy i maked this functuion
void loadFrom(
istream& stream,
Frames& frames,
string const& streamName = "a text stream",
ostream& log);
what is the problem with it
 
6:43 AM
@Miss, once you have a default parameter (here streamName) all the following one must also have a default value.
 
youy mean ostream should also have default parameter as streamName
 
Als
Hey All
 
@Miss, yes.
 
hmm
 
Als
or make it this way
void loadFrom(
istream& stream,
Frames& frames, ostream& log,
string const& streamName = "a text stream");
@Miss there u go
@AProgrammer: How are you doing?
 
6:50 AM
ahh hmm ok thanks
 
@Als, fine.
 
@aprogrammer , @als: i create an object of stream ..:)
void loadFrom(
istream& stream,
Frames& frames,
string const& streamName = "a text stream",
ostream& log =std::clog);
right
 
Als
7:06 AM
@AProgrammer: :)
 
stream carry data as string form .. is that right
?
 
Als
@Miss: Thats right,Once you have a default argument you cannot have non defalut arg after it i..
 
hmmm
 
Als
order should be all non default args and then default args
 
hmm i see
i understand your first line..
 
7:30 AM
inline functions are used in place of macros ...
 
Als
so?
 
@als: i jsut came to remember some one by that line..
 
Als
:) good
 
one more line: i like #pragma once instead of guards
 
Als
7:48 AM
@TonyTheTiger: grrrr...rrroar....
 
Good morning :)
 
Als
@Nils: Afternoon already but good morning to you :)
 
@Als grrrrr roar
 
:)
 
Als
@TonyTheTiger: Where have you been lurking, didnt see you around yesterday i think
 
7:55 AM
@Als I was around for a bit
then had other things to attend to
 
Als
@TonyTheTiger: I was busy working,making some rep & boozing in the night yesterday
:P
 
ro.me WebGL looks quite amazing :)
 
@Als heheh
 
@nils : good morning to you ..
 
8:13 AM
i want to create run time error ...
and i found some program that create run time error as inline function..why?
while inline function can be used instead of macros
 
@Miss codepad.org can u post it?
 
ok
 
@Miss inline functions tell the compiler that it can inline the function, but the compiler doesn't have to.. that's not exactly the same as macros
@Miss only use macros if u have to
 
hmm
inline bool throwX( string const& s )
{
throw runtime_error( s );
}
i think i do't understand inline function..
 
it shouldn't have any influence on how ur program behaves
 
8:20 AM
@Miss In this case whoever wrote that function probably only wanted to define it in a header file
 
yes
 
as Nils is pointing out, it doesn't change the behaviour (it affects correctness)
 
its defined in header file
hmm
but i am reading book .. there its written that template and inline functions are used in c++ while C use macros instead of inline
i understand macros .. but i think i did not understand inline function
@luc: do you mean that if i use that above function as forward function in .cpp file .. then it shoud be not inline...
is it?
 
@Miss What do you mean by forward function? Function declaration?
 
funtion declaration mean function declared that can be define after then ...
its same as variable declaration././
for example.. int x ; int A( ) {}
int x is variable decralation and int A() is function decalaration
and function declaration must be used before its defination....
thats called forward function ...
 
8:35 AM
@Miss No
you can define it on the spot
 
yes right
we can define
 
int A() {} is a definition
 
this room is kicking on a saturday o_O
 
int A(); is a declaration
 
yes right
now if this fucntion is used many time in one translation unit
then it should be forward declaration.///
 
8:38 AM
A definition also counts as a declaration
so after the inline function has been defined you can use all you want
 
yes i agree
 
So whether you make a function inline or not doesn't change how you use it
 
you mean if i define inline function, it can used everywhere i want...
is ti?
 
it changes where the definition goes
You have to make sure you don't violate the ODR though...
 
hmm
well still i did not clearly understand inline... but now me confused becasue as i know that for violation of ODR, we can use guards or #pragma once
ahh i see ...
i think guads or #pragram once are used for header level while for violation the ODR for functions we can make that function as in line
 
8:45 AM
I think I could help you better if there was something you were trying to do: do you want to use an inline function or write one?
 
ok then hold on ...
 
heh I didn't even know about ODR :D
 
@nils: what heheh .. i like this ODR ,,.,. because by this i came to remember some one..:)
 
yeah it's pretty obvious that everything can have no more than one definition
 
C99 rules about extern inline are pretty crazy
 
8:51 AM
ahh @lux: according to the concept of ODR, i think i understand the inline function
but not sure..let me make a simple program that use simple fucntion and inline function
 
Hummm how am I supposed to use this on an array of type float?! developer.download.nvidia.com/compute/cuda/4_0_rc2/toolkit/docs/…
 
@lur
#include <iostream>
using namespace std;
int A(double x)
{
return x*x;
}
/* print()
{
cout<<"result: ";
}*/
int main()
{
cout << "Hello world!" << endl;
cout<<"result: "<<A(5)<<endl;
return 0;
}
 
@Nils cudaMemset(static_cast<void*>(array), 0, sizeof array);
@Miss That's not an inline function
 
That's then also zero in float? What if I want a number instead of zero? and what about double?
 
ok hold on ...@lux
 
9:00 AM
@Nils It scribbles memory byte per byte so I don't think you can put something in there without UB
I'm assuming that for 0 it is not UB but I'm not sure
note that it's the same prototype as std::memset
 
UB?
 
ok now i make that function as inline ...
#include <iostream>

using namespace std;
inline int A(double x)
{
return x*x;
}

/* print()
{
cout<<"result: ";
}*/

int main()
{
cout << "Hello world!" << endl;


cout<<"result: "<<A(5)<<endl;

return 0;
}
 
undefined behaviour
 
hummm
well it's 4bytes at time I think.. int
 
@Miss If in some other TU of your program someone uses his or her own int A(double) you'll be in trouble
so you can make your int A(double) unique by putting into an unnamed namespace or making it static
 
9:03 AM
yes i can make this unique by puttinh them in namespace right
 
@Nils std::memset takes an int too but the specs says it's converted to unsigned char
I assume CUDA does the same
@Miss No, in an unnamed namespace
 
ok thx @LucDanton
 
@Nils After checking the Standard offers no guarantees for floating-point types
so you'd better find some guarantees offered by the implementation
 
hmm memset should take the size of an element as argument, this would make it easier..
 
ok @lux: if say some use same function in my program :
#include <iostream>

using namespace std;
inline int A(double x)
{
return x*x;
}

/* print()
{
cout<<"result: ";
}*/

int A(double X)
{
return X*X;
}


int main()
{
cout << "Hello world!" << endl;


cout<<"result: "<<A(5)<<endl;

return 0;
}
so then i get errorr yes right
but what benefit i get from inline
 
9:07 AM
@Miss Do you understand the distinction between a program and a translation unit?
 
yes
 
The snippet you just posted redeclares A so it's ill-formed
I meant that A would be used in a different TU
you're putting it in the same one
@Nils std::memset is part of <cstring> though
 
ok
well I'll just write my own
 
ah i see...
 
@Nils Do you have access to <algorithm> for std::fill?
 
9:11 AM
nah
 
a loop it is then!
@Nils I wouldn't be surprised however if somewhere in the CUDA docs they would give a pass to memset'ing to 0, even for floating-point types
 
yes sure, but I haven't found it
 
ok @lux: let me use this A() function in another translation unit
 
@Miss if A isn't declared inline (in both TU), you'll see the usual linker error
if A is declared inline, I suspect you won't
 
hmm lets me define the A fuinction in two translation unit without inline ..
let me see what happen as you said
 
9:16 AM
@Nils Oh plus you needed a non-0 value right?
 
@LucDanton So far this is my solution codepad.org/7l3pdwWi, wondering weather it's much slower than cudaMemset.. and I'm too lazy to test it :D
 
bad inline function ... i am gettting angry on them.. any ways i have to fight with it
 
@Miss What happened?
 
nothing .. i am getting bore with it... i have to fight it
 
Haven't used them for a while, you can't declare them in a header and then define them in the c file or something..
 
9:27 AM
@Miss In any case for source files I'd recommend that you'd either not use inline, or only use it with an unnamed namespace/static function
 
you mean static int A() {}
or namespace{ int A() {} }
 
For example http://foam.sourceforge.net/doc/Doxygen/html/Particle_8H_source.html line 487
Particle.H contains the declarations
ParticleI.H contains the definitions of the inline functions (and is directly included in the H file)
Particle.C contains all the other functions.
that would be a way to deal with it..
 
@Miss Pick (a safe) one among ideone.com/B7Bt5
remember: this is for source files
@Nils Is that an ASCII nabla
 
yes, but what I wanted to point out is on line 487, @LucDanton ;)
 
what is nabia in ASCII
 
9:36 AM
"the nabla symbol, which is used to denote the mathematical del operator where tensor is formal." wikipedia
 
ahh i understand the inline now
see i maked the functuion A as inline in two different TU
and it works
let me make them un-line
so as a result : if function si defined two times in TU then its ODR occur
and both TU need that function...
so for defining them one time we can make those fucntion as inline
so that it will avoide ODR problems
ahh yes ... now i am right
 
@Miss not quite, it's more insidious than that. I'll summarize:
 
i think inline means define the fucntion once ..
 
if something is declared as TU specific (unnamed namespace or static) then the only way to violate the ODR is to define it twice in the same TU; a compiler will catch that easily
 
in all TU ..
 
9:42 AM
@Miss something defined in another TU cannot affect something TU specific
 
but when i defined same A() function without inline ,, it make me error
 
If something is not TU specific, the ODR is violated when there are two different definitions in the whole program
 
hmm
 
if you don't use inline, a good implementation will report an error (it's the linkers job)
if you use inline, implementations will not report an error these days
BUT it's still an ODR violation
 
yes right
 
9:44 AM
That's the real important part
just because it compiles fine doesn't mean it's correct
 
hmm
 
Two different definitions = ODR violation and inline has nothing to do with it
 
hmm but that did not make me error, just because of inline what does it mean ..
 
"just because it compiles fine doesn't mean it's correct"
period
Not but's
If after all this you feel like you don't want to use inline then it's fine not to use it
 
hmm then jsut usse unname namespace or make functions as static
right?
 
9:47 AM
Right
It's also ok to use unnamed namespace/static and not use inline
 
hmm then let me make those two function as static in different TU
ahh yes it worked ..
hmm so static can also avoid ODR problems
 
@Miss perhaps it helps if you understand that inline has two purposes
@Miss indeed
One of the purpose of inline has to do with multiple definitions and the ODR; let's call this the expert use
the other purpose of inline is a hint to the compiler; it's arguably pointless
So perhaps you shouldn't try to understand inline all at once but learn how to do what you want to do
 
well inline make me confuse ...
ok tellme onething
what does it mean ]
if some one use inline functuion in .h
why that function is as inline ... in .h file
 
star wars again!
 
@Miss That's the expert use
 
9:52 AM
yes i knwo ,.. but i want to knwo and use it
 
@Miss include the header (<- really important) and use the function
notice that if it weren't inline you'd do the same
inline is needed for writing the function but not using it
 
hmm ok let me do it
hmm well
see i removed previous static or inline fucntion from different TU ...
and then make .h file and add int A() function without inline
and its work .as it should
 
With the definition in the header?
 
ahh i see
yes i defined fuinction in .h
and included .h in 2 different TU
then i make me error as it should do..
 
Yep
So it's harder to make an error without inline
 
9:58 AM
but when i make the fucntion as inline in .h.. it avoid that error
 
Yes
The program is also correct
 
hmm it works looks to me same as guards or #pragma once
that inlcude the things only once
 
@Miss yes but they work only for one TU at a time
inline is for the whole program
 
ahh i seee
 

« first day (210 days earlier)      last day (4746 days later) »