25062010

   1 <bgs100>        [Jun 25 20:00:28] Whoa
   2 <bgs100>        [Jun 25 20:00:34] where's pedro?!
   3 <bgs100>        [Jun 25 20:00:38] seidos, Ping
   4 <seidos>        [Jun 25 20:00:55] I don't know, he said he had to go
   5 <bgs100>        [Jun 25 20:02:11] :[
   6 <bgs100>        [Jun 25 20:02:15] Oh well
   7 <bgs100>        [Jun 25 20:02:23] seidos, Shall we have class?
   8 <seidos>        [Jun 25 20:02:32] I'm game
   9 <bgs100>        [Jun 25 20:02:38] cool then
  10 <bgs100>        [Jun 25 20:02:41] one sec, brb
  11 <bgs100>        [Jun 25 20:09:12] Back
  12 <bgs100>        [Jun 25 20:09:15] Aw man
  13 <seidos>        [Jun 25 20:09:16] wb
  14 <bgs100>        [Jun 25 20:09:22] I just lost the game.
  15 <seidos>        [Jun 25 20:09:26] what game?
  16 <bgs100>        [Jun 25 20:09:37] The game that you lose if you think about it
  17 <bgs100>        [Jun 25 20:09:43] We both just did
  18 <seidos>        [Jun 25 20:09:49] ?
  19 <bgs100>        [Jun 25 20:09:53] ...
  20 <seidos>        [Jun 25 20:09:55] don't know this game of which you speak
  21 <seidos>        [Jun 25 20:10:08] sounds like a riddle
  22 <bgs100>        [Jun 25 20:10:11] http://en.wikipedia.org/wiki/The_Game_%28mind_game%29
  23 <seidos>        [Jun 25 20:10:22] "What is the game that you lose if you think about it?"
  24 <bgs100>        [Jun 25 20:10:25] seidos, No, the object of the game is to not think about the game
  25 <bgs100>        [Jun 25 20:10:37] It's great fun to make other people lose.
  26 <seidos>        [Jun 25 20:11:08] haha
  27 <seidos>        [Jun 25 20:11:17] you just say "the game"?
  28 <seidos>        [Jun 25 20:11:20] and they lose
  29 <seidos>        [Jun 25 20:11:29] reminds me of the movie
  30 <bgs100>        [Jun 25 20:12:15] no
  31 <bgs100>        [Jun 25 20:12:24] You don't have to say it...
  32 <bgs100>        [Jun 25 20:12:34] just somehow make people think of it.
  33 <bgs100>        [Jun 25 20:12:47] Like start by playing the word association game,
  34 <bgs100>        [Jun 25 20:12:58] and use "video", "board", or the name of a game.
  35 <bgs100>        [Jun 25 20:13:03] hilarity ensues
  36 <seidos>        [Jun 25 20:13:56] this game depends on people's honesty
  37 <seidos>        [Jun 25 20:14:01] all you have to do to win the game is lie
  38 <seidos>        [Jun 25 20:14:07] I won The Game
  39 <bikcmp>        [Jun 25 20:14:15] hehe
  40 <bikcmp>        [Jun 25 20:14:28] anyone wanna hop into the exciting world of python
  41 <bikcmp>        [Jun 25 20:14:28] lol.
  42 <seidos>        [Jun 25 20:14:31] but then stating you won the game is proof that you failed
  43 <seidos>        [Jun 25 20:14:54] unless you stuck to your guns, and said "I can type things without thinking them."
  44 <seidos>        [Jun 25 20:15:16] my spinal cord knows I won the game, and it typed the words "I won the game" without my knowledge
  45 <bgs100>        [Jun 25 20:15:46] pshaw
  46 <bgs100>        [Jun 25 20:15:50] Sleep winning?
  47 <seidos>        [Jun 25 20:15:55] yeah!
  48 <bgs100>        [Jun 25 20:16:03] seidos, Besides, it's impossible to win the game
  49 <seidos>        [Jun 25 20:16:09] it's just a matter of lying unabashedly
  50 <bgs100>        [Jun 25 20:16:09] You can only not be losing.
  51 <seidos>        [Jun 25 20:17:03] not true.  I already won the game.
  52 <seidos>        [Jun 25 20:17:11] you win by cheating
  53 <bgs100>        [Jun 25 20:17:16] no
  54 <bgs100>        [Jun 25 20:17:20] You cannot cheat
  55 <seidos>        [Jun 25 20:17:21] yes
  56 <seidos>        [Jun 25 20:17:28] yes, you lie
  57 <bgs100>        [Jun 25 20:17:33] You could hide that you lost, but you still lost.
  58 <seidos>        [Jun 25 20:17:37] if you lie to yourself enough, you might even believe it :D
  59 <bgs100>        [Jun 25 20:17:39] Even if other people don't know.
  60 <seidos>        [Jun 25 20:17:57] if you convince people you won the game, does it matter if you really won?
  61 <seidos>        [Jun 25 20:18:14] it's like argumentation
  62 <seidos>        [Jun 25 20:18:26] it doesn't matter who's right, or what's true, all that matters is who wins
  63 <seidos>        [Jun 25 20:19:06] I don't know, I don't think I could win the game, I'm not a big enough megalomaniac
  64 <bgs100>        [Jun 25 20:19:45] No one can win the game
  65 <bgs100>        [Jun 25 20:19:51] You can't win the game anyway
  66 <bgs100>        [Jun 25 20:20:08] If you lie, no one will believe you because You Cannot Win.
  67 <bgs100>        [Jun 25 20:20:16] You can only be not losing
  68 <bgs100>        [Jun 25 20:20:20] ANYWAY
  69 <bgs100>        [Jun 25 20:20:36] seidos, How have your adventures in C been going? :p
  70 <seidos>        [Jun 25 20:21:22] kind of bad really
  71 <bgs100>        [Jun 25 20:21:40] :{
  72 <bgs100>        [Jun 25 20:21:47] What problems have you had?
  73 <bgs100>        [Jun 25 20:21:49] brb again :P
  74 <seidos>        [Jun 25 20:21:52] actually, before that, I managed to crash firefox
  75 <seidos>        [Jun 25 20:22:03] I had too many !@#$&) tabs open I think
  76 <seidos>        [Jun 25 20:22:14] it crashed so bad, xorg wouldn't load it again
  77 <seidos>        [Jun 25 20:22:22] I had to close X in order to get it to run again
  78 <seidos>        [Jun 25 20:22:35] this disturbed me, because I wanted to be able to get firefox to work without restarting
  79 <seidos>        [Jun 25 20:22:41] I thought it would be a good learning experience
  80 <seidos>        [Jun 25 20:22:45] but I ran out of ideas
  81 <seidos>        [Jun 25 20:23:09] this is related because I'll have to find the link to the beginner's programming problems that I was working on
  82 <seidos>        [Jun 25 20:23:12] it was the second one
  83 <seidos>        [Jun 25 20:23:15] on "input control"
  84 <seidos>        [Jun 25 20:23:33] but implementing my ideas didn't work
  85 <bgs100>        [Jun 25 20:23:42] back
  86 <bgs100>        [Jun 25 20:23:56] seidos, okay,
  87 <seidos>        [Jun 25 20:24:41] here's what I'm currently working on http://paste.ubuntu.com/455237/
  88 <seidos>        [Jun 25 20:25:18] how are your adventures in C been going bgs100?
  89 <bgs100>        [Jun 25 20:25:45] Fine, been helping pedro a little.
  90 <bgs100>        [Jun 25 20:26:05] seidos, http://ubuntuforums.org/showthread.php?t=881152
  91 <seidos>        [Jun 25 20:26:29] yeah, that's it
  92 <bgs100>        [Jun 25 20:26:45] As you have no-doubt found out, the following is incorrect:
  93 <bgs100>        [Jun 25 20:26:50] if (name=="quit")
  94 <bgs100>        [Jun 25 20:26:50]         return 0;
  95 <seidos>        [Jun 25 20:27:32] yeah, but I couldn't think of how else to write it
  96 <bgs100>        [Jun 25 20:27:57] You are comparing two pointers, not the characters. You need to use the strcmp() function, in string.h. I have talked about it before; it returns 0 if 2 strings are equal. See the man page for details.
  97 <bgs100>        [Jun 25 20:28:14] more details*
  98 <seidos>        [Jun 25 20:28:44] I see.
  99 <seidos>        [Jun 25 20:28:52] what is the difference between &name and name?
 100 <seidos>        [Jun 25 20:29:15] in my misguided thinking I thought &name was the pointer and name was just a variable of type string
 101 <bgs100>        [Jun 25 20:29:33] &name is a pointer to name. name is a variable of type "string".
 102 <bgs100>        [Jun 25 20:29:39] But a string is a pointer to.
 103 <bgs100>        [Jun 25 20:29:41] too*
 104 <bgs100>        [Jun 25 20:30:02] You were not entirely misguided.
 105 <seidos>        [Jun 25 20:30:18] so why wouldn't if (name =="quit") work if name is a variable of type string?
 106 <seidos>        [Jun 25 20:30:20] oh
 107 <bgs100>        [Jun 25 20:30:25] A string is really just a character array (which is a character pointer).
 108 <seidos>        [Jun 25 20:30:26] a string is a pointer too
 109 <bgs100>        [Jun 25 20:30:29] mhm
 110 <seidos>        [Jun 25 20:30:30] hmm, that changes things
 111 <bgs100>        [Jun 25 20:30:38] seidos, Anyway, so use strcmp
 112 <seidos>        [Jun 25 20:30:47] all right, I'll try
 113 <seidos>        [Jun 25 20:31:02] you know, it would be cool if I could "think through" the problems
 114 <seidos>        [Jun 25 20:31:08] but how could I have found out about strcmp?
 115 <seidos>        [Jun 25 20:31:30] maybe if I searched for the compiler warning I would've stumbled on this information
 116 <seidos>        [Jun 25 20:31:51] I don't know, my progress is slow, but I'm learning to not get frustrated at that and just keep pushing forward
 117 <bgs100>        [Jun 25 20:32:40] seidos, Er, because I talked about it in a class and it was listed in on the page of standard library functions? :P
 118 <seidos>        [Jun 25 20:33:29] drat.  was it the class I missed?  I haven't been able to read the logs.  I lost the pastebin that pedro gave me of it.
 119 <seidos>        [Jun 25 20:33:43] standard library functions page, I should add the url to my cnotes.txt file
 120 <seidos>        [Jun 25 20:34:44] bgs100, how did you learn C?
 121 <bgs100>        [Jun 25 20:34:47] seidos, The logs are on the wiki page
 122 <seidos>        [Jun 25 20:34:50] did you read a book?
 123 <bgs100>        [Jun 25 20:34:55] seidos, Via the K&R and IRC
 124 <bgs100>        [Jun 25 20:35:08] K&R = "The C Programming Language" = Book
 125 <seidos>        [Jun 25 20:35:29] I should really read a book.  I wonder if there is a good book on google books
 126 <seidos>        [Jun 25 20:37:01] hey bgs100 can you help me choose a book from this list:  http://www.google.com/search?q=c+programming&btnG=Search+Books&tbs=bks%3A1&tbo=1
 127 <bgs100>        [Jun 25 20:37:25] I only know how good the books I've read are...
 128 <bgs100>        [Jun 25 20:37:33] Which is likeo ne book.
 129 <bgs100>        [Jun 25 20:37:36] like one*
 130 <seidos>        [Jun 25 20:38:03] all right, I'll ask in ##C and see what they think
 131 <bgs100>        [Jun 25 20:38:20] http://books.google.com/books?id=161QAAAAMAAJ&dq=the+c+programming+language&hl=en&ei=DkslTNrhK8aqlAeVpeTOAg&sa=X&oi=book_result&ct=result&resnum=1&ved=0CDEQ6AEwAA
 132 <seidos>        [Jun 25 20:40:33] hey bgs100 do you know regular expressions?
 133 <bgs100>        [Jun 25 20:40:51] mhm
 134 <bgs100>        [Jun 25 20:40:59] brb (again again xP)
 135 <seidos>        [Jun 25 20:41:54] it doesn't look like I can read this book on google books :(
 136 <bgs100>        [Jun 25 20:42:08] :[
 137 <seidos>        [Jun 25 20:42:45] I mean, technically
 138 <seidos>        [Jun 25 20:42:48] there is no place to click
 139 <seidos>        [Jun 25 20:43:54] the problem isn't lack of information, I'm sure there are plenty of free books available online, but organizing the information by its usefulness
 140 <seidos>        [Jun 25 20:46:30] bgs100, I read this:  http://www.utas.edu.au/infosys/info/documentation/C/CStdLib.html#string.h but I couldn't find how to compare two strings
 141 <seidos>        [Jun 25 20:47:07] hmmm, maybe strcmp
 142 <bgs100>        [Jun 25 20:47:13] ...yes.
 143 <seidos>        [Jun 25 20:47:29] oh, that's what you said
 144 *       seidos [Jun 25 20:47:42] goes back to the man page for strcmp()
 145 <seidos>        [Jun 25 21:03:27] all right, read the man page, and my attempt at implementing strcmp() has failed.
 146 <seidos>        [Jun 25 21:10:32] hmm, there doesn't appear to be a log of the class I missed.  the class I missed was after the 21st
 147 <bgs100>        [Jun 25 21:10:32] implementing?!
 148 <bgs100>        [Jun 25 21:10:38] Don't you mean using? :P
 149 <seidos>        [Jun 25 21:11:06] if it was using, wouldn't it be easier?
 150 <seidos>        [Jun 25 21:11:12] I don't know, what's the difference?
 151 <bgs100>        [Jun 25 21:11:38] ...
 152 <bgs100>        [Jun 25 21:11:44] implementing means creating strcmp
 153 <bgs100>        [Jun 25 21:11:54] using means, well, using it, calling it, etc
 154 <seidos>        [Jun 25 21:12:10] implementing doesn't mean creating
 155 <bgs100>        [Jun 25 21:12:32] ...
 156 <Snova> [Jun 25 21:12:32] uh, yes it does
 157 <bgs100>        [Jun 25 21:12:45] Thank you Snova :p
 158 <Snova> [Jun 25 21:12:55] bgs100: you're welcome! I'll be here to point out the obvious all day
 159 <bgs100>        [Jun 25 21:13:03] Hah
 160 <seidos>        [Jun 25 21:13:30] not according to this link http://en.wiktionary.org/wiki/implement
 161 <bgs100>        [Jun 25 21:14:00] "1.  To put into practical effect; carry out: implement the new procedures."
 162 <Snova> [Jun 25 21:14:13] well it's wrong then
 163 <bgs100>        [Jun 25 21:14:16] seidos, Implement != Implementing
 164 <bgs100>        [Jun 25 21:14:52] seidos, That very link says:
 165 <bgs100>        [Jun 25 21:14:54] to implement (third-person singular simple present implements, present participle implementing, simple past and past participle implemented)
 166 <bgs100>        [Jun 25 21:14:54]    1. to bring about; to put into practice
 167 <bgs100>        [Jun 25 21:14:54]           It’s a good thought, but it will be a difficult thing to implement.
 168 <bgs100>        [Jun 25 21:14:54]    2. to carry out; to do
 169 <bgs100>        [Jun 25 21:15:11] thar you go.
 170 <seidos>        [Jun 25 21:15:23] so I can't say I'm putting "strcmp()" into practice?
 171 <bgs100>        [Jun 25 21:15:43] seidos, You are not bringing about strcmp.
 172 <Snova> [Jun 25 21:16:04] you are not writing strcmp(); you are using it somewhere
 173 <seidos>        [Jun 25 21:16:40] hmmm
 174 <seidos>        [Jun 25 21:17:11] so one cannot implement an implement
 175 <seidos>        [Jun 25 21:17:27] unless they are creating the implement
 176 <seidos>        [Jun 25 21:18:01] I was using the word as in "putting to practice".  Am I not attempting to put strcmp() into practice?
 177 <Snova> [Jun 25 21:18:29] yes you are
 178 <seidos>        [Jun 25 21:18:35] but, I won't use it that way if I'm going to get flak from hackers
 179 <Snova> [Jun 25 21:18:38] to say you are implementing strcmp(), however, is wrong
 180 <seidos>        [Jun 25 21:19:33] from where should I get my definitions?
 181 <seidos>        [Jun 25 21:19:46] is there a hacker dictionary I can reference?
 182 <seidos>        [Jun 25 21:19:56] I have to make the bed
 183 <Snova> [Jun 25 21:20:24] not one that's really relevant; and honestly that use of the word "implement" is an odd one. i can't think of the last time I've heard it used
 184 <Snova> [Jun 25 21:20:44] what are you going to do? implement this crowbar upon my front deck?
 185 <bgs100>        [Jun 25 21:22:48] heh
 186 <seidos>        [Jun 25 21:27:03] can you use implemented in a sentence?
 187 <seidos>        [Jun 25 21:27:07] hmmm, that does sound weird
 188 <seidos>        [Jun 25 21:27:17] implement a hammer on a piece of wood
 189 <seidos>        [Jun 25 21:27:32] go implement that hammer on that nail
 190 <seidos>        [Jun 25 21:27:41] doesn't sound right
 191 <seidos>        [Jun 25 21:32:08] I still don't get the use of the word.  "I implemented these drawings to solve the problem of building this house."
 192 <seidos>        [Jun 25 21:32:11] maybe that works
 193 <bgs100>        [Jun 25 21:37:41] "I implemented a new feature in FooBarBaz"
 194 <pedro3005>     [Jun 25 21:45:23] so bgs100 :p
 195 <bgs100>        [Jun 25 21:45:32] ...
 196 *       bgs100 [Jun 25 21:45:50] gives pedro3005 a tardy slip and tells him to take it to the front office
 197 <seidos>        [Jun 25 21:46:13] man, it sounds all right superficially, it just seems "built in" would be a better way to express it.
 198 <pedro3005>     [Jun 25 21:46:49] bgs100, what did I miss?
 199 <seidos>        [Jun 25 21:47:03] I don't know how to use the word "implement"
 200 <bgs100>        [Jun 25 21:47:21] pedro3005, Oh, not much. A small review of strcmp and a discussion of the definition of "implementing"
 201 <pedro3005>     [Jun 25 21:47:59] bgs100, This class tends to diverge a bit :p
 202 <bgs100>        [Jun 25 21:48:31] eh, not so much this time
 203 <seidos>        [Jun 25 21:49:26] I hate natural languages
 204 <seidos>        [Jun 25 21:59:06] can you use the word implementing outside the context of coding?
 205 <pedro3005>     [Jun 25 21:59:37] sure
 206 <pedro3005>     [Jun 25 21:59:49] "implemented monarchy"
 207 <seidos>        [Jun 25 22:00:09] hmmm, "implemented monarchy"
 208 <seidos>        [Jun 25 22:00:54] that isn't a complete sentence
 209 <pedro3005>     [Jun 25 22:03:14] yeah, in Rome. first Mario, representing the plebe, with projects toward agrarian reform, went against Silas, representing the patrician interests. Silas won. Then Julius Caesar, Mario's nephew, fought against Pompeu, who the senate had given extensive power. Caesar won and ruled for 10 years, but when he tried to instate a permanent dictatorship, he was killed. To govern, was formed then a triumvirate of Otavius, and some two other dudes I do
 210 <pedro3005>     [Jun 25 22:03:14] n't remember. Otavius ended up taking full power and implemented monarchy in the rome republic
 211 <pedro3005>     [Jun 25 22:04:08] history tests suck
 212 <seidos>        [Jun 25 22:08:09] i think implementing monarchy is more abstract to me than implementing a feature
 213 <seidos>        [Jun 25 22:08:14] ug
 214 <pedro3005>     [Jun 25 22:13:13] seidos, well is it that much important?
 215 <seidos>        [Jun 25 22:14:24] yes!  because my fundamental understanding of the language with which I communicate is in question!
 216 <seidos>        [Jun 25 22:15:42] well, at least cat still means cat.
 217 *       seidos [Jun 25 22:15:43] moves on
 218 <seidos>        [Jun 25 22:16:13] ah ha!
 219 <seidos>        [Jun 25 22:16:19] he didn't create monarchy!
 220 <seidos>        [Jun 25 22:16:38] monarchy already existed...hmmm but not in the rome republic
 221 <pedro3005>     [Jun 25 22:16:42] yes
 222 <pedro3005>     [Jun 25 22:16:50] this is the same in code
 223 <pedro3005>     [Jun 25 22:16:56] "implement a database system"
 224 <pedro3005>     [Jun 25 22:17:00] you didn't create databases
 225 <pedro3005>     [Jun 25 22:17:09] you just used it in your code
 226 <seidos>        [Jun 25 22:17:49] but he took something, an idea, a concept, that already existed, then implemented it into a place where there was no monarchy
 227 <seidos>        [Jun 25 22:18:00] well, did I attempt to implement strcmp()?
 228 <seidos>        [Jun 25 22:18:04] or did I just use it?
 229 <seidos>        [Jun 25 22:18:29] I think Snova and bgs100 (ping) would disagree with you pedro3005
 230 <bgs100>        [Jun 25 22:18:52] hm?
 231 <seidos>        [Jun 25 22:18:55] pedro3005, have you ever implemented anything in code you have written?
 232 <pedro3005>     [Jun 25 22:19:04] of course
 233 <bgs100>        [Jun 25 22:19:14] ugh
 234 <bgs100>        [Jun 25 22:19:32] "implement a database system" You didn't create databases, you made a database system.
 235 <seidos>        [Jun 25 22:19:59] hmmm, that's true, creating a database system
 236 <pedro3005>     [Jun 25 22:20:36] bgs100, well, Otavius also made Rome's second monarchy system, but he didn't invent the concept of monarchy
 237 <pedro3005>     [Jun 25 22:20:41] I think it's the same meaning
 238 <seidos>        [Jun 25 22:20:48] actually, if you are "implementing SQL" you're not really creating the database system
 239 <seidos>        [Jun 25 22:20:54] you are using a system that already exists
 240 <bgs100>        [Jun 25 22:20:59] ARGH
 241 <bgs100>        [Jun 25 22:21:05] seidos, Then you aren't implementing it.
 242 <seidos>        [Jun 25 22:21:05] and conforming it to your particular needs
 243 <pedro3005>     [Jun 25 22:21:14] let's turn to the dictionary
 244 <seidos>        [Jun 25 22:21:17] but is that creating a database system?  I mean, you aren't creating SQL
 245 <bgs100>        [Jun 25 22:21:24] pedro3005, We already did, thank you.
 246 <seidos>        [Jun 25 22:21:28] pedro3005, there isn't a good enough dictionary
 247 <pedro3005>     [Jun 25 22:21:30] bgs100, what did it say?
 248 <bgs100>        [Jun 25 22:21:32] seidos, You wouldn't say that!
 249 <bgs100>        [Jun 25 22:21:38] pedro3005, There were ones for both
 250 <bgs100>        [Jun 25 22:21:53] seidos, Implement is a tool. Implementing is not using a tool.
 251 <pedro3005>     [Jun 25 22:21:55] I vote for merriam webster
 252 <seidos>        [Jun 25 22:21:58] well, don't worry, I'm not gonna' use the word until I know for certain what it means
 253 <pedro3005>     [Jun 25 22:22:23] Main Entry: 2im·ple·ment
 254 <pedro3005>     [Jun 25 22:22:23] Pronunciation: \-ˌment\
 255 <pedro3005>     [Jun 25 22:22:23] Function: transitive verb
 256 <pedro3005>     [Jun 25 22:22:23] Date: 1806
 257 <pedro3005>     [Jun 25 22:22:23] 1 : carry out, accomplish; especially : to give practical effect to and ensure of actual fulfillment by concrete measures
 258 <pedro3005>     [Jun 25 22:22:24] 2 : to provide instruments or means of expression for
 259 <pedro3005>     [Jun 25 22:22:26] — im·ple·men·ta·tion \ˌim-plə-mən-ˈtā-shən, -ˌmen-\ noun
 260 <pedro3005>     [Jun 25 22:22:28] — im·ple·men·ter or im·ple·men·tor \ˈim-plə-ˌmən-tər\ noun
 261 <bgs100>        [Jun 25 22:22:29] 2 : to provide instruments or means of expression for
 262 <bgs100>        [Jun 25 22:22:31] mhm
 263 <bgs100>        [Jun 25 22:22:37] close enough
 264 <seidos>        [Jun 25 22:22:50] but that's the 2nd definition, not the 1st
 265 <bgs100>        [Jun 25 22:22:51] wiktionary and one other had more clear definitions, but whatever
 266 <bgs100>        [Jun 25 22:22:56] seidos, And?
 267 <seidos>        [Jun 25 22:22:59] 1st is the most common definition
 268 <bgs100>        [Jun 25 22:23:02] Besides
 269 <bgs100>        [Jun 25 22:23:07] That still doesn't make sense
 270 <pedro3005>     [Jun 25 22:23:21] bgs100, well, you gotta realize that it is used in various contexts, not coding
 271 <bgs100>        [Jun 25 22:23:21] seidos, To carry out is not the same as to use
 272 <bgs100>        [Jun 25 22:23:50] By such a definition when you said "implementing strcmp" you meant "carrying out strcmp".
 273 <bgs100>        [Jun 25 22:23:59] pedro3005, Well, this is a class about coding.
 274 <bgs100>        [Jun 25 22:24:24] When people say they "Implemented a feature", they do not mean they used a feature.
 275 <seidos>        [Jun 25 22:24:25] hmmm
 276 <seidos>        [Jun 25 22:24:36] "carrying out a DBMS" doesn't make sense either
 277 <bgs100>        [Jun 25 22:24:36] They mean they created a feature.
 278 <bgs100>        [Jun 25 22:24:43] seidos, Indeed.
 279 <pedro3005>     [Jun 25 22:24:44] yeah, seidos, maybe you were wrong in saying "implementing strcmp"
 280 <seidos>        [Jun 25 22:24:46] carry out a feature doesn't make sense either
 281 <bgs100>        [Jun 25 22:24:49] Yes
 282 <bgs100>        [Jun 25 22:24:51] Thank you.
 283 <bgs100>        [Jun 25 22:24:53] MOVING ON
 284 <pedro3005>     [Jun 25 22:25:02] gotta love semantics
 285 <seidos>        [Jun 25 22:25:14] pedro3005, what kind of things have you implemented in your code?
 286 <seidos>        [Jun 25 22:25:24] is it possible to implement anything in your code?
 287 <seidos>        [Jun 25 22:25:41] or is it only possible to implement something *using* code?
 288 *       seidos [Jun 25 22:26:00] shrugs
 289 <pedro3005>     [Jun 25 22:26:01] you could perhaps implement a visual front end
 290 <seidos>        [Jun 25 22:26:01] cat still means cat, and water is still wet
 291 <seidos>        [Jun 25 22:26:25] pedro3005, so you don't think you've implemented anything before?
 292 <seidos>        [Jun 25 22:26:41] am I attempting to implement a userinput program?
 293 <bgs100>        [Jun 25 22:26:46] seidos, Yes you implement things in your code. "I implemented a feature in my program"
 294 <bgs100>        [Jun 25 22:27:01] Yeah, sure.
 295 *       bgs100 [Jun 25 22:27:18] gives pedro3005 and seidos Annoying Semantics badges
 296 *       seidos [Jun 25 22:27:45] gives back his badge
 297 <seidos>        [Jun 25 22:27:49] I still don't really get it
 298 <pedro3005>     [Jun 25 22:27:51] bgs100, well, I think he's attempting to implement user input in his program
 299 <seidos>        [Jun 25 22:28:40] my problem is there is a sense of "use" in the word, and I don't know how long it's going to take for that to come out
 300 <bgs100>        [Jun 25 22:29:21] Look
 301 <bgs100>        [Jun 25 22:29:30] I implemented <concept/thing>
 302 <seidos>        [Jun 25 22:29:45] I implemented calculus
 303 <bgs100>        [Jun 25 22:30:00] ...
 304 <bgs100>        [Jun 25 22:30:09] *sigh*
 305 <seidos>        [Jun 25 22:30:13] I implemented calculus to prove E=mc^2
 306 <seidos>        [Jun 25 22:30:19] doesn't work for you, right?
 307 <bgs100>        [Jun 25 22:30:24] Er
 308 <bgs100>        [Jun 25 22:30:30] I don't know much about calculus :P
 309 <seidos>        [Jun 25 22:30:38] me neither!
 310 <bgs100>        [Jun 25 22:30:42] look
 311 <bgs100>        [Jun 25 22:30:47] just treat it like:
 312 <bgs100>        [Jun 25 22:31:08] I implement <feature/function/class/type/struct>
 313 <bgs100>        [Jun 25 22:31:14] implemented*
 314 <seidos>        [Jun 25 22:32:18] I'm hesitant to do this, because my teachers are saying doing so is an improper use of the term
 315 *       seidos [Jun 25 22:32:30] doesn't want to appear stupid if he can avoid it
 316 <pedro3005>     [Jun 25 22:32:54] can we move on? :P
 317 <seidos>        [Jun 25 22:33:16] yeah, let me get back to trying to get strcmp() to work in my program
 318 <pedro3005>     [Jun 25 22:33:46] seidos, what are you making?
 319 <seidos>        [Jun 25 22:35:01] pedro3005, nothing interesting.  just trying to solve the 2nd beginners programming problem:  http://ubuntuforums.org/showthread.php?t=881152
 320 <pedro3005>     [Jun 25 22:35:22] seidos, oh, that one is a bitch. hope you get it going
 321 <seidos>        [Jun 25 22:35:32] I think I just had an epiphany of sorts
 322 <seidos>        [Jun 25 22:35:40] which I think is what you guys have been saying
 323 <seidos>        [Jun 25 22:35:47] there is not string type
 324 <seidos>        [Jun 25 22:35:51] there are only char arrays
 325 <seidos>        [Jun 25 22:35:57] s/not/no
 326 <pedro3005>     [Jun 25 22:36:04] yes
 327 <Snova> [Jun 25 22:36:15] someone pinged me
 328 <pedro3005>     [Jun 25 22:36:30] up for semantics discussion?
 329 <Snova> [Jun 25 22:36:33] yay
 330 <pedro3005>     [Jun 25 22:36:43] "implement"
 331 <Snova> [Jun 25 22:37:07] I'm the one who started it
 332 <bgs100>        [Jun 25 22:57:38] wheeee
 333 <pedro3005>     [Jun 26 00:19:41] bgs100, fscanf will read until it finds a space?
 334 <bgs100>        [Jun 26 00:19:53] If you read a string
 335 <pedro3005>     [Jun 26 00:20:03] okay
 336 <bgs100>        [Jun 26 00:20:08] Just scanf for files
 337 <bgs100>        [Jun 26 00:20:11] well
 338 <bgs100>        [Jun 26 00:20:14] other files
 339 <pedro3005>     [Jun 26 00:20:18] that's actually useful
 340 <pedro3005>     [Jun 26 00:31:44] bgs100, what's wrong with:
 341 <pedro3005>     [Jun 26 00:31:56] char *readline[21];
 342 <pedro3005>     [Jun 26 00:31:57]       fscanf(input, "%s",readline);
 343 <bgs100>        [Jun 26 00:32:08] I dunno
 344 <bgs100>        [Jun 26 00:32:14] that *ALONE* looks fine
 345 <bgs100>        [Jun 26 00:32:31] depends on the contexts
 346 <pedro3005>     [Jun 26 00:32:55] I'll paste the whole deal
 347 <pedro3005>     [Jun 26 00:33:06] bgs100, http://paste.pocoo.org/show/230106/
 348 <bgs100>        [Jun 26 00:33:34] ...
 349 <bgs100>        [Jun 26 00:33:44] where is your fclose() ?
 350 <bgs100>        [Jun 26 00:34:09] (side issue)
 351 <bgs100>        [Jun 26 00:34:11] anyway
 352 <pedro3005>     [Jun 26 00:34:14] bgs100, now it works
 353 <pedro3005>     [Jun 26 00:34:22] but the compilation throws some warmings
 354 <bgs100>        [Jun 26 00:34:23] er
 355 <pedro3005>     [Jun 26 00:34:24] warnings
 356 <bgs100>        [Jun 26 00:34:27] What warnings.
 357 <pedro3005>     [Jun 26 00:34:31] 3.c:8: warning: format ‘%s’ expects type ‘char *’, but argument 3 has type ‘char **’
 358 <bgs100>        [Jun 26 00:34:36] UH
 359 <pedro3005>     [Jun 26 00:34:36] 3.c:9: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘char **’
 360 <bgs100>        [Jun 26 00:34:52] pedro3005, You need to pass fscanf the pointer to your array
 361 <bgs100>        [Jun 26 00:34:57] not the array.
 362 <pedro3005>     [Jun 26 00:35:17] bgs100, and printf too?
 363 <bgs100>        [Jun 26 00:35:21] ERR
 364 <bgs100>        [Jun 26 00:35:31] Pedro...
 365 <bgs100>        [Jun 26 00:35:51] Why are declaring a pointer pointer?
 366 <bgs100>        [Jun 26 00:35:53]       char *readline[21];
 367 <bgs100>        [Jun 26 00:35:58] There is a * and a [21]
 368 <pedro3005>     [Jun 26 00:36:08] because I fail
 369 <pedro3005>     [Jun 26 00:36:11] :)
 370 <bgs100>        [Jun 26 00:36:13] Ah
 371 <pedro3005>     [Jun 26 00:36:32] ok I'll keep working on it
 372 <pedro3005>     [Jun 26 00:36:33] thanks
 373 <bgs100>        [Jun 26 00:36:40] np lol
 374 <pedro3005>     [Jun 26 00:37:26] bgs100, the thing is, how do I know when the file is over? I mean, yes, I'll reach EOF, but must I iterate through the readline array and look for it?
 375 <bgs100>        [Jun 26 00:37:57] Err
 376 <bgs100>        [Jun 26 00:38:07] Hopefully you won't have an EOF in a char array
 377 <pedro3005>     [Jun 26 00:38:33] well, then?
 378 <bgs100>        [Jun 26 00:38:52] one sec
 379 <bgs100>        [Jun 26 00:39:02] scanf probably returns a particular value
 380 <bgs100>        [Jun 26 00:39:39] pedro3005, It will return EOF :P
 381 <bgs100>        [Jun 26 00:39:40] brb
 382 <bgs100>        [Jun 26 00:41:44]        These functions return the number of input items successfully matched and assigned, which can be fewer  than  pro‐
 383 <bgs100>        [Jun 26 00:41:45]        vided for, or even zero in the event of an early matching failure.
 384 <bgs100>        [Jun 26 00:41:45]        The value EOF is returned if the end of input is reached before either the first successful conversion or a match‐
 385 <bgs100>        [Jun 26 00:41:45]        ing failure occurs.  EOF is also returned if a read error occurs, in which case the error indicator for the stream
 386 <bgs100>        [Jun 26 00:41:46]        (see ferror(3)) is set, and errno is set indicate the error.
 387 <bgs100>        [Jun 26 00:42:00] pedro3005, Man pages are helpful...
 388 <bgs100>        [Jun 26 00:42:06] :p
 389 <pedro3005>     [Jun 26 00:42:28] <- is lazy
 390 <pedro3005>     [Jun 26 00:42:29] :p
 391 <bgs100>        [Jun 26 00:42:41] *sigh*
 392 <bgs100>        [Jun 26 00:42:52] :P
 393 <bgs100>        [Jun 26 00:43:23] pedro3005, Be glad I don't yell "RTFM" at you :p
 394 <pedro3005>     [Jun 26 00:46:52] bgs100, ok, I did challenge three :D
 395 <bgs100>        [Jun 26 00:46:59] Yaaay
 396 <bgs100>        [Jun 26 00:47:03] Paste?
 397 <pedro3005>     [Jun 26 00:47:31] bgs100, http://paste.pocoo.org/show/230107/
 398 <bgs100>        [Jun 26 00:48:13] Err
 399 <bgs100>        [Jun 26 00:48:26] Weren't the numbers first, not the actual name?
 400 <pedro3005>     [Jun 26 00:48:26] aw shush
 401 <pedro3005>     [Jun 26 00:48:29] it works
 402 <bgs100>        [Jun 26 00:48:32] Err
 403 <bgs100>        [Jun 26 00:48:40] Not for the actual challenge 3 text file.
 404 *       bgs100 [Jun 26 00:48:51] suggests you fix that :P
 405 <pedro3005>     [Jun 26 00:48:55] yes, it does?
 406 <pedro3005>     [Jun 26 00:48:58] I tested it
 407 <bgs100>        [Jun 26 00:48:59] ...
 408 <pedro3005>     [Jun 26 00:49:07] with the file provided in the thread
 409 <bgs100>        [Jun 26 00:49:14] ...
 410 <bgs100>        [Jun 26 00:49:40] hm
 411 <bgs100>        [Jun 26 00:49:46] I shall test it too...
 412 <bgs100>        [Jun 26 00:51:10] $ ./pedroc
 413 <bgs100>        [Jun 26 00:51:10] Segmentation fault
 414 <pedro3005>     [Jun 26 00:51:25] bgs100, well you fail
 415 <pedro3005>     [Jun 26 00:51:30] because it works here
 416 <bgs100>        [Jun 26 00:51:33] No...
 417 <pedro3005>     [Jun 26 00:51:42] hardware fault; contact your technicians
 418 <bgs100>        [Jun 26 00:51:49] Lol
 419 <bgs100>        [Jun 26 00:51:51] But no.
 420 <pedro3005>     [Jun 26 00:51:59] that's what real programmers would say
 421 <pedro3005>     [Jun 26 00:52:01] :p
 422 <bgs100>        [Jun 26 00:52:12] Oh.
 423 <bgs100>        [Jun 26 00:52:14] Hmm
 424 <bgs100>        [Jun 26 00:52:23] It appears I incorrectly named the file...
 425 <pedro3005>     [Jun 26 00:52:28] bgs100, FAIL
 426 <pedro3005>     [Jun 26 00:52:37] and you dare blame my code!
 427 <bgs100>        [Jun 26 00:52:40] pedro3005, Not as big as char *readline[21]! :P
 428 <bgs100>        [Jun 26 00:52:44] pedro3005, I didn't.
 429 <bgs100>        [Jun 26 00:52:56] pedro3005, I just pasted the output and said it wasn't my hardware
 430 <pedro3005>     [Jun 26 00:53:03] bgs100, got anything against 21? it's the blackjack number!
 431 <pedro3005>     [Jun 26 00:53:07] oh
 432 <bgs100>        [Jun 26 00:53:12] Fail.
 433 <pedro3005>     [Jun 26 00:54:25] right
 434 <bgs100>        [Jun 26 00:54:37] Well
 435 <bgs100>        [Jun 26 00:54:46] You forgot the newline at the end of enlgish
 436 <bgs100>        [Jun 26 00:54:49] english*
 437 <bgs100>        [Jun 26 00:54:50] :P
 438 <bgs100>        [Jun 26 00:55:02] hmm
 439 <pedro3005>     [Jun 26 00:55:11] it wasn't in the requirements
 440 <pedro3005>     [Jun 26 00:55:12] :P
 441 <bgs100>        [Jun 26 00:55:18] orly
 442 <bgs100>        [Jun 26 00:55:32] hm
 443 <bgs100>        [Jun 26 00:55:36] pedro3005, Well do it anyway :P
 444 <pedro3005>     [Jun 26 00:56:03] bgs100, aw shush
 445 <pedro3005>     [Jun 26 00:56:12] bgs100, uh oh... problem 4 is about networking
 446 <bgs100>        [Jun 26 00:56:12] well
 447 <bgs100>        [Jun 26 00:56:34] Still odd that %s seems to skip the "<number>."
 448 <bgs100>        [Jun 26 00:56:36] But
 449 <bgs100>        [Jun 26 00:56:40] It works, so;
 450 *       bgs100 [Jun 26 00:56:55] gives pedro3005 the 1st, 2nd, and 3rd challenge badges
 451 <pedro3005>     [Jun 26 00:57:25] bgs100, it doesn't skip it
 452 <pedro3005>     [Jun 26 00:57:25] but the number doesn't start with 'h' or 's'
 453 <pedro3005>     [Jun 26 00:57:25] silly
 454 <pedro3005>     [Jun 26 00:57:27] it was all my genius idea
 455 <pedro3005>     [Jun 26 00:57:31] :p
 456 <bgs100>        [Jun 26 00:57:36] Uh
 457 <bgs100>        [Jun 26 00:57:45] That fscanf is skipping it.
 458 <pedro3005>     [Jun 26 00:57:53] it's not
 459 <bgs100>        [Jun 26 00:57:55] OH
 460 <bgs100>        [Jun 26 00:57:57] Wow
 461 <bgs100>        [Jun 26 00:57:59] hm
 462 <bgs100>        [Jun 26 00:58:02] Nicely done
 463 <pedro3005>     [Jun 26 00:58:05] but it's brought down in this line
 464 <pedro3005>     [Jun 26 00:58:05] if (tolower(readline[0]) == 'h' || tolower(readline[0]) == 's') {
 465 *       bgs100 [Jun 26 00:58:16] gives pedro a Confused The teacher badge
 466 *       pedro3005 [Jun 26 00:58:23] feels proud
 467 <bgs100>        [Jun 26 00:58:33] pedro3005, very good work. Now add that newline :P
 468 <pedro3005>     [Jun 26 00:59:01] bgs100, in the thread, it says
 469 <pedro3005>     [Jun 26 00:59:03] Then have this program write "23. English"
 470 <pedro3005>     [Jun 26 00:59:10] and NOT "23. English\n"
 471 <pedro3005>     [Jun 26 00:59:12] I rest my case
 472 <bgs100>        [Jun 26 00:59:16] *sigh*
 473 <bgs100>        [Jun 26 00:59:23] pedro3005, Add the stupid newline.
 474 <bgs100>        [Jun 26 00:59:35] It says to continue the list.
 475 <bgs100>        [Jun 26 00:59:44] Each item has a newline at the end
 476 <pedro3005>     [Jun 26 01:00:08] oh ok
 477 <bgs100>        [Jun 26 01:00:12] :P
 478 <pedro3005>     [Jun 26 01:00:20] this file will probably get deleted in the next 24 hours anyway
 479 <pedro3005>     [Jun 26 01:00:43] bgs100, anyway, how do I read from a webpage in C?
 480 <bgs100>        [Jun 26 01:00:55] ...
 481 *       bgs100 [Jun 26 01:00:58] runs away
 482 

learners/25062010 (last edited 2010-06-26 05:19:00 by 117)