I love you guys
For me, an array is the data
For fax, the array is the container
"free your mind" is code for "I'm spewing bullshit and you caught me"
Most of us here have read one or more std and played along.. We don't much give a flying-suck if you disagree: what is, IS.
you and C disagree.
Consult the C specification to remedy your incorrect definitions
in the context of the C programming language, passing each element of the array separately is passing each element of the array separately, but is not passing the array. However, it may be possible to reconstruct the array on the other side.
well, you got the head right
If you want to define your own terms, you wont have much luck communicating
what you will do.. is look clueless though
[as you do just now but I assume that for deeper reasons than terminology alone]
write a goddamned doc. NOW, show _me_ a lexer and parser
PoppaVic, do you UB can format a hard drive?
are you insane? I live in the context of the tools and os
If I knew asm, I'd easily pass an array as an argument ;P
For all C cares, UB might result in the moon turning into green cheese, or your sister being raped.
But I'll have to bug the ##asm guys about that
yes
ASM makes C look wonderful.
x-D
hmm, btw, parameter variables are always on the stack?
Like I said earlier, you can just put the array in a struct
there is no "stack" in C.
{int x[5]; x[7] = 44; printf("%d", x[7]);} - I love code like that. Somehow works...
that depends on the ABI calling conventions
C makes itself look dreadful. :-) SANiK: If you get anything out of this, let this be it: pick up your C book and start reading.
this is out of the scope of C
asm is a clusterfuck, because at least 3 differnent interpreters all do the same thing.. Don't confuse ASM with "portable" or "C" with "asm"
e.g. totally implementation/platform/OS (ABI) specific
Anyone that doesn't believe ASM or "linker" is not not a goddamned interpreter needs their head examined
And make sure you aren't reading anything by herbert schildt. :-)
ARGH
He likes to pass things by reference.
POPPA SPANK!
herb was a dit
It was amazing he could "explain" shit well, but not write a line of useful code
Oh, yes, like check whether we have reached the end of file before opening it. :-)
Oh, yes, like check whether we have reached the end of file before opening it. :-)
char* x[] = {"str", "str2"};
How can you check EOF before an OPEN?
don't change those values
state is dependent
if you do, behavior is undefined
how do you initalize a multidimensional array to 0
Well, that's what he does in his book. It's a good exercise in debugging C code.
char x[10][10] = {0} doesnt seem to work
Come on guys, I'm going to get flamed for days over all this shit
int foo[5][5] = { {0} };
gh'
how does it not work?
segmentation fault
I'd avoid the issue
mmm...34C
EOF -before- open?1
what do you maen
fax, that's what she said!
just use memset
Hmm. I'm having some trouble and I don't think I'm understanding hot to make C header files. I made one that is more or less in this pastebin (http://pastebin.ca/606354) and I don't understand why.
you can't get an EOF (state) before an open.
that's probably something else
maybe its how I'm building it?
Herbert Schildt's books are full of bugs.
memset(x, 0, 100*sizeof(char))
and void main
That's an example of incorrect usage of functions.
Could you try to say somthing of value or nothing at al
well i think the error is with this:
char x[4000][4096];
nnutter, that header has to do with linking not compiling
NEVER do that
oh and of course in step.c it is included (#include "functions.h")
s/header/error
sizeof(foo) would work, no?
just... don't
no, because that'll just give you the size of a pointer
that probably overflows your stack
mauke, how else can i do it?
you need to build with functions.c
sorry, I know the difference between the two kinda, but I'm not advanced enough to separate those processes in my head.
ok, I'll try that, thank you
I just told you
memset(x, 0, 100*sizeof(char))
it means the compile host cannot find the function body
for your initial example
you could allocate the array with malloc()
AmI the only sorry-bastard that has suffered this sorta' shit for decades? Bought and read and tested against BOOKS (yeah, dead-trees_ Wtf?
not true.
excellent mauke thanks
why is splitting a string in C so darn difficult?
Now, in C++ it would have compiled functions.c/h since it was included in step.c wouldn't it have? Or am I just totally clueless?
int foo[4][5];
char* x = malloc(sizeof(char)*4000*4096);
This is how its been done for years, don't question it
memset(foo, x, sizeof(foo))
you'd want to use calloc, not malloc, if you're going that route
since malloc doesn't perform any initialization
ah okay
yeah, but sizeof (char) is always 1
assuming my understanding of "split" is the same as yours, it isn't. However, C isn't friendly with string processing in general.
you are clueless :-)
anyone have a dummy example of splitting a string ? hello.you need to split hello and you and the "."
sure
ok, heh, thanks
bigjohnto, strtok(3) (although kind of overkill)
http://rafb.net/p/AVrMJt51.html
x[5][1] right?
It's been a long time since I've looked at C or C++.
thanks again
bear in mind the error checking is omitted
no
lol
ok thanks to you both
mauke, then how do i access the data?
you'd need something like char (*x)[4096] = calloc(4000, sizeof *x); for that
char x[4000][4096]; memset(x,0, sizeof(x)); //should work.
because there is no "string"?
dude, that's ~16MB
I'd just iterate through the array element by element until I came to what I was looking for
ah i see
I hope your stack can take it
true, that's probably too big.
what if the "array" could be differing sizes?
oh i c what you mean
mauke, what happens if i do it with calloc and my stack cant take it?
hmmm let me try that
nothing, since calloc doesn't use the stack
mauke, elite
Master_Medic, calloc uses heap
so what if my heap cant take it?
then calloc returns NULL
it doesn't matter how you screw around, there is no goddamned "string"
or it just crashes :-)
yikes
well if this doesnt work i will be back in 5 minutes
with commen interpreteations
don't be a pedant; you know what he means
hey it worked :]
until someone mentions Unicode or UTF-8, or UTF-16, etc
then what is string.h?
don't forget to free() it when you're done
free(x)?
yeah
Franklym I feel the utf-heads have a better clue
what if i forgot to free(x) the first time?
implosion
:/
Unicode
(althouhg getting 'C' into that headspace is... moot)
then it stays in memory until the program exits
that's funny
okay
my copy of K&R, 2e just fell off the shelf
they were blasting at the mine
and that was the only thing to fall off
it wanted to hurt you ;-)
First you learn about strings; then you learn that there are no strings. Heh.
look up sizeof
how can i do a sort on that array x?
qsort
no, there are chars and ints, and - whatever.. Folks need to realize that SOMETHING knows how to see EOL or elements, SOMETHING.
Xgc, what do i put for the comparison function?
my overall goal is to read the files in a directory and have them stored alphabetically in an array
comparing WHAT? when?
mm, people, how would I link all the libraries statically to my executable with gcc?
oh, sheesh
strcmp?
?
I doubt even xgc can save you
how do you do it dynamically?
usually id do gcc -c to compile host each file as a .o, then link all them together
yeah, yer expecting the universe agrees
uhh i dotn know
thats just what i do to link the libraries i use
heh
Basically I want for example to have libc statically linked to my executable. How do I do that ?
.o are generated by tools, .a (aka stlib) are a universal way to group .o; shlib are clusterfucks of who does what to whom? - which has very little braring on C itself.
braring/bearing
anyway, i'll google it again thanks
I really can't chastise my sibs that are machinsits/motorheads
"machinists"
There are loads of existing examples on the net.
Xgc, yeah i'm just gonna change from readdir to scandir
Xgc, found example in man page
KISS principle
can'r be helped, if yer awake an care
Still, no skin LOCALm but -- damn
indeed
Hi
hey
argc[1] = dateiname[];
what do you think [] does?
oh I watched that pink floyed film the other day, pretty cool if you haven't seen it
it signal that dateiname is a array?!? ^^
wow.. enough punctuation
no, you dont signal things like that.. its not like perl
dateiname[i] or only dateiname?
the last?
You can have [i] or nothing, but not []
I rented it once.. Youngest brother watched, I turned it off a and kicked him out.. I didn't need him to SEE howto...
The tunes are fine
howto what?
good animation in it
subscripted value is neither array nor pointer
on argc[1] = dateiname;
shoot-up, shave yerself, suicidde, etc
mm well maybe you hav a point
do you understand what that error says?
no
why not?
doos what is the type of argc
kid was under 18
[1] is the subscript, the subscripted value is argc
What mean subscripted, value, neither, nor?
value = wert; neither-nor = weder-noch
let them experience reality - smack them in the face - before you "share"
ah, danke
watch er ass, yer assuming where C can't
er/yer
anyway - Folks?? Stay well.... Don't do what I'd typo! ;-)
http://rafb.net/p/bIBrtK90.html thats my code
if (fileobj = NULL) {
are you aware thats assingment and not a test
should use ==
ah ^^
yes
argc = dateiname;
why do you do that?
I think you want
dateiname = argv[1];
instead
but you should learn about what argc and argv are
dateiname = argv[1]; == argv[1] = dateiname ;
?
no, of course not
what are you trying to do on line 18 ?
by gcc i write
./name filename.txt
what other programming language are you used to?
or none?
is there any good C rss library?
perl, php hosting and python
wtf
^^
a = b; is not b = a; in ANY of those
why would you think it is in C?
it stay in a book
also, what does | do in assignments? example: stbuf-st_mode = S_IFDIR | 0755
same thing it does in any expression
that is?
or?
bitwise or
sanmarcos, google for 'bit operations'
for forging paquet on linux, is there something else than libnet ?
primepie, ./name filename.txt filename.txt is argc[1] right? I would open it, but i cant write fileobj = fopen(argc,"r"); , or?
no
at first i must give the value of argc to a array?
argc is the argument count, a number
argv say who many i have an argc have the all parameters?
argc give amount of parameters
and argv give you the parameters
dooky, argv equals all the arguments passed to it + the name of the program itslef
eer, argc sorry
assert( argv[argc] == NULL )
When I set a watchpoint, gdb just sits there when I continue and nothing happens. What does this mean?
argc[argv] is the last parameter, right?
is there any good C rss library to pull and parse a RSS feed from HTTP?
argv[argc-1]
dooky, argc is an integer number (5, 10, 22), argv is an array of strings containing the arguments passed to the program plus the name of the program itself (argv[0])
doos, *
I'm doing watch (int*)0xbfaede87
and it just sits there
don't do that then
instead of segfaulting, like it should.
I really need to know when that value is being changed.
who must dateiname = argc; right be? :|
dont do it
not in C
write in asm
explain what you mean
dateiname = argc; token.c:18: error: incompatible types in assignment
http://rafb.net/p/MylW7p38.html
my problem is that this C code is doing something to destroy the stack, and specifically, this value of memory, which is where the stack pointer points, is being corrupted. I want to find out what line of code is changing that memory.
Use a tool like valgrind or purify.
I have used valgrind, but I'm not sure how to get it to do what I want it to do
dateiname = argv[1];
Do you have a testcase you can post
make dateiname char *
yes
you want the valgrind, the source, or what?
http://rafb.net/p/RI1OKB64.html -- valgrind
The source, build instructions and instructions to duplicate the behavior. How do you run it and what input is requried?
that may be more than you want to get into..
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=860
Is this not a testcase or is it the entire application?
http://rafb.net/p/KGUT1a88.html the errors a bottom
I have a test input. but I'm running it on the entire application
You cannot assign to an array.
The report has been assigned. Give the developer hosting time to work on it.
Where's your C book?
ENOPREC
yes, I'm trying to see if I can make a dent in it
prec, dateiname = argv[1]; isnt right?
I told you already 3 times
Why don't you just ask me if I say somthing you don't understand
make dateiname a char *
not a char [13] or whateer
char *dateiname[12];
is a char *
no, it is an array of pointers.
You need a C book.
without [12] ?
C is for cookie!
Any one or all of those error can be severe bugs, all capable of crashing the application. They probably all need to be fixed. Not all of them are in the control of mplayer developers.
thanks a lot
its work
But it print "Speicherzugriffehler" at least
if my code includes something like #include "file.h" must I make reference to that when I compile it with gcc, if so, how?
The bad write is probably the one that crashed the app. But it could have been the result of one or more of those other serious errors.
because I am getting something like /tmp/cceTKFAv.o: In function `main':testfetch.c.text+0x31): undefined reference to `http_fetch'
sanmarcos, gcc file1.c file2.c -o myprogram
It should be pretty easy to track down.
sanmarcos, sounds like you didn't link an object/library
thanks
only determines where the compiler should look (first)
word="tiger"; if(word =='tiger').... would that work?
for "" it will search the current directory
it looks like its dvdcss_open libdvdcss.c:491
no
rafb
Read A !@#&ing Book - Your primary guide for learning C should be a good book (see http://www.iso-9899.info/wiki/Books). You must not expect to become a proficient C programmer just from reading crappy online `tuts', staring at other people's
code, and/or boring us to death by asking dozens of exceedingly trivial questions.
fax why?
wow, that's quite a rant candide.
bigjohnto, man strncmp
candide.... whatever
blwood thanks
Consult your C book, else you will not know how to use strcmp or strncmp.
When you probably should have asked somewhere else and the answer to your question is too complicated for you to understand anyway.
I like candides speech
the code work, but not correct, fax http://rafb.net/p/GLAqDv58.html
i write gcc -o output inputfile.c
Probably the worst of the bunch is: css_open (dvd_input.c:88)
But they all need to be fixed.
./output test.txt
whats wrong with it?
but the text.txt dont show
could it be they are all related?
fax, i dont know why
here http://rafb.net/p/AVrMJt51.html
this reads a file
and you can print it with
while(*lines) printf("%s\n", *lines++);
fax, but my code dont read it. I wouldnt copy and past code from a other person
why would you not copy and past code from another person?
ok you do fopen
but you never read any data frmo the file
i would make it same and i didnt understand yours
you should try fread
hö?
omvg
you're right fax
Im so silly xD
It seems the uninitialized values are probably separate issues that could result in the bad write. Without seeing the code, it's tough to say.
The valgrind output may be all that is needed to squash this one. There should be at least one fix posted shortly I would think.
can I do something like this int function() { return 0; } int * status = function() ?
sanmarcos, why int * ?
no need?
why not just int status = function(); ?
why not just
int status = 0;
leave
me thinks you get the wrong idea whenever I say that.
why don't you just go away?
or not do that
stays. continues.
how can I have a structure member be a pointer to that type of structure itself?
Why
becuase it doesn't hurt anyone
name the struct
I thought there was a way to forward-declare struct types, but I can't find it
struct foo { struct foo * x; };
Its not good
Not relevant to this channel
and I do need to keep up with modern C
Just irritating and pointless
Just please stop it
right, thanks!
if you make it irritate you, sure
fax, http://rafb.net/p/Gi06z627.html
some idee fax ?
howdy all
char trennz[] = ". \"\t\n";
I just installed msys on my win2k laptop, but apparently i don't have gcc?
maybe not that
i thought msys was supposed to have everything you needed to compile c code?
Why shows the first 1 the second column 2 ...
in the test.txt stay:
1...
2....
so what did you want?
1
2
row 2 show 2 mark the row 2
row 3 show 3 mark the row 3
you understand what i mean? fax ?
What's your question?
why row 2 show 2 mark the row 2?
can I do something like this on the fly? strcmp(cur_node-name, "string") ?
Why line 2 is 2 times indicated. Line 3 3 time Line 4 4 times
or cur_node-name == "string" ?
I'm not following.
== does not compare strings
http://rafb.net/p/Gi06z627.html @ prec
Post your data file.
Xgc, http://rafb.net/p/Gi06z627.html :o)
I see your paste. I don't understand your question.
prec, so I always have to do the strcmp(char, char) way ?
3.....
uh, you should generally use strcmp to compare strings, yes.
It's because you output a line for each token found.
there stay 1x 3.....
what is aclocal?
What do you expect it to be?
Xgc, hö?
prec, and I cant do strcmp(charvar, "string") ?
man aclocal; man -k aclocal; info aclocal
printf("\n%s", token[i++]);
ty
'charvar' betrays a lack of understanding.
Assuming that 'charvar' is a pointer to the first character of a null-terminated sequence of char values, then yes, that's perfectly legal.
charptr, whatever
strcmp doesn't want any old char pointer, it wants a pointer to the first char of a string.
right
aahh
while (token[i]) {
printf("\n%s", token[i++]);
thats the mistake
i have automake installed, why anjuta compailns about it while creating project?
That's the reason for the output.
while must check if its end of token[]
how can i realised that?
it should already do that
assuming it's null-terminated
if it's null-terminated, then once it gets to the end, the value of token[i] will be false, and thus it won't enter into the block
I've no clue. Try #anjuta ?
Where is the end?
while (token[i] == NULL) {
?
empty
http://rafb.net/p/lyUA5V48.html
metadata, what's the problem?
i know is something stupid like I need a & or something but can't find it, sorry for my explanation
What are you trying to do?
prec, the end is variable
struct2 = (struct mystruct2 *)ucharpointer;
just a ugly conversion from and u_char * to my custom struct
this is never a good thing to do
Yes; why?
Why do you expect that to do anything useful?
while(token[i] != NULL) ???
:-)
isor ==
for (i = 0; token[i]; i++)
to access to some values in a more easy way
for (i = 0; token[i] != NULL; i++) /* or this */
*easier
What values?
the u_char * is some packet data (libpcap), so I want to access to some fields of the frame
You cannot do that.
You must deserialize the octets properly.
@prec: big/little indian thing?
Unknown command, try @list
what is wrong with char * xml_items[1]; xml_items[0] = "title"; xml_items[1] = "link"; if (strcmp(cur_node-parent-name, xml_ignore[0]) != 0 || strcmp(cur_node-parent-name, xml_ignore[1] != 0). I get a segfault
thxs, I know I should. But the thing is that conversion just works if outside of the function
That plus alignment, type sizes, etc.
I doubt it.
xml_items[1] doesn't exist.
thnx
prec, why not? I assigned it
You may not assign to an object which does not exist. xml_items[1] = "link"; is illegal
I print the data and I see the correct values (I check them with wireshark)
By luck? Yes.
on thousands of packets?
prec, so, how can I make an array that includes both "link" and "title" ?
By the happy coincidence of your particular platform/architecture/compiler.
You need an array which is large enough to store at least 2 char pointers.
prec, but char * myarray[1]; would store two pointers to a char, right?
thxs a lot, will try to rethink and recode it. Any advice or help to deserialize the octets properly?
No.
prec, how would I do it then?
You'll need to have a spec for the format of the data.
char *myarray[2];
I thought 1 meant, 2
what do u mean? (sorry about that my mother tongue is not english as you have thought)
prec, then just use myarray[0] = "string" and so on?
If by "so on" you mean until myarray[1], yes.
prec, I still get a segfualt
What format are you loading?
Show us.
indexing starts with 0, allocation is the amount needed
I'm loading ieee802.11 frames from a libpcap capture
prec, http://pastie.caboo.se/76728 see after line 30
OK, so what's the first field? How many octets long is it, and how it is encoded?
that's what I have defined in my struct
line 40: mixed code and declarations ...
prec, char * xml_items[2] ?
I'm not talking about your struct, I'm talking about an IEEE 802.11 frame.
A C struct does not define how members are aligned or whether and how much padding there is between members.
for example first field is the frame control 2 octets first 2 bits the version, next 2 type, and such
A C struct also does not specify any particular encoding for integers.
const char *xml_ignore[] = {"channel", "image"}; const char *xml_items[] = {"title", "link"};
this is how I have defined it http://rafb.net/p/X3TYRv86.html
prec, ok
what's happening if cur_node-parent is NULL or cur_node-parent-name is NUL?
OK, but note that C doesn't guarantee how that struct is laid out in memory.
kesselhaus, it never is, but if it happens to be, I dont have the slightest Idea, I just borrowed this code
kesselhaus, I guess it just ignores it, (it doesnt pass through the tests)
prec, I still get a segfault
so a root node has a parent?
kesselhaus, I dont know, go read the libxml docs if you care that much
I ask you to check this!
Why not use XSLT?
accessing null pointers makes segfaults, this is why kesselhaus cares
i don't care about XML host and such currently
hehe, if you are going to use libxml, it is _you_ who need to read the docs.
ahh right
then u mean that is better to assign octet-by-octet to my struct fields?
argument sequenceid="1"stringHello, %s/string...
-parent is null
juanmabc, how can I avoid it segfaulting when it access a null pointer?
Don't access a null pointer
Check first, if you must
test first if == NULL
Yes.
Have you written any XSLT?
metadata, no quotes on null right
A bit. I never did learn XPath though.
right, I get one NULL pointer in the parent, that must be the root, that has no parent kesselhaus
thxs a lot for the help and sorry for all the silly questions
which causes the segfault on the string comparison
My resume is an XML document which can be filtered based on skillsets (an XSL transform), and converted to RTF, text, html, or troff (and thus to PostScript) all of which are XSL transforms.
rather, the parent of root has no name
np.
I haven't; my only exposure is to the nightmare-like syntax I was alluding to above. Xpath is handy, mind, but.. do you actually write xslt like that, or do you use some extra syntax layer?
But I admit I wrote all that stuff years ago and I've since forgotten most of the XSLT I learned.
characters.
My resume is, oddly enough, all postscript. I was experimenting at the time, so it's /interactive/ postscript.
(Sort of. Command-line gs kind of interactive.)
I haven't really gotten to use it, so it doesn't have the sort of convenience features yours does.
What is a good way to merge two files? is there any algorithm that I can use in C?
what do you mean by merge?
two files that contains keys and values
like this
hostname=myhost
the other file has hostname=localhost
when merge I want the new file ( I will know which one is)
That's a job for... perl, or something. Definitely not c.
to have
:-(
can't do perl I can only use C for this
Why?
it's one of the requirements
This is homework?
nope
Is it performance-critical?
hmm...
not sooo critical
Will it run on a system with 500kB of ram or less?
but it can't be too slow either
Then change the requirements. Requiring C for such a program is silly.
no it'll have like 8MB or 16MB of ram
Finish your description. What did you want the output to be?
it's a cgi program too
that's why it can't be too slow
Perl sounds /great/
yeah it sure does
Use C? For CGI?
but
yup
Security implications are just awful
hey I'm not the boss
And there's *no way* the 20% speed hit from using non-c will make a network-limited or hd-bandwidth-limited program such as this into a cpu-limited one
it's a normal merge like anyother with one exception
I want that the latest change win
I will know ahead which file will be theh most uptodate
get over it there is nothing we can do that's how they want it
Perl is written in C.
Use a language that compiles to C, and call it your program?
yeah probably most script langauages are even Java
or the java JRE I should say
Heh, "Script language"
they use C to implement the JVM
So you want to write a C script?
nope
I want to learn how to merge two text files
Sorry. I thought that's why you were here.
using C algorithm
Can you think of how to do it in, say, perl?
I have never used perl
It should be pretty much a direct translation. This idea is /very simple/.
Some other language you have used, then
It's actually trivial.
man I thought this was the C channel not the perl channel LOL
No, this channel is /about/ C
says it's trivial
perl -le'open my $fh,shift or die$!;%x=map split/=/,$fh; open my $fh2,shift or die$!; %x=(%x,$fh2);'
(You're welcome)
It's a perl one-liner, so..
Er, mrt
Ah. Thank you.
You do lose ordering in that implementation.
hi buu
what does that do? :p
I see hashtables and shit
So what's the holdup? You have 3 streams of data; 2 input and 1 output.
Hah
You guys don't get it do you? I'm at the bottom of the food chain I have no power over this they say it's C only implementation and the whole thing is almost done I have to merge two files and then I'm done
this is valid right? struct RssData { char *title[]; char *url[]; }; ?
It's a standard merge. What's the problem?
perl -nle'my($k,$v)=split/=/,$_,2;$x{$k}=$v; } { print "$_=$x{$_}"for keys%x'
Much better.
wtf does it do
I do not have the knowledge at this stage to do standard merge I have never seen an algorithm for it and I have never tried to do something similar
It just accumulates a list of k,v pairs and then prints them out.
I always liked assignment with tuples
oh ok
from a file like a = b\nc = d?
Good day everybody, i was wondering if someone would be able to help me with compiling with GCC, im trying to use includes linux/init.h linux/module.h but it doesnt find them, i want to use the one from /usr/src/..kernel thing but itlooks in /usr/include.. could someone help me
please
So tell your boss to let someone else do it.
Yup.
The first one explicitly iterates over each file, assigning it to a hash.
how can I do something like key value in C?
The second one merely iterates over incoming stdin, taking advanage of the fact that we always want the second value to win.
each *file* ?!
I can learn
damn
I thought it was each line
Er, I meant, each line from each file.
yeah, I see that
oh ok
$fh and $fh2
What is there to learn? Do you need to learn C? Do you need to learn what a merge is?
Get a hash table, insert values into the hash table, order the insertions appropriately.
perl -nle'($k,$v)=split/=/;$x{$k}=$v}{print"$_=$x{$_}"for keys%x'
Of course, since this is C, you first get to /write/ a hash table.
Are the two input streams ordered?
nope
Then this is more than a merge.
ahh, so the C equivalent of a dict in Python would be a linked list with structs
Perl 6 should have a shorthand for }{
Are the input streams large enough that you can't hold them fully in memory?
How much data is in each stream?
yeah, that's really disgusting.
like 4K
once
i ate a bread..
4K bytes?
perl -nle'($k,$v)=split/=/;$x{$k}=$vprint"$_=$x{$_}"for keys%x'
yup
No, linked lists have different performance characteristics. Wouldn't it just be a hash table?
You're missing the }{
You really need to be more precise.
replaced it with perl -nle'($k,$v)=split/=/;$x{$k}=$vprint"$_=$x{$_}"for keys%x'
oops
replaced it with
Er, why?
So you have room for both input streams in ram at the same time?
awk -F= '{x[$1]=$2}END{for (k in x) print k "=" x[k]}'
perl -nle'%x=(%x,split/=/)}{print"$_=$x{$_}"for keys%x'
one less char
They're completely different..
prec:
{ url: somevar, title: somevar}, 1: {url: somevar1, title: somevar1}
If you're going to be that way about it..
Baughn, data, I received from an rss feed and I need to loop
Sounds like an array of structs to me
Or a linked lists of structs, maybe
Baughn, yep
don't worry about it
What was wrong with python?
perl -F= -ane'%x=(%x,@F)}{print"$_=$x{$_}for keys%x'
Do you know how to use qsort? Why not just use that?
:O
I think that another solution is hitting me in the head
I'll have to think about it
Baughn, nothing, I just wanted a channel, and I wanted to do a FUSE module which stores RSS torrent feeds in a file system
woah
Well, good luck to you.
Python lacks a fuse binding?
Baughn, python is faster and easier to code, but I wanted to learn some more c
Baughn, it has one
thanks
awk -F= '!($1 in x){print;x[$1]}'
Ah. Got it, but be aware the libxml is one of the true horrors of C.
Baughn, I use it lightly
You shouldn't use it lightly
I dont understand prec
Baughn, I just use it to get the rss feed, and parse it to a linked list, thats it
(S,CR)
print the line unless we've already seen that key
That won't work
oh I see
There you go, then. A haskell dictionary is actually a hashtable, but that sounds like overkill here.
tac |awk -F= '!($1 in x){print;x[$1]}'
We only want the second value to be pri.. ah
:P
Or reverse the files on the command line, assuming each file defines each key only once.
I'm thinking of just writing my new data to the file since they have key=value then I open the old file look for the keys in the new file and if they are there I do nothing (cause I want the new file to win) and if the key is not there then I add it from the old file and that's it
Baughn, by the way, if I wanted to store a string in a struct, I can do struct MyStruct { char *title[]; char *url[]; }; right?
Damn.
awk -F= '!x[$1]++'
I think that will do what I want to do
Hah, yeah
Same thing, but slower.
What do you think that type means? (And no, but please tell me)
Cute.
Baughn, I am a beginner in C, but char * name[] is an array of characters with an indifinite lenght, AFAIK
wtf is awk -F= '!x[$1]++'
You've missed a few issues.
I can load stuff into memory and search using strstr i think
print unless we've seen the key
A conditional.
how
The magic of wkland.
What book are you reading ?
Sorry, entirely wrong. Two issues..
which are?
_ralph, NONE!, now you can only blame me
First, * /always/ refers to some sort of pointer; pointers are not in any way related to arrays.
!x[$1]++ evaluates to 0 if x[$1] is unset; afterwards, it evaluates to 1, 2, 3, etc, for the subsequent values of the same $1
Second, C does not have arrays of indefinite lenghts. :P
Baughn, so, [] represents?
It's the subscript operator, but as a type? Nothing.
In C89, all array lengths must be known at compile time
It has to do with looking in the new file to see if keys exist and then adding the old data if they are not found.
Baughn, all I know it lets me just assing a "string" to it, and it works
Turn on warnings. If it works, it's by coincidence.
it works
Your description of actions doesn't account for some issues based on the way files are handled directly in C.
what about it? I just do a strcat
It's the /wrong type/
Baughn, oh, char * string[] doesnt, I am going to try char string[] now
the file will be loaded into ram
Do you need the final file to be ordered?
Incidentally, GCC does not compile C by default. It compiles a dialect where that type is interpreted as char** - which is, well, wrong, but works by coincidence on your system.
no there doesn't need to be any order
Or so I assumed, since you claimed it compiled. Since it doesn't.. neither will this try.
What book are you reading?
none
I can just put everything at the end of the file
everythign from the old file that is not in the new file that is
Get one. I can recommend K&R - "The C Programming Language".
you think the idea would work?
There is no way you can do this without understanding pointers and arrays properly, and you won't figure out either one without a book
yoD[D[D[D[D[D[D[D[D[D[D[D[D[D
Left arrow madness?
That's fine. You only need to hold onto the keys for the new list.
Baughn, heh, finally, I have a loop, that loops through the XML and gets me values (I have a counter too), right now I have struct RssData { char title[]; char url[]}; struct RssItems { int item; struct RssData *data}; as I understand it, I have to have a new RssItem struct for each recordset
I go through, how can I create them?
Baughn, I.e, I dont know how many records there are, I cant hardcode struct RssItems struct1, struct2; struct RssData strucdata1, structdata2;
I need to hold the keys from the old list I would think then do a strstr or no?
malloc. *Please* buy that book...
Just the keys for the new list/file.
it's funny this should work I guess you can call this a merge lol
The correct incantation is "Type *ptr = malloc (numElems * sizeof *ptr); - but you need to understand /why/ that is.
Read new list, write to output file; free all value strings; Read old list; For each key; if exists, skip; else write new key/value to the output stream and insert the new key in the existing list; loop;
Not to mention how to use the resulting pointer, what to do if it's NULL, and how to free it
the only think I care about is that all my keys=values are there
I am trying to reverse string...Is this: http://pastebin.ca/606528 correct?
yup
Baughn, I don't understand why malloc will help me, but I will google malloc linked lists
I guess this merging stuff wasn't so hard after all lol
That will probably require the least ram and be fairly efficient. The way you find matches will determine how quick this is. Don't search linearly for large sets.
See, that's why you need the book
for 4K of data it should be fast no matter what I do
the web is slower the user shouldn't notice
The other way is to just read it all into ram; qsort each list; then merge sort the pair of lists as you write to the output stream, taking the B (new) entry when there are matches, tossing out the other copy.
nah too complicated with no real advantage
qsort followed by merge sort is about as quick as it'll get.
It's trivial.
your copy isn't null terminated
qsort is provided by any conforming implementation. It's a single call per sort.
more trivial than what we talked about? I don't think so can't get more trivial than that
Yes, since you'll be left with just the shuffling part of the merge.
what do you mean by "qsort is provided by any conforming implementation" ?
that maybe glibc has an implementation?
Well, if you want to avoid the 2 qsort calls, you'll then have to write the search. That's your choice.
is dup2() POSIX ?
Yes.
interesting what's the name ?
You won't have to write the qsort for any conforming implementation.
man qsort
lol hey I have never used it
it's possible, yes
baah, this drives me nuts, it works in normal env (emb. target, reading from CAN), but it returns wrong values in cantata tests, filling struct like in test(), http://rafb.net/p/UD9ZKZ52.html
iodine, and do I have to add '\0' ? is there something wrong if string does not have null terminated?
now you would be the best if you give me the name of a library function that would also do the merge for me LOL
it's not a string unless it's null terminated
The merge is so trivial, you should be ashamed to ask.
guys
yes, you have to add the \0 manually
is dup2() POSIX ?
ya
cool, thanks
UncleJimbob3, but when I set some other buffer size for a or b, I have some messed asciis for output...
After the 2 calls to qsort, you just compare top items of each list to each other.
lol I guess it would be I had to think about it
yes; your point?
you've done this before or something similar that's why it comes naturaly to you
Allah, iodine but why it does not have null terminated character?
because you haven't put it in!
I been in this field for 10 months so I'm a nOOb
that's what we're telling you!
if the keys match, write the newer list entry to the file and toss the other. If they don't match, just write the higher or lower key value pair, depending on the qsort order you used.
because you stopped copying one character too soon
Allah, I have to copy one more char.?
the C library string-operating functions only stop when they reach a \0
so they'll keep printing output until they find one
even if it's beyond where you wanted it to be
even if it's beyond the array bounds
C doesn't do bounds-checking
is it possible to have a struct within a struct?
yes
int main(void) { dwim(divine_intent_of_programmer()); return 0; }
dogs do it all the time
I have a question about memory leaks
C can do bounds checking. It's not prevented by the specification. That's an implementation detail, what to do in that case.
struct in union in struct in ...
kesselhaus, eh?
It's undefined by the specification, which means you can do what you like with your implementation.
if I allocate space with malloc and then i get an error somewhere in the program and I do a return 1 from main or an exit(1) without doing free() do I get a memory leak? or would the OS take care of it for me?
everything is possible as long as your compiler can handle it
http://www.c-faq.com/malloc/freeb4exit.html
Unless you have a strong reason not to do so, you should free all memory before exiting.
freeb4exit? about return 1
The point I'm making is that the specification doesn't say you can't bounds check. On the other hand, it doesn't guarantee you'll survive the blast in all cases.
and everything is not possible. The specification does have limits.
there are many places where things can go wrong like when opening a file I would like to exit the app then I will have to have a free() call in many many places
I would hate that
yeah, everything was probably a bit to enthusiastic to say
MrRTOS, see if you can use an auto_ptr
You could write your program more modularly.
In C?
auto_ptr is C++
yup C++
hmm
I'm just going to exit if the OS does not free the memory then it's not my problem
your page says that free() does not guarantee freeing the memory anyway so why should I bother to free() before exiting the program?
hmm, thats not a good habit in some environments
oh yeah I agree but like you said in "some" environment and linux is not one of them
good luck doing leak checking.
right now I am calling a function that frees everythign before exiting
so all my exits are done by calling that function
C doesnt have count++ right?
but it works cause I have globals allocating memory
oh my bad, for some strange reason I thought this was C++ :-/
probably later on I'll have local variables allocating
Try it.
leak checking shouldn't be harder because I'm exiting --(on Errors) an app without free() allocated memory
if I'm exiting without errors I have no problem in having a free() there
hello
i am learning C lenguage and i was wondering if you guys can recomendme a book or some tutorial i cut start of
see the wiki
Allah, great wiki where ????
/topic
well i really newbie in all programing lenguage you think that C is good choice for a newbie like me
???
sure, why not
I would recommend you Java or C#
chicalinux, yes, get the K&R book
you're on linux so maybe Java
i'd say the opposite , if you are on linux, not java
araujo, hello is good to see a familiar nick
I would ssay, whether or not you are on linux dont bother with java
chicalinux, hi there :-)
fax, far better
okis
nothing wrong with java
But you should learn scheme first
oh god
of C is a good choice
*ofc
It's not
fax got it the fist thing i going to do is read me the wiki you guys tellme
fab31, why not?
*fax
The book is here http://mitpress.mit.edu/sicp/full-text/book/book.html
chicalinux, ^^ best book ever for learning programing
also, a great language
I think Scheme is better than C for learning programming
fax, i think C is very good for a beginner, it's not asm but it lets you get close to how a computer works
araujo, i'm going to the univ this year, we're gonna have to learn scheme
uaraujo, i'm going to the univ this year, we're gonna have to learn scheme/u
drdo, be happy
no way
it sucks
You are again wrong
why is that?
Scheme is a nice language.
do i have to like it just because you do?
you are just not appreciating the good things of life ;-)
yeah right
scheme is awesome
Oo
am i surrounded by lisp freaks?
in the C channel?
I think you'll appreciate it at the end of your course
Allah, maybe :P
drdo, yes you are :-)
who knows
but what i've read about it
so far
drdo, i guess most of us hate C in here actually
it's horrible
is there a way to check if an element isnt defined
C is great
But scheme is better
you've read about it?
fax, scheme might have it's niche
get some code done on it before making an opinion
im talking about the langauge itself
fax, it's totally counter-intuitive
MIT has a 20 video lecture course on the web that goes with their book SICP
check them out if you get stuck
i might take a look it
it would help getting mildly fluent at it before univ
anybody have experience with libxml here?
fax - btw, I forgot to tell you that mom was calling you
she said to buy groceries
lol
6
&
There's 5$ in the cookie jar
I doubt you'll need more though for the bread and milk combined
Maybe because your intiuation has been developed in a skewed fashion by your previous experience
shut up
fax, tell me
[9
why is scheme so great?
read SICP if you want to know
cool
i will
i wish i had a hardcopy though
i hate reading on the screen
yeah
I print out some stuff but nothing longer than a few pages
i might print it all
if they provide a nice format
hmmm I think there maybe a pdf but I could be making it up
my uncle can print it at the super uber mega fast printers they have on the base
There are courses to download from MIT site about Scheme
http://pastie.caboo.se/76763/text
(*i)++;
in add function
thanks, why does it need that/
you increment pointer, not value with i++, with (*i) you deference pointer and then you can increment it
ahh I see
int add(int i) { return i + 1; }
hey guys
i wrote a stupid prime number generator.. comments? http://paste.stgraber.org/1991
fdsdfs
df
das
ddgfg
stupid?
ftgdfgdfgdfsg
dfgdf
what do you mean?
g
df
gf
I would just do
1;
instead of if(countdivs1) return 1; else return 0;
gfd
dfasflkdslf
dssd
f
sdf
did you want comments on some aspect of it or somhing..?
just in general
hm.. im looking at your suggestion
well its not a very good algorithm
you do excessive amounts of recalculation
yes, how do i improve that
and a lot of unnecessary calculations
if you have for example, 15
if you have checked its divisible by 3, you know its also divisible by 5
Well, if you must do it with this algorithm, then modify isprime() to loop from 1 until the sqrt(num), and as soon as num % divisor == 0, return 0.
i dont have to do it with this algorithm .. it was just the first thing that came to my mind
the cutoff point is sqrt(num)
you need only check divisibility by prime numbers sqrt(num)
But, what you could do instead, is use the Sieve of Atkin to generate prime numbers. (Look it up)
so its worth saving a list of primes
ah.. i'm checking both ends of the scale
yeah, thats what I meant be recalcuatlion
http://en.wikipedia.org/wiki/Sieve_of_Atkin
that looks intense
I have a function that returns a pointer to a struct, how would I assign it in code?
ie var = list_add(&n, 0)
i'm re writing now.. it will probably have many a bug :-)
err, MyStruct *data1 = list_add(&n, 0)
Why do you think that?
Just make sure you understand each thing you code logically, and also understand how to write it in C
what type does list_ad return?
struct
what type specifically
fax, http://en.wikipedia.org/wiki/Linked_list#Language_support
fax, I am basing it on that code
Do you know what 'return type' means?
it returns a pointer to a strut
prime.c.text+0xe1): undefined reference to `sqrt'
and i did include math.h
-lm
to your linker flags
or -lmath
:-)
it runs many times faster
222yawn
but does it still work?
it looks like it does
then xystic's link looks like a good challenge
http://paste.stgraber.org/1992
++divisor
so you check divisibility by 2, then 3, then 4, then ...
why not check divisibility by 2, then 3, then 5, then 7, then 9
e.g. 2, and every odd number
Your new code is horrible.
You don't want to compute sqrt() in each iteration.
good point
And countdivs is uncessary, since if it is 0 it's not a prime.
int isprime(unsigned int num) { unsigned int end = sqrt(num); for (unsigned int i = 0; i end; i++) { if (num % i == 0) return 0; } return 1; }
whats a good tutorial for linked lists?
I'm really new to C. When I run this code under gdb and step through it, it works. But if I run it plainly I get a Bus Error.
http://pastebin.ca/606716
amazon.com - Get Algorithms in C - Sedgewick, R.
I would really like to know why
commonly that happens when you use indeterminate values.
xystic, something free,
foo.c(17): warning #592: variable "t" is used before its value is set
i didnt know you could declare variables in the first part of the for loop
hmm. i don't get that warning.
*shrug*
but I see what you mean, either way.
http://www.datastructures.info/books/
Dont do that
xystic is using C99
debuggers often force a zero value, which may not be the case when run normally.
what would you recommend I do? (sorry if this is obvious!)
hi
hm.. and i dont like c99 ?
I dont know if you do or not
(ignore that.. i am going to look up c99)
repair the way you handle t.
If you don't like C99 then: int isprime(unsigned int num) { unsigned int val, end; for (val = 0, end = sqrt(num); val end; val++) if (num % val == 0) return 0; return 1; }
in particular passing it's value to setup seems useless, since it is unknown.
If I declare t as a non-pointer, and pass &t, it works.
consider making t an object then passing its address, or allocate memory a store a pointer to it in t.
ah, ok. I think I understand what you mean.
Thanks. I'll fiddle some more.
how can I do something like new-title = "Torrent %d", number;
what result do you want?
just having the number replace the %d? liek printf would do
sprintf(new-title, "Torrent %d", number);
sprint
sprintf
thanks
Hi
I have a question...
49.
Does anyone know a c compiler for linux/ubuntu?
I highly suggest you read abook before you attempt to code
lol Hodapp
gcc.
Not ignoring me anymore?
cc/gcc
go to #ubuntu
i came from there... : P
I was never ignoring you
oh, awhile back you were, just not under this name
I was never ignoring you
Uh, right
like _ralph said.. cc/gcc
yes but..
recently i knew something...
www.ubuntuguide.com __Ser
__Serge__:
i wish the name for C was longer.. that way it would be wayyy easier to search for it in google
learn to search better
well sorry.. i meant to say in searches other than google
and find C in words
like carrot
most search engines drop less than 3/4 chr index terms
:-) I like his quit message
%d\n", i); /* warning: incompatible implicit declaration of built-in function 'printf'
#include stdio.h
i did
#include stdlib.h
oh crap it's stdio
hmm
i need C tutorial online free stuff
sorry to hear it, since they all suck.
but look at the home page, some are linked from there.
fax, did you miss me?
Ok - here's a question about warnings ... all of you were basicly saying "It's the programmer's duty to fix all the warnings, etc. etc."
But can all warnings be fixed? (without using -wno-)
hi candide
Hi there, pragma_
nice homepage
e.g., how do I tell the compiler that I actually want let's say if(blah=func())
No I didn't
I did notice you were gone though
add parenthenses
so that it doesn't keep warning me that I might have intended a ==
what do you guys think of this implementation to deal with a simple linked list?: http://pastie.caboo.se/76780/text
i already love C. it's so object oriented and purely functional
don't be stupid
the usual way is to use another pair of parentheses.
dont use 0 when you mean NULL
its ugly
fax, fixed that, but otherwise, it's ok right?
RssData * new = (RssData*) malloc(sizeof(RssData));
dont do that
what specifically?, what is the right behavior?
There is no need to cast malloc
infact its not a good thing to do
doesn't gcc warn if you dont?
ah,thanks, and it does not warn me
Why would it?
how can I turn on warnings?
malloc returns void *, and thats fine to assign to any other pointer type
true
I think in the past malloc returned char * and there was no void *.. so you had to cast
but I only think that because of being told.. not first hand
sanmarcos, read the man page
man gcc
get some man-loving
k
BUT WAIT
OH NO!
That's what some asshole ##Cer would say
but instead I'll cut you the time
Use -Wall
thank you for being pragmatic
yeah gcc doesn't warn. dunno why i though that
Get a book dammit
There are limitless resources available online.
And you wish not to use any of them
sanmarcos, see what I mean *points at ralph's comment*
I mean - it's like book publishers are paying these guys to withold answers and to advertise books for you to buy instead
doesn't gcc warn if you dont? I had that issue as well
algorithms in c
http://cgi.ebay.com/Algorithms-in-C-3nd-Edition-by-Robert-Sedgewick-9212882_W0QQitemZ260128322398QQihZ016QQcategoryZ378QQrdZ1QQssPageNameZWD1VQQcmdZViewItem
do you guys think its a good deal?
Don't be so rude
fax, it's the truth - you guys like to have people spend 20 hours looking for one little thing - time which could be spent doing much important stuff
You are obviously quite inexperienced wrt C but the advice ralph have is far better than yours
why doesn't linux have pselect() for the ARM? :'(
YOu maybe can't see -why- yet.. but you will
i have to keep using that pipe hack
grow up
I don't know which hack you are talking about but can you implement pselect with it? :p
ralph-: "grow up" won't make them grow up
pselect() is a POSIX function
;p
if you can take 20 hours to find something in K&R, you must have looked through it an awful lot of times before you figured out what you were looking for...
i can implement pselect in user space, but its really only useful when done atomically like in the later version of 2.6
this is the pipe thingy http://cr.yp.to/docs/selfpipe.html
is there a way to show what type a pointer is?
its written down in your code somewhere
or in a function prototype
not intrinsically
ok, so there is no function to find out
I guess that is okay, typechecking sucks
fax, btw, mom said to come home tomorrow to have breakfast with us
Stop it
Just ignore him; he'll soon tire of his attempts to make himself feel bigger than he really is, and leave.
wow.
incredible prediction :p
there is no way to access variables declared from other scopes within the function, such as an if block?
the usual way.
which is?
e.g., pass their values or a pointer to each.
can you give an example of what you want to do?
fax, see the problem is, I am stuck in a very, very ugly for loop that calls itself by function rather than by a logical, for, while, etc. Thanks libxml.
anyhow, I'll see if I can fix it by doing it by reference
something like this, http://pastie.caboo.se/76787/text (where the printf) is I need to take that dos variable to another function
http://rafb.net/p/IhoaAh90.html
does that int declaration change value if it was already defined?
my function is in a loop, it calls itself over and over, I cant do what you say
I have to store my data outside the function, that is, passing it in by reference, and storing it that way
My eyes hurt.
then give a better example
ralph-: me too
a function cannot be inside a loop.
ok, ill paste the real code
I should go to the opticians on monday.
http://rafb.net/p/VstWq450.html there you go, read the comments
you should be able to try it out and see the issue with the crappy loop to parse XML
also see how I managed to do the count by passing by reference
C doesn't provide that capability.
couldn't you just paste the relevant bit?
fax, it depends on a lot of things, but the main() and loop_element() functions are the key, look for datalist
seems like you are confusing a whole lot of issues
I thought you were asking about a single scoping problem
not 130 lines of XML related stuff
Except GNU C, which allows a nested function in a loop.
really?
inline functions in C are pretty useless
How long have you been coding
http://rafb.net/p/arBMMb48.html
ralph-, not long
ralph-, C, at least
ralph-, but if you dont have anything constructive to say, I'd rather not hear it. I am getting a book.
way to jump the gun
What other languages do you program in
I'm not here to insult you.
Don't suggest that I have nothing constructive to say.
How intolerant..
Hi, freespac1
ralph-, I had to, the usual comments are not constructive. I know a Python mostly, C#, PHP, Ruby, shell scripting, C++ and Objective-C (the overlay syntax and functions)
When did you start coding
gnu c is hardly the only exception. whether it is worthwhile to expose them all, so the differences can be described as well, seems the harder question.
ralph-, about 4 years ago, but I dont code that much. Never C
I see.
Perhaps you should look at "SAMs Teach Yourself C in 21 Days"
ralph-, I also happen to like strawberry ice cream
ralph-, I have the same book, but for C++
That's wonderful.
(linux edition), its quite good, most of my C knowledge derives from there
There's a Linux ed ?
either way, I dont like those X days editions, you can never learn anything too fast
i'd rather they teach me well than fast
I wanted to suggest the Beej's Guide to C programming to someone, it's about 130 pages.
I'm not sure how good it is though.
why all the questions?
http://www.norvig.com/21-days.html
I'm bored of you talking smack.
So I made conversation with you.
Is the Beej's Guide to C programming any good ?
ralph-, thanks for the insults
I haven't read it, so I dunno
dunno, but beej's guide to socket programming is good.
ralph-, thats why one needs pre emptive strikes
aghaster, UNIX network programming is better
I do own that book :P
same here
preemptive*
"Talk to other programmers; read other programs. This is more important than any book or training course."
hehe
hardcopy
I need that book.. I'll have to get it
yup, me too
a christmas gift
own, but unopened. doh!
XD
a random day gift from uncle
how many unopened books are on your bookshelf?
none.
how many dd you read from cover to cover?
errr. that's a hard one Xd
I usually stop when I've learned what I wanted
I haven't read 90% of the books I have
I get like 40 books for free and then end up giving them to someone else for free
without reading more than 3...
I have about 3000 books.
guys... buy more interesting books
I never plan to buy books
lol
I'm just stumbling along... and here's a garage sale... or a bazaar... or a used bookstore...
or irc.undernet.org #ebooks
hello
ralph-: I get stuff from Gutenburg but I actually read it if it's interesting... it ends up on my Palm Pilot with Plucker
does anyone know how to get the total amount of memory malloced by a program in C
is there a libc routine for this
datrus, platform dependent, which platform?
linux
glibc
man getrusage
I have some Gutenburg books..
A lot of stuff on ancient babylon, and assiyran history
ok thanks
np
ralph-: I got like 10 once for a research project, like the works of Shakespeare
Cool
and showed that my compression algo kicked gzip's butt on really long files
Gutenberg is nice. I tend to read only the classical fiction on there, though.
Hello all
any skilled c++ coders here, that wanna help in a open-source game project? PLZ.
project page up yet?
I just grab halfway random books and put them on my Palm Pilot. Handy for long rides and such.
we have. here:http://www.via2b.com/iteam/index.asp?highlight=home thx. for u feedback.
http://www.via2b.com/iteam/cgi-bin/imagens/artigos_grandes/level_green.jpg
looks nice
thx fax
I need to go back to college :/
My net at home is such shit
anyone to help in a C++ project code, please? guys?
##c++
thx fax, please talk with us tomorrow night in #iteam IRC ok? U will be welcome
?
Do u guys know other good IRC channels, where i can search for C++ coders? Thx.
##C++ maybe
I cant nest for loops inside for loops?
ok, im connecting now... (thx)
http://paste.lisp.org/display/44085 standard C?
Appears to be
Of course you can
this line test = make_adder(2);
fax, yeah, I just mixed some C++ code. I am completely rewriting that shitty XML loop code
Well mman isn't ansi is it ?
you assign a void * to a function pointer
which results in unspecified behavior
Well i think it is
if you guys dont mind me asking an off topic question, what does "ha valid" mean? http://www.kernel-api.org/docs/online/1.0/db/d8e/if__arp_8h.html#1d6c998dda361d89fbf2f867e88ef575
g
ttp://crazy.codetroop.com/randimg/?hentai.jpg
http://crazy.codetroop.com/randimg/?hentai.jpg