1 <pedro3005> [Jun 21 16:53:38] juju2143, so hey, you ok if we schedule classes to start at #ubuntu-classroom this wednesday?
2 <juju2143> [Jun 21 16:53:54] yep
3 <pedro3005> [Jun 21 16:54:00] I'll talk to them
4 <pedro3005> [Jun 21 16:54:05] how many weeks do you think you'll need?
5 <pedro3005> [Jun 21 17:02:27] juju2143, ^
6 <juju2143> [Jun 21 17:09:21] idk
7 <pedro3005> [Jun 21 18:09:45] juju2143, sorry for all the annoying :P can you give a quick description of the class? like what you plan on covering? they'll be set up btw, it's all good
8 <juju2143> [Jun 21 18:23:48] hm
9 <pedro3005> [Jun 21 18:44:37] hey bgs100
10 <pedro3005> [Jun 21 18:44:48] shiiiiiiiit I didn't do my homework
11 <bgs100> [Jun 21 18:44:52] *sigh*
12 <bgs100> [Jun 21 18:44:58] You have 20 minutes :P
13 <pedro3005> [Jun 21 18:46:16] yeah brb
14 <pedro3005> [Jun 21 18:51:32] ok
15 <pedro3005> [Jun 21 18:51:34] 10 minutes
16 <pedro3005> [Jun 21 19:07:11] bgs100, I need help with it :/
17 <bgs100> [Jun 21 19:07:43] one sec
18 <seidos> [Jun 21 19:11:43] I almost typed ./configure to compile my attempt at hw
19 <pedro3005> [Jun 21 19:23:41] bgs100, you lie!
20 <bgs100> [Jun 21 19:23:48] No
21 <pedro3005> [Jun 21 19:23:59] you told me there was no way to check the length of an unknown array
22 <bgs100> [Jun 21 19:24:08] uhhhhh
23 <bgs100> [Jun 21 19:24:25] Not unless you have some value marking the end
24 <bgs100> [Jun 21 19:24:39] pedro3005, What "way" are you talking about?
25 <pedro3005> [Jun 21 19:24:50] I stole this trick from google
26 <pedro3005> [Jun 21 19:24:53] #define arrayLen(x) (sizeof (x) / sizeof *(x))
27 <bgs100> [Jun 21 19:24:59] ....
28 <bgs100> [Jun 21 19:25:09] ...
29 <bgs100> [Jun 21 19:25:19] That uses sizeof on the array
30 <bgs100> [Jun 21 19:25:25] That != good
31 <pedro3005> [Jun 21 19:25:26] I see that
32 <pedro3005> [Jun 21 19:25:35] why?
33 <bgs100> [Jun 21 19:25:44] pedro3005, It may seem to work, but it is not guaranteed and will not work in all cases
34 <bgs100> [Jun 21 19:26:07] The only reason it would work would be because gcc is a smart compiler.
35 <bgs100> [Jun 21 19:26:14] Snova, Ping
36 <bgs100> [Jun 21 19:26:26] Anyway
37 <bgs100> [Jun 21 19:26:32] pedro3005, Okay?
38 <pedro3005> [Jun 21 19:26:41] I guess.. :/
39 <bgs100> [Jun 21 19:26:44] ...
40 <bgs100> [Jun 21 19:26:57] pedro3005, seidos Ready for the class to begin?
41 <seidos> [Jun 21 19:27:21] I'm having a problem with the hw
42 <bgs100> [Jun 21 19:27:30] Well
43 <bgs100> [Jun 21 19:27:37] Let's start class and then do homework :p
44 <seidos> [Jun 21 19:27:44] I guess I can work on it during class :D
45 <bgs100> [Jun 21 19:27:57] ================== C CLASS OFFICIAL BEGINNINGNESS =====================
46 <seidos> [Jun 21 19:28:03] I think I'm close
47 * bgs100 [Jun 21 19:28:03] frowns at seidos
48 <bgs100> [Jun 21 19:28:06] Okay
49 <bgs100> [Jun 21 19:28:13] pedro3005, seidos Pastebins from both of you?
50 <pedro3005> [Jun 21 19:28:29] of?
51 <bgs100> [Jun 21 19:28:34] Homework
52 <pedro3005> [Jun 21 19:28:40] it's not working
53 * pedro3005 [Jun 21 19:28:42] cries
54 * bgs100 [Jun 21 19:28:58] throws a kleenex made of aluminum foil at pedro3005
55 <seidos> [Jun 21 19:29:07] mine is close, it's just off by a factor of 2
56 <bgs100> [Jun 21 19:29:09] Pastebin anyway :P
57 <seidos> [Jun 21 19:29:13] I think the problem is in the sum
58 <pedro3005> [Jun 21 19:29:24] I'll just send you what I have
59 <pedro3005> [Jun 21 19:29:35] bgs100, http://paste.pocoo.org/show/228239/
60 <Snova> [Jun 21 19:30:03] bgs100: pong
61 <seidos> [Jun 21 19:30:12] bgs100, http://paste.ubuntu.com/453127/
62 <bgs100> [Jun 21 19:30:31] Snova, Explain to pedro why his solution to getting the size of an array is bad please :P
63 <Snova> [Jun 21 19:30:54] where?
64 <pedro3005> [Jun 21 19:31:01] #define arrayLen(x) (sizeof (x) / sizeof *(x))
65 <bgs100> [Jun 21 19:31:04] Look up just a bit
66 <Snova> [Jun 21 19:31:41] well, it'll work, but only in cases you yourself already know
67 <bgs100> [Jun 21 19:32:23] pedro3005,
68 <bgs100> [Jun 21 19:32:33] Here's why your homework is broken
69 <bgs100> [Jun 21 19:32:43] puts("Enter integers:");
70 <bgs100> [Jun 21 19:32:43] for (count = 0; ((input = getchar()) != EOF); count++)
71 <bgs100> [Jun 21 19:32:43] array[count] = input;
72 <bgs100> [Jun 21 19:33:06] You're assigning each part of "array" to the actual character
73 <Snova> [Jun 21 19:33:26] '2' == 50
74 <pedro3005> [Jun 21 19:33:58] bgs100, damn it...
75 <bgs100> [Jun 21 19:34:00] And newlines
76 <pedro3005> [Jun 21 19:34:15] array[count] = *input ?
77 <bgs100> [Jun 21 19:34:27] ...
78 <bgs100> [Jun 21 19:34:37] input is not a pointer.
79 <pedro3005> [Jun 21 19:34:40] well idk, what grabs the value?
80 <pedro3005> [Jun 21 19:34:43] #
81 <pedro3005> [Jun 21 19:34:48] %
82 <pedro3005> [Jun 21 19:34:49] something
83 <bgs100> [Jun 21 19:34:50] pedro3005, You *have* a value
84 <bgs100> [Jun 21 19:35:00] That value is a literal character
85 <pedro3005> [Jun 21 19:35:11] and we need to make it an int?
86 <bgs100> [Jun 21 19:35:19] errr
87 <bgs100> [Jun 21 19:35:28] It is an int
88 <Snova> [Jun 21 19:35:42] everything is an int, it just doesn't mean what you think it does
89 <bgs100> [Jun 21 19:35:50] pedro3005, Remember when you asked me how to get a number from a character representing a number?
90 <pedro3005> [Jun 21 19:35:55] yeah, it's the character code
91 <pedro3005> [Jun 21 19:36:19] I see
92 <pedro3005> [Jun 21 19:36:37] what's the fix? :p
93 <Snova> [Jun 21 19:37:13] there's probably a character-to-integer function somewhere, but the quick way (not necessarily the correct way) would be input-'0'
94 <bgs100> [Jun 21 19:37:31] I would recommend checking if the character represents a number with isdigit(0 from ctype.h and then if so what Snova said
95 <bgs100> [Jun 21 19:37:35] isdigit()*
96 <pedro3005> [Jun 21 19:37:47] of course it's a number
97 <pedro3005> [Jun 21 19:37:56] we're asking for numbers >:(
98 <bgs100> [Jun 21 19:38:03] ...
99 <Snova> [Jun 21 19:38:04] users suck
100 <bgs100> [Jun 21 19:38:04] Uh
101 <Snova> [Jun 21 19:38:11] I just typed "haha" into your program; now what?
102 <bgs100> [Jun 21 19:38:16] Actually
103 <seidos> [Jun 21 19:38:17] hey! I'm a user!
104 <Snova> [Jun 21 19:38:34] seidos: yes, and validating your input to make sure you aren't up to something is the bane of all programming
105 <bgs100> [Jun 21 19:38:46] There's still newlines, if you're going to separate the numbers.
106 <bgs100> [Jun 21 19:39:00] Actually, I would just reommend scanf'ing the numbers into your array :p
107 <bgs100> [Jun 21 19:39:04] recommend*
108 <seidos> [Jun 21 19:39:09] Snova, the haha module will come out in version .02
109 <pedro3005> [Jun 21 19:39:14] my program lets you do whatever you want... if what you wish is to break it, then go ahead.. it's not a bug, it's a feature
110 <bgs100> [Jun 21 19:39:19] lol
111 <bgs100> [Jun 21 19:39:46] pedro3005, BTW, "// Sums an array of ints;" is not actually standard C, although most compilers allow it
112 <pedro3005> [Jun 21 19:40:02] bgs100, why?
113 <Snova> [Jun 21 19:40:09] bgs100: // style comments
114 <Snova> [Jun 21 19:40:12] er, pedro3005
115 <pedro3005> [Jun 21 19:40:16] oh
116 <Snova> [Jun 21 19:40:23] I'm not sure whether that was accepted into the C standard or not
117 <Snova> [Jun 21 19:40:31] in any case it comes from C++
118 <bgs100> [Jun 21 19:40:34] Snova, No, but I think it will be in C99
119 <seidos> [Jun 21 19:40:41] are // style comments standard c++?
120 <bgs100> [Jun 21 19:40:42] Or
121 <bgs100> [Jun 21 19:40:45] Fail, not will be
122 <bgs100> [Jun 21 19:40:48] is*
123 <bgs100> [Jun 21 19:40:57] seidos, Mhm
124 <seidos> [Jun 21 19:40:57] ah nm, snova answered before I could even type the question
125 <pedro3005> [Jun 21 19:41:04] bgs100, a problem though, it never stops asking for input
126 <bgs100> [Jun 21 19:41:10] pedro3005, Here:
127 <pedro3005> [Jun 21 19:41:11] oh
128 <pedro3005> [Jun 21 19:41:13] wait
129 <pedro3005> [Jun 21 19:41:15] I can solve it
130 <pedro3005> [Jun 21 19:41:15] shush
131 <pedro3005> [Jun 21 19:42:22] damn
132 <seidos> [Jun 21 19:42:55] It looks like I fixed the problem with my hw, bgs100, want me to send you my updated code? or am I too late?
133 <bgs100> [Jun 21 19:42:59] pedro3005, :|
134 <seidos> [Jun 21 19:43:02] I'm not sure why it worked though
135 <bgs100> [Jun 21 19:43:06] seidos, Sure, send it
136 <bgs100> [Jun 21 19:43:12] I haven't seen yours yet :P
137 <pedro3005> [Jun 21 19:43:25] will this damn thing work
138 * pedro3005 [Jun 21 19:43:29] slaps compiler
139 <bgs100> [Jun 21 19:43:32] pedro3005, Do you want the link to my modification?
140 <pedro3005> [Jun 21 19:43:38] no
141 <bgs100> [Jun 21 19:43:42] ...
142 <seidos> [Jun 21 19:44:01] bgs100, http://paste.ubuntu.com/453134/
143 <pedro3005> [Jun 21 19:44:05] look
144 <pedro3005> [Jun 21 19:44:08] for (count = 0; ((input = getchar()) || count < size); count++)
145 <pedro3005> [Jun 21 19:44:08] array[count] = input-'0';
146 <seidos> [Jun 21 19:44:11] it must be the i++, I can't move it to the bottom this time
147 <bgs100> [Jun 21 19:44:36] pedro3005,
148 <pedro3005> [Jun 21 19:44:50] wait
149 <pedro3005> [Jun 21 19:44:51] fail
150 <bgs100> [Jun 21 19:45:10] pedro3005, That would probably work for input like "123", but what if I wanted multi-digit numbers? :p
151 <bgs100> [Jun 21 19:45:13] seidos, Good,
152 <bgs100> [Jun 21 19:45:21] seidos, Your problem was,
153 <bgs100> [Jun 21 19:45:52] seidos, That you were trying to access input[10] when it's length is 10 and the first elemnt is at input[0]
154 <bgs100> [Jun 21 19:45:58] element*
155 <bgs100> [Jun 21 19:46:15] So you were going one space too far.
156 <seidos> [Jun 21 19:46:20] oh, no, I think it was right
157 <bgs100> [Jun 21 19:46:32] In fact, you still are, in the first part
158 <seidos> [Jun 21 19:46:32] hmmm
159 <seidos> [Jun 21 19:46:36] wait
160 <pedro3005> [Jun 21 19:46:37] bgs100, oh, I'll fix it using scanf.. But I don't have much time today.. I'll work on this again later, can we move on to the class? I must leave in ~30 minutes
161 <bgs100> [Jun 21 19:46:37] s/part/loop/
162 <seidos> [Jun 21 19:46:38] crap
163 <bgs100> [Jun 21 19:46:52] pedro3005, Can I link you to the modification? :p
164 <bgs100> [Jun 21 19:46:59] Meh
165 <pedro3005> [Jun 21 19:46:59] ok sure
166 <seidos> [Jun 21 19:47:00] it should be adding input[0]...input[10]
167 <bgs100> [Jun 21 19:47:05] pedro3005, http://paste.pocoo.org/show/228243/
168 <seidos> [Jun 21 19:47:11] when I added up the inputs manually though, I got 66, not 132
169 <bgs100> [Jun 21 19:47:22] Yeahhhh
170 <bgs100> [Jun 21 19:47:29] seidos, We'll get back to that :p
171 <pedro3005> [Jun 21 19:47:30] yep, what I thought.. scanf
172 <bgs100> [Jun 21 19:47:33] Onto class
173 <bgs100> [Jun 21 19:47:47] So...
174 <bgs100> [Jun 21 19:47:56] We've learned a bit about arrays...
175 <pedro3005> [Jun 21 19:48:26] :D
176 <bgs100> [Jun 21 19:48:31] I was thinking we might go on to strings (a special kind of array with functions that apply just to it)
177 <bgs100> [Jun 21 19:48:59] So, yeah
178 <bgs100> [Jun 21 19:49:12] First off: A string is just an array of characters
179 <bgs100> [Jun 21 19:49:29] There is a piece of the standard library dedicated to strings: string.h
180 <bgs100> [Jun 21 19:49:54] Now, with string.h, there's a function called strlen() that gets the length of a string.
181 <bgs100> [Jun 21 19:50:08] How could this work, since a string is an array?!
182 <pedro3005> [Jun 21 19:50:11] !!!
183 <pedro3005> [Jun 21 19:50:22] I know!
184 <bgs100> [Jun 21 19:50:22] Because, strings have a special character at the end...
185 <pedro3005> [Jun 21 19:50:26] damn it
186 <bgs100> [Jun 21 19:50:31] lol
187 <pedro3005> [Jun 21 19:50:35] NULL? "\0"?
188 <bgs100> [Jun 21 19:50:41] \0 , which is the integer 0 in ASCII
189 <bgs100> [Jun 21 19:50:50] probably everywhere else too :p
190 <bgs100> [Jun 21 19:51:04] pedro3005, yeah, except '\0', not "\0"
191 <pedro3005> [Jun 21 19:51:17] bgs100, only char arrays end with null?
192 <bgs100> [Jun 21 19:51:26] Not char arrays, strings
193 <bgs100> [Jun 21 19:51:32] There is a tiny distinction
194 <bgs100> [Jun 21 19:51:48] With strings, you do have the \0 at the end
195 <pedro3005> [Jun 21 19:51:53] char arrays = strings
196 <bgs100> [Jun 21 19:52:08] With char arrays, well, you can have whatever floats your boat (no pun intended)
197 <bgs100> [Jun 21 19:52:29] pedro3005, technically
198 <bgs100> [Jun 21 19:52:32] yes
199 <bgs100> [Jun 21 19:52:49] But you might say that not all char arrays are strings
200 <pedro3005> [Jun 21 19:52:56] ok
201 <bgs100> [Jun 21 19:52:59] pedro3005,
202 <Snova> [Jun 21 19:53:16] ohai
203 <bgs100> [Jun 21 19:53:21] When you take "Hello world" in C, you automatically have a \0 on the end
204 <bgs100> [Jun 21 19:53:33] But you could have a char array that did not
205 <bgs100> [Jun 21 19:53:35] So anyway
206 <bgs100> [Jun 21 19:53:36] hai Snova
207 <bgs100> [Jun 21 19:53:48] So yeah...
208 <bgs100> [Jun 21 19:53:56] seidos, pedro3005 Any questions?
209 <Snova> [Jun 21 19:54:07] pedro3005: as arrays do not have a length, so called c-strings are initialized with a \0 at the end in the interests of string handling. only *initialized*; it's your job to maintain it
210 <seidos> [Jun 21 19:54:24] no questions here
211 <bgs100> [Jun 21 19:54:32] Okay cools then
212 <pedro3005> [Jun 21 19:54:53] yeah cool
213 <bgs100> [Jun 21 19:54:57] We've been using strings this whole time in calls to printf, fprintf, puts, and scanf
214 <bgs100> [Jun 21 19:55:06] Being arrays,
215 <Snova> [Jun 21 19:55:11] all of which are implicitly assuming there is a \0 at the end
216 <bgs100> [Jun 21 19:55:18] You can access the members of a string and modify them
217 <bgs100> [Jun 21 19:55:48] But, as Snova said, it would probably not be good to replace the \0 without replacing it later
218 <bgs100> [Jun 21 19:56:37] Also, as with arrays,
219 <bgs100> [Jun 21 19:56:47] you can allocate them yourself.
220 <bgs100> [Jun 21 19:57:16] (and realloc them, etc.)
221 <bgs100> [Jun 21 19:58:24] If you want to declare a string (or rather char array/pointer in this case), you just take what you know with int pointers and arrays and swap int for char.
222 <bgs100> [Jun 21 19:58:38] char mychararray[10];
223 <bgs100> [Jun 21 19:58:55] However, you'll want to take care if using a number, because of the extra '\0'.
224 <bgs100> [Jun 21 19:59:03] You can also do things like:
225 <bgs100> [Jun 21 19:59:15] char mychararray[] = "Hallo world";
226 <seidos> [Jun 21 19:59:17] bgs100, what do you mean by "using a number"?
227 <bgs100> [Jun 21 19:59:35] seidos, I mean the 10 in "char mychararray[10];"
228 <bgs100> [Jun 21 19:59:40] Sorry for unclear wording
229 <bgs100> [Jun 21 19:59:54] If you're declaring an array like that, is what I mean.
230 <seidos> [Jun 21 19:59:59] if you don't use a number, what else is there to use?
231 <bgs100> [Jun 21 20:00:05] ...
232 <pedro3005> [Jun 21 20:00:10] char mychararray[] = "Hallo world";
233 <bgs100> [Jun 21 20:00:17] pedro3005, Thank you :p
234 <seidos> [Jun 21 20:00:28] that works? as like an "infinite" array?
235 <bgs100> [Jun 21 20:00:30] And of course pointers
236 <bgs100> [Jun 21 20:00:33] seidos, Uh no
237 <bgs100> [Jun 21 20:00:53] seidos, The size of the array is just the size "Hallo world" has
238 <seidos> [Jun 21 20:01:16] but I could do char mychararray[] = "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk etc etc"
239 <pedro3005> [Jun 21 20:01:30] char array[∞];
240 <bgs100> [Jun 21 20:01:31] Um, sure.
241 <bgs100> [Jun 21 20:01:43] pedro3005, Hahaha
242 <bgs100> [Jun 21 20:01:46] Nice
243 <seidos> [Jun 21 20:02:05] pedro3005, you just solved the "matrix of reality". We're in an infinite array!
244 <seidos> [Jun 21 20:02:16] or...not
245 * bgs100 [Jun 21 20:02:24] gives pedro3005 the Neo badge
246 <seidos> [Jun 21 20:02:32] haha
247 <pedro3005> [Jun 21 20:02:36] :D
248 <bgs100> [Jun 21 20:02:43] pedro3005, Now do some backflips and shootings and stuff in slow-mo :P
249 <pedro3005> [Jun 21 20:02:54] bgs100, only in Python
250 <seidos> [Jun 21 20:02:55] I recommend practicing dodging bullets before actually trying it in real life
251 <bgs100> [Jun 21 20:03:15] seidos, No, just stop them with your hand :p
252 <pedro3005> [Jun 21 20:03:22] better yet, teeth
253 <seidos> [Jun 21 20:03:29] well, practice first
254 <bgs100> [Jun 21 20:03:34] ANYWAY
255 <seidos> [Jun 21 20:03:41] don't be like those people on LSD that think they can fly...well
256 <seidos> [Jun 21 20:03:44] yeah...anyway
257 <pedro3005> [Jun 21 20:03:52] anyone have a gun I can borrow for practice?
258 <bgs100> [Jun 21 20:03:59] Pshaw, I can fly *begins to levitate*
259 <bgs100> [Jun 21 20:04:14] import antigravity
260 <bgs100> [Jun 21 20:04:15] :p
261 <pedro3005> [Jun 21 20:04:17] ANYWAY
262 <pedro3005> [Jun 21 20:04:21] C
263 <bgs100> [Jun 21 20:04:21] ANYWAY
264 <bgs100> [Jun 21 20:04:24] D
265 <bgs100> [Jun 21 20:04:34] :p
266 <bgs100> [Jun 21 20:04:37] But seriously
267 <pedro3005> [Jun 21 20:04:39] C-C-Combo breaker
268 <bgs100> [Jun 21 20:04:43] So yeah
269 <bgs100> [Jun 21 20:05:01] ...
270 <bgs100> [Jun 21 20:05:08] Any questions?
271 <pedro3005> [Jun 21 20:05:11] none
272 <bgs100> [Jun 21 20:05:17] seidos ?
273 * bgs100 [Jun 21 20:05:32] assumes not
274 <bgs100> [Jun 21 20:05:37] ONWARDS
275 <seidos> [Jun 21 20:05:42] you assume correct
276 <bgs100> [Jun 21 20:06:04] Okay
277 <bgs100> [Jun 21 20:06:17] Really quickly, 3 simple things that I did not mention earlier
278 <bgs100> [Jun 21 20:06:19] First:
279 <bgs100> [Jun 21 20:06:25] The dowhile loop
280 <bgs100> [Jun 21 20:06:29] do {
281 <bgs100> [Jun 21 20:06:33] stuff
282 <bgs100> [Jun 21 20:06:41] } while (conditions);
283 <bgs100> [Jun 21 20:06:55] It is very much like a while loop,
284 <bgs100> [Jun 21 20:07:08] except the condition is checked after the body has been run
285 <bgs100> [Jun 21 20:07:17] So the body will always execute at least once
286 <bgs100> [Jun 21 20:07:34] Useful for when you have something like:
287 <bgs100> [Jun 21 20:07:37] dostuff
288 <bgs100> [Jun 21 20:07:43] while (condition) {
289 <bgs100> [Jun 21 20:07:49] dotheexactsamestuff
290 <bgs100> [Jun 21 20:07:51] }
291 <bgs100> [Jun 21 20:08:01] Next
292 <bgs100> [Jun 21 20:08:05] The switch statement
293 <bgs100> [Jun 21 20:08:16] switch (variable) {
294 <bgs100> [Jun 21 20:08:24] case somevalue:
295 <bgs100> [Jun 21 20:08:28] dostuff
296 <bgs100> [Jun 21 20:08:34] break;
297 <bgs100> [Jun 21 20:08:36] }
298 <bgs100> [Jun 21 20:08:41] Okay
299 <bgs100> [Jun 21 20:08:54] The switch statement checks if the variable is equal to a bunch of stuff,
300 <bgs100> [Jun 21 20:09:14] The break meaning it exits the switch and doesn't check for anything else
301 <bgs100> [Jun 21 20:09:29] You can also have stuff like:
302 <bgs100> [Jun 21 20:09:35] switch (variable) {
303 <bgs100> [Jun 21 20:09:44] case value:
304 <bgs100> [Jun 21 20:09:48] case othervalue:
305 <bgs100> [Jun 21 20:09:53] dostuff
306 <bgs100> [Jun 21 20:09:57] break;
307 <bgs100> [Jun 21 20:09:59] }
308 <seidos> [Jun 21 20:10:08] do you have to put break;?
309 <bgs100> [Jun 21 20:10:15] In which "dostuff" will execute if variable is value or othervalue
310 <bgs100> [Jun 21 20:10:48] seidos, It makes sense to usually, since your variable probably isn't going to be two values at once.
311 <bgs100> [Jun 21 20:11:04] However, you could have a case that changes the variable for a further case.
312 <seidos> [Jun 21 20:11:12] why do you put break; in the second case but in the 1st case?
313 <bgs100> [Jun 21 20:11:16] seidos, So, technically not, but usually you will.
314 <bgs100> [Jun 21 20:11:22] seidos, Because,
315 <seidos> [Jun 21 20:11:30] s/but/but not
316 <bgs100> [Jun 21 20:11:47] We want "dostuff" to execute if the variable is either "value" or "othervalue"
317 <bgs100> [Jun 21 20:12:04] We don't want to break, then.
318 <bgs100> [Jun 21 20:12:14] Also
319 <bgs100> [Jun 21 20:12:24] The equivalent of an "else" in switch is "default:"
320 <bgs100> [Jun 21 20:12:30] switch (variable) {
321 <bgs100> [Jun 21 20:12:37] case blarg:
322 <bgs100> [Jun 21 20:12:43] dostuff
323 <bgs100> [Jun 21 20:12:49] break;
324 <bgs100> [Jun 21 20:12:55] default:
325 <bgs100> [Jun 21 20:13:03] dostuff
326 <bgs100> [Jun 21 20:13:10] break;
327 <bgs100> [Jun 21 20:13:11] }
328 <bgs100> [Jun 21 20:13:12] AND
329 <bgs100> [Jun 21 20:13:23] You do not have to put the break in the default
330 <bgs100> [Jun 21 20:13:29] However
331 <bgs100> [Jun 21 20:13:56] It is generally good practice in case you go back and change the default to a case or add another case or something
332 <bgs100> [Jun 21 20:14:05] (no pun intended)
333 <bgs100> [Jun 21 20:14:15] pedro3005, seidos Questions?
334 <seidos> [Jun 21 20:14:25] just some thoughts
335 <bgs100> [Jun 21 20:14:29] Yes?
336 <seidos> [Jun 21 20:14:33] it's interesting that the cases have multiple lines without {}
337 <bgs100> [Jun 21 20:14:39] Yeah
338 <seidos> [Jun 21 20:14:44] and it's interesting break has a ; but not dostuff
339 <bgs100> [Jun 21 20:14:52] err
340 <bgs100> [Jun 21 20:15:12] seidos, That's just because I assumed you had ;'s in your dostuff :P
341 <bgs100> [Jun 21 20:15:23] dostuff just represents the main body
342 <seidos> [Jun 21 20:15:29] ah okay
343 <bgs100> [Jun 21 20:15:32] Sorry if that caused confusion
344 <bgs100> [Jun 21 20:15:43] But anyway, about the first thought
345 <bgs100> [Jun 21 20:15:59] That is a good though... it's a depart from the normal syntax
346 * bgs100 [Jun 21 20:16:11] gives seidos the thinker badge
347 <bgs100> [Jun 21 20:16:22] Okay
348 <bgs100> [Jun 21 20:16:26] Maybe pedro3005 has left...
349 <pedro3005> [Jun 21 20:16:29] no
350 <bgs100> [Jun 21 20:16:33] Oh Yay!
351 <bgs100> [Jun 21 20:16:41] Okay then
352 <bgs100> [Jun 21 20:16:46] pedro3005, no questions?
353 <pedro3005> [Jun 21 20:16:49] none
354 <bgs100> [Jun 21 20:16:52] Okay
355 <seidos> [Jun 21 20:17:01] I want to see Rodin's statue with the "thinker" badge on it. that would be tight.
356 <bgs100> [Jun 21 20:17:02] I guess that's why you didn't respond earlier?
357 <bgs100> [Jun 21 20:17:09] seidos, Lol
358 <bgs100> [Jun 21 20:17:34] Okay
359 <bgs100> [Jun 21 20:17:38] Final 3rd thing
360 <bgs100> [Jun 21 20:17:51] The acursed "goto" statement.
361 * seidos [Jun 21 20:18:01] does the sign of the cross
362 <bgs100> [Jun 21 20:18:09] seidos, Good idea.
363 <bgs100> [Jun 21 20:18:42] The goto statement is often regarded as an evil beast, the god of spaghetti code, and in general acursed.
364 <pedro3005> [Jun 21 20:18:55] sounds like I'll love it
365 <bgs100> [Jun 21 20:18:59] seidos, pedro3005 http://xkcd.com/292/
366 <pedro3005> [Jun 21 20:19:07] It's the dinosaur one
367 <pedro3005> [Jun 21 20:19:10] :P
368 <pedro3005> [Jun 21 20:19:12] without looking
369 <pedro3005> [Jun 21 20:19:20] yay!
370 <bgs100> [Jun 21 20:19:30] :P
371 <pedro3005> [Jun 21 20:19:43] bgs100, where's the badge for knowing xkcd?
372 * bgs100 [Jun 21 20:19:50] gives that to pedro3005
373 <bgs100> [Jun 21 20:19:55] Well
374 <seidos> [Jun 21 20:20:08] I haven't read all of xkcd yet
375 <bgs100> [Jun 21 20:20:12] In all honesty there's a multiple dinosaur ones :P
376 <bgs100> [Jun 21 20:20:23] s/a//
377 <bgs100> [Jun 21 20:20:24] Okay
378 <bgs100> [Jun 21 20:20:30] So
379 <bgs100> [Jun 21 20:20:41] Here's how this demon spawn works:
380 <pedro3005> [Jun 21 20:20:51] bgs100, I didn't get the alt-text
381 <bgs100> [Jun 21 20:21:02] pedro3005, Er, uh, google it
382 <seidos> [Jun 21 20:21:08] alt-text?
383 <bgs100> [Jun 21 20:21:11] This isn't xkcd class :p
384 <pedro3005> [Jun 21 20:21:15] oh boy
385 <bgs100> [Jun 21 20:21:18] seidos, However your mouse over the comic
386 <bgs100> [Jun 21 20:21:23] Hover*
387 <bgs100> [Jun 21 20:21:25] Fail
388 <pedro3005> [Jun 21 20:21:42] ohhh
389 <bgs100> [Jun 21 20:21:56] seidos, Okay?
390 <pedro3005> [Jun 21 20:22:00] that ones one obscure joke
391 <pedro3005> [Jun 21 20:22:03] was*
392 <seidos> [Jun 21 20:22:03] yeah
393 <bgs100> [Jun 21 20:22:10] See the text?
394 <bgs100> [Jun 21 20:22:35] ...
395 <seidos> [Jun 21 20:22:41] yeah I'm looking it up
396 <pedro3005> [Jun 21 20:22:44] I mean, I'm only really learning C so I can understand the jokes about C
397 <pedro3005> [Jun 21 20:22:50] :P jk
398 <bgs100> [Jun 21 20:22:53] seidos, Hm?
399 <seidos> [Jun 21 20:22:53] haha
400 <bgs100> [Jun 21 20:23:07] seidos, No, just hover your mouse over the comic
401 <bgs100> [Jun 21 20:23:16] pedro3005, lol :p
402 <seidos> [Jun 21 20:23:34] bgs100, I hovered over and it said "Neal Stephenson thinks it's cute to name his labels 'dengo'.
403 <bgs100> [Jun 21 20:23:39] Yes
404 <bgs100> [Jun 21 20:23:43] That is alt-text
405 <seidos> [Jun 21 20:23:44] but it made no sense to me, so I'm looking it up
406 <bgs100> [Jun 21 20:23:47] o
407 <bgs100> [Jun 21 20:23:49] oh*
408 <bgs100> [Jun 21 20:23:51] pedro3005, Well,
409 <bgs100> [Jun 21 20:23:54] That's okay
410 <pedro3005> [Jun 21 20:23:56] bgs100, ONTO C
411 <bgs100> [Jun 21 20:24:10] Because all of this C that everyone has taught to you is a lie.
412 <bgs100> [Jun 21 20:24:17] GCC is an elaborate joke
413 <bgs100> [Jun 21 20:24:29] I've been PMing seidos the real lessons
414 * seidos [Jun 21 20:24:43] checks for a pm from bgs100
415 <seidos> [Jun 21 20:25:31] maybe irc is an elaborate joke, because I never got any pms...ermmm, I mean, there they are, I just haven't had time to read them
416 <seidos> [Jun 21 20:25:35] odd, didn't see them before
417 <bgs100> [Jun 21 20:25:40] ...
418 <bgs100> [Jun 21 20:25:52] let's just go on then
419 * seidos [Jun 21 20:25:54] gives his most convincing smile
420 * bgs100 [Jun 21 20:26:04] gives seidos the Joke Ruiner badge
421 <bgs100> [Jun 21 20:26:10] (jk :p)
422 <seidos> [Jun 21 20:26:29] I am "the joke ruiner!" The Joker's archnemesis
423 <bgs100> [Jun 21 20:26:31] ONWARD
424 <bgs100> [Jun 21 20:26:39] seidos, rofl
425 <bgs100> [Jun 21 20:26:48] The was pretty good xD
426 <bgs100> [Jun 21 20:26:51] That*
427 <seidos> [Jun 21 20:27:17] ONWARD, huzzah to onward!
428 <seidos> [Jun 21 20:27:22] and thank you
429 <bgs100> [Jun 21 20:27:28] STUPID KEYBOARD
430 * bgs100 [Jun 21 20:27:28] burns keyboard
431 <bgs100> [Jun 21 20:27:28] OW CRAP MY HANDS
432 <bgs100> [Jun 21 20:27:28] ONWARD
433 <bgs100> [Jun 21 20:27:29] So
434 <bgs100> [Jun 21 20:27:33] Back to goto
435 <pedro3005> [Jun 21 20:27:38] goto goto
436 <bgs100> [Jun 21 20:27:47] So, you make a label like this:
437 <bgs100> [Jun 21 20:27:50] pedro3005, har har :p
438 <bgs100> [Jun 21 20:27:58] Let's say you have your code:
439 <bgs100> [Jun 21 20:28:01] int main() {
440 <bgs100> [Jun 21 20:28:05] blarg;
441 <bgs100> [Jun 21 20:28:09] sillystuff;
442 <bgs100> [Jun 21 20:28:19] thisisalabel:
443 <bgs100> [Jun 21 20:28:25] morestuff;
444 <bgs100> [Jun 21 20:28:28] return 0;
445 <bgs100> [Jun 21 20:28:29] }
446 <bgs100> [Jun 21 20:28:38] Alright?
447 <pedro3005> [Jun 21 20:28:44] no {}?
448 <bgs100> [Jun 21 20:28:50] Nooope
449 <pedro3005> [Jun 21 20:28:57] how do we determine the end of a label then?
450 <Snova> [Jun 21 20:29:02] you don't
451 <Snova> [Jun 21 20:29:09] there isn't one
452 <bgs100> [Jun 21 20:29:30] Ohai Snova
453 <pedro3005> [Jun 21 20:29:32] >.>
454 <pedro3005> [Jun 21 20:29:40] what's the point then?
455 <Snova> [Jun 21 20:29:50] ordinarily C code proceeds from statement to statement, making exceptions only when if/while/for denote otherwise. goto allows you to break this rule.
456 <Snova> [Jun 21 20:30:07] it simply sets the next statement to be executed to the one after your target albel
457 <bgs100> [Jun 21 20:30:07] Yep
458 <Snova> [Jun 21 20:30:13] be it going backwards or forwards
459 <pedro3005> [Jun 21 20:30:15] I see
460 <pedro3005> [Jun 21 20:30:33] then if you go backwards, it'll execute all the way up to the goto again
461 <bgs100> [Jun 21 20:30:34] Here's how you use goto (assuming you have a label):
462 <pedro3005> [Jun 21 20:30:35] right?
463 <Snova> [Jun 21 20:30:39] pedro3005: and then what?
464 <bgs100> [Jun 21 20:30:44] goto somelabael;
465 <bgs100> [Jun 21 20:30:52] goto somelabel;*
466 <bgs100> [Jun 21 20:30:54] :p
467 <pedro3005> [Jun 21 20:30:54] Snova, infinite loop?
468 <Snova> [Jun 21 20:30:57] pedro3005: exactly
469 * seidos [Jun 21 20:31:39] thinks sentience is an infinite loop
470 <bgs100> [Jun 21 20:31:43] Brb, with an example.
471 <Snova> [Jun 21 20:31:44] it's the complete lack of structure therein that is why many languages today don't even have a goto statement; it's considered *very* poor form to use except in certain circumstances
472 <Snova> [Jun 21 20:31:56] Linux actually uses it a fair bit, but you'll note it's only to ensure cleanup code gets run
473 <seidos> [Jun 21 20:32:10] Linux uses it?
474 * seidos [Jun 21 20:32:25] eyes his computer suspiciously, afraid it might crash at any moment
475 <bgs100> [Jun 21 20:32:37] Lol
476 <Snova> [Jun 21 20:32:46] yes, they put some cleanup code at the bottom of a function and "goto it" as a means of simplifying the code
477 <bgs100> [Jun 21 20:32:51] seidos, Quick, cross yourself some more!
478 <bgs100> [Jun 21 20:32:54] :p
479 <pedro3005> [Jun 21 20:32:56] seidos, watch out for the dinosaur
480 <Snova> [Jun 21 20:33:00] that's about the only reason you'd want to use it, ever
481 * seidos [Jun 21 20:33:08] says an incantation
482 <Snova> [Jun 21 20:33:24] better yet, just don't; if you think you have an opportunity to make good use of it, chances are you don't
483 <pedro3005> [Jun 21 20:33:36] ok
484 <seidos> [Jun 21 20:33:40] pedro3005, does the raptor get you even if you weren't the one who used the goto statement?
485 <bgs100> [Jun 21 20:33:57] aw crap
486 <bgs100> [Jun 21 20:34:17] I just realized I might be attacked by a velociraptor for making this example
487 <Snova> [Jun 21 20:34:29] seidos: it's the spaghetti raptor, and you aren't at fault, so probably not
488 <pedro3005> [Jun 21 20:34:39] it's okay if you don't compile it
489 <Snova> [Jun 21 20:34:48] http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Harmful.html
490 <Snova> [Jun 21 20:34:55] lolwut, odd url
491 <seidos> [Jun 21 20:34:56] Snova, is the spaghetti raptor and the flying spaghetti monster in cahoots?
492 <Snova> [Jun 21 20:35:09] seidos: worth investigating
493 <bgs100> [Jun 21 20:35:29] Indeed
494 * bgs100 [Jun 21 20:35:35] dons detective cap
495 * bgs100 [Jun 21 20:35:50] dons raptor defense bat
496 <bgs100> [Jun 21 20:36:31] Pastebining
497 <bgs100> [Jun 21 20:36:50] http://paste.pocoo.org/show/228260/
498 <bgs100> [Jun 21 20:37:00] Prepare to be murdered by raptors
499 * bgs100 [Jun 21 20:37:17] holds raptor-defense-bat tighter
500 <seidos> [Jun 21 20:37:46] hold it
501 * bgs100 [Jun 21 20:37:48] notices his raptor-defense-bat is just a plastic toy nightstick
502 <seidos> [Jun 21 20:37:58] why am I risking death? I mean, will I die a noble death?
503 <Snova> [Jun 21 20:37:59] I think you need to be more worried about Dijkstra...
504 <bgs100> [Jun 21 20:38:03] seidos, pedro3005 SCRO while keeping lookout
505 <bgs100> [Jun 21 20:38:11] Snova, Lol
506 * pedro3005 [Jun 21 20:38:20] locks door
507 * pedro3005 [Jun 21 20:38:23] closes window
508 <bgs100> [Jun 21 20:39:00] ...
509 <bgs100> [Jun 21 20:39:08] Jjst hurry up and tell em the output :p
510 <bgs100> [Jun 21 20:39:10] Just*
511 <pedro3005> [Jun 21 20:39:30] i is 1..4
512 <bgs100> [Jun 21 20:39:36] errr
513 <seidos> [Jun 21 20:39:37] what pedro3005 said
514 <bgs100> [Jun 21 20:39:41] Don't you mean 0...4?
515 <seidos> [Jun 21 20:39:46] oh yeah
516 <seidos> [Jun 21 20:39:47] 0-4
517 <bgs100> [Jun 21 20:39:54] *rolls eyes*
518 <pedro3005> [Jun 21 20:39:55] yeah, 0, 1, all the same
519 <bgs100> [Jun 21 20:40:03] uhhh
520 <pedro3005> [Jun 21 20:40:09] shush
521 <bgs100> [Jun 21 20:40:10] *Universe Asplodes*
522 <pedro3005> [Jun 21 20:40:11] on with the C
523 <seidos> [Jun 21 20:40:13] 0 = 1, that's Zen
524 <bgs100> [Jun 21 20:40:32] seidos, No, I think that's just fail :p
525 <bgs100> [Jun 21 20:40:38] ANYWAY
526 <bgs100> [Jun 21 20:40:41] VERILY ONWARD
527 <bgs100> [Jun 21 20:40:50] So basically, this code is equivalent to a for loop
528 <pedro3005> [Jun 21 20:40:53] yes, kind sir
529 <bgs100> [Jun 21 20:40:59] for (i = 0; i < 5; i++)
530 <bgs100> [Jun 21 20:41:08] printf("i is %d\n", i);
531 <bgs100> [Jun 21 20:41:30] That's what this is doing
532 <pedro3005> [Jun 21 20:41:54] I see
533 <bgs100> [Jun 21 20:41:58] Interestingly, you can also have a label after a goto.
534 <bgs100> [Jun 21 20:42:01] Like so:
535 <bgs100> [Jun 21 20:42:04] int main() {
536 <bgs100> [Jun 21 20:42:20] if (idontwanttorunsomecode)
537 <bgs100> [Jun 21 20:42:30] goto tthheeefffuuuttuuureee;
538 <bgs100> [Jun 21 20:42:34] somecode;
539 <bgs100> [Jun 21 20:42:38] somemorecode;
540 <bgs100> [Jun 21 20:42:49] tthheeefffuuuttuuureee:
541 <bgs100> [Jun 21 20:43:06] puts("WHHHOOOAAAA We're in the fffuuutttuurreee");
542 <bgs100> [Jun 21 20:43:09] return 0;
543 <bgs100> [Jun 21 20:43:10] }
544 <bgs100> [Jun 21 20:43:20] Okay?
545 <pedro3005> [Jun 21 20:43:23] makes sense
546 <bgs100> [Jun 21 20:43:27] Good
547 <bgs100> [Jun 21 20:43:28] seidos ?
548 <seidos> [Jun 21 20:43:50] yeah, clear as mud
549 <seidos> [Jun 21 20:43:51] as usual
550 <bgs100> [Jun 21 20:43:58] ...
551 <bgs100> [Jun 21 20:44:03] seidos, You have questions?
552 <seidos> [Jun 21 20:44:33] I guess it makes sense
553 <seidos> [Jun 21 20:44:39] just had to find which one was the label
554 <pedro3005> [Jun 21 20:44:47] Snova, why that link you sent as in a folder called copyright_violations on a directory of University of Arizona's department of sociology is beyond me
555 <pedro3005> [Jun 21 20:44:52] was*
556 <bgs100> [Jun 21 20:45:03] seidos, there was only one label :p
557 <bgs100> [Jun 21 20:45:09] And it was not indented
558 <seidos> [Jun 21 20:45:25] yeah tthheeefffuuuttuuureee: is the label
559 <bgs100> [Jun 21 20:45:29] mhm
560 <bgs100> [Jun 21 20:45:45] Snova, Ping
561 <seidos> [Jun 21 20:45:59] so tthheeefffuuuttuuureee;
562 <seidos> [Jun 21 20:45:59] <bgs100> somecode;
563 <seidos> [Jun 21 20:45:59] <bgs100> somemorecode;
564 <seidos> [Jun 21 20:46:04] is skipped, right?
565 <bgs100> [Jun 21 20:46:09] Yes!
566 <bgs100> [Jun 21 20:46:11] Good
567 <pedro3005> [Jun 21 20:46:15] also, at a picture of a kid flipping the camera off is present in the directory
568 <pedro3005> [Jun 21 20:46:18] a*
569 <bgs100> [Jun 21 20:46:27] pedro3005, lolwat
570 <pedro3005> [Jun 21 20:46:35] bgs100, indeed
571 <bgs100> [Jun 21 20:46:41] verily
572 <pedro3005> [Jun 21 20:46:47] I'm going to study sociology at Arizona now
573 <bgs100> [Jun 21 20:46:53] xD
574 <pedro3005> [Jun 21 20:46:55] I wonder what kind of crazy shit they smoke
575 <bgs100> [Jun 21 20:47:02] so.
576 <bgs100> [Jun 21 20:47:06] moving on.
577 <seidos> [Jun 21 20:47:14] young claude. ha
578 <bgs100> [Jun 21 20:47:29] Now, pedro3005, seidos, you know most of C The Language.
579 * pedro3005 [Jun 21 20:47:44] celebrates
580 <seidos> [Jun 21 20:47:49] bgs100, then why can't I speak c?
581 * pedro3005 [Jun 21 20:47:59] goes to program a new operating system
582 <bgs100> [Jun 21 20:48:01] Hmm
583 <seidos> [Jun 21 20:48:23] maybe it's because I don't understand Dijkstra
584 <bgs100> [Jun 21 20:48:35] Wait
585 <seidos> [Jun 21 20:48:37] does that mean that all that's left are projects using C to solve problems?
586 <bgs100> [Jun 21 20:48:42] Were you joking, or what?
587 * pedro3005 [Jun 21 20:49:01] grabs C book
588 <bgs100> [Jun 21 20:49:05] Hey, I'm going to have to go for a few minutes soon.
589 <pedro3005> [Jun 21 20:49:07] there must be something here we don't know
590 <bgs100> [Jun 21 20:49:15] pedro3005, Wait :p
591 * seidos [Jun 21 20:49:25] thinks of something
592 <pedro3005> [Jun 21 20:49:27] bgs100, assign homework and dismiss class then
593 <seidos> [Jun 21 20:49:38] well specific functions that exist in the many include files
594 <bgs100> [Jun 21 20:49:44] No, I don't have time
595 <pedro3005> [Jun 21 20:49:59] okay... farewell
596 <seidos> [Jun 21 20:50:07] I guess I can work on problem 2 of projecteuler
597 <bgs100> [Jun 21 20:50:07] You know about data types, functions, pointers, and a lot of other stuff
598 <bgs100> [Jun 21 20:50:22] And some of the standard library
599 <bgs100> [Jun 21 20:50:28] We will cover more of that later
600 <seidos> [Jun 21 20:50:28] thank you bgs100
601 <bgs100> [Jun 21 20:50:30] bbs
602 <bgs100> [Jun 21 20:50:35] Clas isn't over :p
603 <bgs100> [Jun 21 20:50:38] Class*
604 <mohi1> [Jun 21 20:50:42] :o
605 <seidos> [Jun 21 20:50:54] class is perpetual
606 <bgs100> [Jun 21 20:50:57] Lol
607 <seidos> [Jun 21 20:50:58] but just because you're in class
608 <seidos> [Jun 21 20:51:01] doesn't mean you have class
609 <bgs100> [Jun 21 20:51:01] Bye
610 <seidos> [Jun 21 20:51:04] bye
611 <bgs100> [Jun 21 20:51:05] Be back in a few
612 <pedro3005> [Jun 21 20:51:10] I won't
613 <bgs100> [Jun 21 20:51:14] seidos, That was zen-ish :p
614 <pedro3005> [Jun 21 20:51:21] bye until tomorrow
615 <pedro3005> [Jun 21 20:51:30] well, i'll hang out until 22
616 <pedro3005> [Jun 21 20:51:47] already procrastinated the fuck out of studying for a test anyway
617 <seidos> [Jun 21 20:52:29] what test?
618 <pedro3005> [Jun 21 20:52:36] history / sociology
619 <seidos> [Jun 21 20:53:27] ah
620 <seidos> [Jun 21 20:53:45] whoa
621 <seidos> [Jun 21 20:53:49] this is weird
622 <seidos> [Jun 21 20:53:55] I think I'm actually disappointed class is over
623 <pedro3005> [Jun 21 20:54:01] mohi2911, put the logs online
624 <seidos> [Jun 21 20:54:02] I don't think that's ever happened before
625 <pedro3005> [Jun 21 20:54:20] seidos, hey, do you know this book? http://www.amazon.com/Sophies-World-History-Philosophy-Classics/dp/0374530718/ref=sr_1_1?ie=UTF8&s=books&qid=1277167733&sr=8-1
626 <seidos> [Jun 21 20:54:57] never heard of it
627 <Snova> [Jun 21 20:55:15] bgs100: pong
628 <pedro3005> [Jun 21 20:55:50] seidos, I was reading some of it at the library today
629 <pedro3005> [Jun 21 20:55:52] interesting things
630 <seidos> [Jun 21 20:55:56] pedro3005, do you know this book: http://www.amazon.com/Cartoon-History-Universe-Vol-Pt-1/dp/0385265204/ref=sr_1_1?ie=UTF8&s=books&qid=1277167914&sr=8-1
631 <pedro3005> [Jun 21 20:56:01] I read about Hume and remembered of that buddhism thing you said
632 <pedro3005> [Jun 21 20:56:04] the doctrine of no-self
633 <pedro3005> [Jun 21 20:56:08] Hume did have that
634 <seidos> [Jun 21 20:56:20] Hume believed in no-self?
635 <pedro3005> [Jun 21 20:56:40] yes
636 <pedro3005> [Jun 21 20:57:18] To Hume, the self is constantly bombarded by events and changes, and it does not have an immutable always-present essence, but changes itself fundamentally over time
637 <pedro3005> [Jun 21 20:57:40] so there is no essential immutable notion of self to Hume
638 <seidos> [Jun 21 20:58:08] a self that changes doesn't necessarily mean a self that isn't
639 <pedro3005> [Jun 21 20:58:38] depends on your concept of self, I guess
640 <seidos> [Jun 21 20:58:41] the Buddhist stuff is pretty dense. The monk that I talk to on facebook just linked me a bunch of stuff to read when I questioned his beliefs
641 <pedro3005> [Jun 21 20:59:17] seidos, it is definitely an interesting book, although it's a little too simple and detached
642 <seidos> [Jun 21 20:59:33] I don't know what the self is, it certainly appears to be intimately dependent on the brain
643 <seidos> [Jun 21 20:59:42] my question is "how did I get here?"
644 <pedro3005> [Jun 21 20:59:54] your mom and dad conceived you
645 <seidos> [Jun 21 20:59:57] I didn't ask to be born. My nightmare is that I'll be born again, just like I was born this time
646 <seidos> [Jun 21 21:00:16] After studying religion my hope has started to become that death is the end
647 <pedro3005> [Jun 21 21:00:39] nobody asks to be born, because life exists randomly, and not on a purpose... As Sartre would put it, "existence precedes essence"
648 <pedro3005> [Jun 21 21:00:52] that's what I say... I hope this is it
649 <seidos> [Jun 21 21:01:04] but the only way I can be certain that I won't get born again, is if I can maintain awareness. Problem is, awareness goes away at death
650 <pedro3005> [Jun 21 21:01:08] the infinite is sickening
651 <seidos> [Jun 21 21:01:26] some guy in #jesus was telling me "eternity is awesome"
652 <pedro3005> [Jun 21 21:01:29] you cannot be certain
653 <seidos> [Jun 21 21:01:35] I asked him if "hell was awesome"
654 <seidos> [Jun 21 21:01:38] he said no.
655 <seidos> [Jun 21 21:02:01] but they never actually acknowledge their mistaken views
656 <seidos> [Jun 21 21:02:19] the problem with randomness, is cause and effect
657 <pedro3005> [Jun 21 21:02:24] I think eternity of the self is despairing
658 <pedro3005> [Jun 21 21:02:29] look
659 <seidos> [Jun 21 21:02:43] an eternity free from suffering is by definition not despairing
660 <pedro3005> [Jun 21 21:02:49] let's first assume heaven is constant and immutable
661 <pedro3005> [Jun 21 21:03:35] Your presence of heaven over time would obviously diminish your happiness as time passes
662 <pedro3005> [Jun 21 21:03:43] to this problem, there are two solutions:
663 <pedro3005> [Jun 21 21:03:54] 1. there is no notion of time in heaven
664 <pedro3005> [Jun 21 21:04:35] this is a problem in itself, because self-consciousness only exists within time.. "the self is nothing but its act of synthesis sublime. this act must be the same to be self-conscious over time" (remember Kant?)
665 <pedro3005> [Jun 21 21:04:40] it follows then that:
666 <pedro3005> [Jun 21 21:04:46] 2. heaven must be changing
667 <pedro3005> [Jun 21 21:05:36] being infinite the time spent at heaven and arguably finite the number of possible states, heaven must at some point run out
668 <pedro3005> [Jun 21 21:05:43] following that
669 <seidos> [Jun 21 21:06:01] actually, heaven changing is consistent with scripture
670 <seidos> [Jun 21 21:06:18] Adam and Eve were perfect before they fell, implying a "heaven like perfect state"
671 <seidos> [Jun 21 21:06:38] and the mainstream xian belief of satan's fall, with 1/3 of the angels, also implies heaven is not immutable
672 <pedro3005> [Jun 21 21:06:39] but the movement of heaven is absurd
673 <pedro3005> [Jun 21 21:06:45] for heaven is perfect, and there can only be one perfect
674 <seidos> [Jun 21 21:07:03] I disagree that there is not notion of time in heaven
675 <seidos> [Jun 21 21:07:10] if there is motion, there is a notion of time
676 <pedro3005> [Jun 21 21:07:15] me too
677 <pedro3005> [Jun 21 21:07:37] but if there is motion, there is a change of state, say state A and B
678 <seidos> [Jun 21 21:07:38] it kind of makes me wonder, "If you can imagine it, does that mean that it exists"?
679 <seidos> [Jun 21 21:07:59] s/not/no
680 <pedro3005> [Jun 21 21:08:17] the idea of heaven is absolutely perfect
681 <seidos> [Jun 21 21:08:27] maybe the flying spaghetti monster is floating around the planet out in this very Universe
682 <pedro3005> [Jun 21 21:08:32] this follows that A and B are both absolutely perfect and thus alike
683 <seidos> [Jun 21 21:08:39] and if not this one...oh right, sorry I'm digressing
684 <pedro3005> [Jun 21 21:08:54] so the notion of change is incompatible with the notion of perfect
685 <seidos> [Jun 21 21:09:09] ah, I see your question
686 <seidos> [Jun 21 21:09:25] is it possible for two systems, A and B, both to be perfect, and different?
687 <pedro3005> [Jun 21 21:09:42] heaven cannot exist
688 <seidos> [Jun 21 21:10:02] perhaps there is only one perfect "system" A, that has subworlds A1, A2, A3 ... Ainfinite
689 <seidos> [Jun 21 21:10:11] I don't have the infinity symbol
690 <pedro3005> [Jun 21 21:10:11] if it's immutable, there is no self; if it is mutating, it is not perfect, therefore not heaven
691 <pedro3005> [Jun 21 21:10:35] hey, I kind of liked this argument of mine
692 <seidos> [Jun 21 21:10:46] I don't understand your logic
693 <seidos> [Jun 21 21:10:55] what do you mean by "it's"?
694 <pedro3005> [Jun 21 21:11:02] heaven
695 <seidos> [Jun 21 21:11:05] just take out the "its" and put in the noun
696 <pedro3005> [Jun 21 21:11:12] if heaven is immutable, blabla
697 <seidos> [Jun 21 21:11:28] if heaven is immutable, there is no self, if heaven is mutating, heaven is not perfect, therefore not heaven
698 <seidos> [Jun 21 21:11:39] I don't get what heaven has to do with self
699 <pedro3005> [Jun 21 21:11:55] if something is immutable, there cannot be a notion of time
700 <pedro3005> [Jun 21 21:12:05] the notion of self only exists within time
701 <seidos> [Jun 21 21:12:31] I dunno
702 <seidos> [Jun 21 21:12:37] I'm not ready to accept it
703 <pedro3005> [Jun 21 21:12:53] that the notion of self can only exist with time?
704 <seidos> [Jun 21 21:12:59] this reminds me of when I asked in #jesus if I got tired of being in heaven if I could just kill myself
705 <seidos> [Jun 21 21:13:04] religion is absurd though
706 <pedro3005> [Jun 21 21:13:13] that's what I want to show
707 <seidos> [Jun 21 21:13:16] oh, right
708 <pedro3005> [Jun 21 21:13:37] but this derives the old darned question of "where does the notion of self come from?"
709 <seidos> [Jun 21 21:13:47] I think "if something is immutable, there cannot be a notion of time" is an a priori statement, that may or may not be true
710 <seidos> [Jun 21 21:14:00] I depends how immutable
711 <seidos> [Jun 21 21:14:06] s/I/it
712 <pedro3005> [Jun 21 21:14:19] of course.. the mere passing of time is already a mutation
713 <pedro3005> [Jun 21 21:14:24] suppose you bring your clock to heaven
714 <pedro3005> [Jun 21 21:14:28] it will change
715 <seidos> [Jun 21 21:14:43] in Buddhist cosmology, even heavenly beings die
716 <pedro3005> [Jun 21 21:14:49] the absurd is in implying here that there is a notion of "perfect" within a watch
717 <seidos> [Jun 21 21:15:23] now play devil's advocate
718 <seidos> [Jun 21 21:15:30] I don't know
719 <seidos> [Jun 21 21:15:36] I don't think it's ironclad
720 <seidos> [Jun 21 21:15:46] it all depends on the premise that something immutable can't have time
721 <seidos> [Jun 21 21:15:50] what about something eternal?
722 <seidos> [Jun 21 21:15:54] hmmm
723 <seidos> [Jun 21 21:16:04] eternal is not necessarily defined as heaven
724 <seidos> [Jun 21 21:16:25] actually the definition of heaven in the bible doesn't say there won't be any suffering
725 <pedro3005> [Jun 21 21:16:29] 'eternal' is an idea with no known real correspondent
726 <seidos> [Jun 21 21:16:31] it implies it
727 <seidos> [Jun 21 21:16:36] but doesn't say it explicitly
728 <seidos> [Jun 21 21:16:43] in revelation it says there won't be any night
729 <seidos> [Jun 21 21:16:49] and no that God will wipe people's tears
730 <pedro3005> [Jun 21 21:16:50] hey
731 <seidos> [Jun 21 21:16:56] yeah
732 <pedro3005> [Jun 21 21:16:57] maybe we should make this argument in #jesus
733 <seidos> [Jun 21 21:17:06] you will be disappointed
734 <pedro3005> [Jun 21 21:17:12] why?
735 <seidos> [Jun 21 21:17:33] it just will get crazy with their apologetics
736 <seidos> [Jun 21 21:17:42] but I'd like to see you try, it is a noble effort
737 <seidos> [Jun 21 21:17:45] For truth!
738 <pedro3005> [Jun 21 21:17:51] hey, I know who I can argue this with
739 <pedro3005> [Jun 21 21:18:09] damn it
740 <pedro3005> [Jun 21 21:18:11] he's not here
741 <seidos> [Jun 21 21:18:23] I can present it in #jesus if you don't do it
742 <pedro3005> [Jun 21 21:18:43] heck, I'll do it
743 <seidos> [Jun 21 21:18:43] but I don't believe in it as much as you do, so may not do the presentation justice
744 <seidos> [Jun 21 21:18:54] s/may/my
745 <seidos> [Jun 21 21:19:23] pedro3005, you could also try presenting the argument in #philosophy
746 <bgs100> [Jun 21 21:27:07] BAAAACKKKKK
747 <bgs100> [Jun 21 21:27:54] CLASS DOTH NOT BE OVER!
748 <seidos> [Jun 21 21:27:57] wb bgs100
749 <bgs100> [Jun 21 21:27:58] VERILY!
750 <bgs100> [Jun 21 21:28:15] "<seidos> I think I'm actually disappointed class is over" aww :D
751 <bgs100> [Jun 21 21:28:57] Hmm
752 <bgs100> [Jun 21 21:29:13] pedro3005 and seidos, you two should start a philosophy class
753 <pedro3005> [Jun 21 21:29:23] like anyone would come
754 <pedro3005> [Jun 21 21:29:24] :P
755 <seidos> [Jun 21 21:30:13] we could just talk in #philosophy
756 <seidos> [Jun 21 21:30:24] same diff as a class, sorta' kinda'
757 <bgs100> [Jun 21 21:30:56] I would come
758 <bgs100> [Jun 21 21:31:12] :p
759 <Snova> [Jun 21 21:31:24] "bgs100 teaches C and pedro3005 and seidos discuss philosophy related to C daily at 23:00 UTC"
760 <pedro3005> [Jun 21 21:31:45] related to C?
761 <pedro3005> [Jun 21 21:31:49] not really
762 <Snova> [Jun 21 21:31:49] well, sometimes
763 <Snova> [Jun 21 21:31:55] it seems to start there
764 <pedro3005> [Jun 21 21:32:02] well, I guess there's no goto in heaven
765 <seidos> [Jun 21 21:32:39] lol
766 <seidos> [Jun 21 21:32:43] no goto in heaven
767 <pedro3005> [Jun 21 21:32:45] damn it
768 * Snova [Jun 21 21:32:49] goes back to not being here
769 <pedro3005> [Jun 21 21:32:57] I need an objective perfect to disprove heaven
770 <pedro3005> [Jun 21 21:33:00] >:(
771 <seidos> [Jun 21 21:33:06] no raptors either
772 <pedro3005> [Jun 21 21:33:20] bgs100, continue, then?
773 <seidos> [Jun 21 21:33:32] bgs100, goto continue:?
774 <seidos> [Jun 21 21:33:56] how did the conversation on heaven relate to C anyway?
775 <pedro3005> [Jun 21 21:33:56] goto class
776 <seidos> [Jun 21 21:34:06] ha
777 <seidos> [Jun 21 21:34:09] I still don't really get classes
778 <seidos> [Jun 21 21:34:14] recursive functions are also a trip
779 <pedro3005> [Jun 21 21:34:19] seidos, it didn't, I abruptly changed it to Hume
780 <Snova> [Jun 21 21:34:29] recursion is easy; making it stop is somewhat harder :p
781 <bgs100> [Jun 21 21:35:38] Wait
782 <bgs100> [Jun 21 21:35:42] Almost done reading logs
783 <seidos> [Jun 21 21:35:49] hmmm, I wouldn't say it's easy. I'll have to review code presented in class to attempt construction a recursive f(x)
784 <bgs100> [Jun 21 21:36:16] This amused me: "<seidos> this reminds me of when I asked in #jesus if I got tired of being in heaven if I could just kill myself"
785 <bgs100> [Jun 21 21:36:22] :p
786 <seidos> [Jun 21 21:36:34] sadly, they said yes
787 <bgs100> [Jun 21 21:36:40] ...
788 <seidos> [Jun 21 21:37:06] I have the log, maybe I'll go back and reread my conversations in there for kicks
789 <seidos> [Jun 21 21:37:12] or...not
790 <bgs100> [Jun 21 21:37:25] xD
791 <bgs100> [Jun 21 21:37:57] Well
792 <bgs100> [Jun 21 21:38:05] We've covered most of the actual language
793 <bgs100> [Jun 21 21:38:18] We're going to continue with more of the standrad library
794 <bgs100> [Jun 21 21:38:45] standard*
795 <bgs100> [Jun 21 21:38:47] >:P
796 <seidos> [Jun 21 21:39:02] I'm with ya'
797 <bgs100> [Jun 21 21:39:04] I think I've been punished for using goto via my keyboard
798 <bgs100> [Jun 21 21:40:09] hmm
799 <bgs100> [Jun 21 21:40:21] pedro3005, seidos What are you impressions of C and this class?
800 <bgs100> [Jun 21 21:41:26] oh sure, so talkative 8 minutes ago :p
801 <seidos> [Jun 21 21:42:08] well, some thoughts off the top of my head. I really didn't think I could even get the basic ideas of C, but after the classes, and the hw, it looks like I actually was able to piece together some *very* basic programs
802 <seidos> [Jun 21 21:42:35] which has left me feeling more confident to tackle more challenging problems
803 <bgs100> [Jun 21 21:42:46] :D
804 <seidos> [Jun 21 21:42:55] I still don't get the result in one of my hw assignments though, even after beating my head against over and over
805 <bgs100> [Jun 21 21:42:58] Well that's good :)
806 <seidos> [Jun 21 21:43:08] s/against/against it
807 <bgs100> [Jun 21 21:43:10] seidos, Okay, which assignment?
808 <seidos> [Jun 21 21:43:20] the array assignment
809 <seidos> [Jun 21 21:43:25] where we were supposed to sum
810 <seidos> [Jun 21 21:43:45] I extrapolated out the summation (at least I think), but I got a totally different answer
811 <bgs100> [Jun 21 21:43:54] Okay, can you re-link to the pastebins?
812 <seidos> [Jun 21 21:44:12] if I drop the i's top value, it turns out to be the right answer when I do it manually on a calculator
813 <seidos> [Jun 21 21:44:14] yeah
814 <bgs100> [Jun 21 21:44:43] Also
815 <seidos> [Jun 21 21:44:45] http://paste.ubuntu.com/453127/
816 <bgs100> [Jun 21 21:44:54] okay
817 <bgs100> [Jun 21 21:45:04] seidos, Here is the problem
818 <bgs100> [Jun 21 21:45:12] int input[10];
819 <pedro3005> [Jun 21 21:45:18] I don't feel safe with structs
820 <bgs100> [Jun 21 21:45:22] You declare input to have a length of 10
821 <pedro3005> [Jun 21 21:45:25] I don't think I can use them quite well
822 <bgs100> [Jun 21 21:45:28] pedro3005, Okay, one sec
823 <Snova> [Jun 21 21:45:31] looping from 0 to 10 inclusive will iterate ELEVEN times
824 <bgs100> [Jun 21 21:45:38] Yeah
825 <Snova> [Jun 21 21:45:40] your loop conditions should be < 10
826 <bgs100> [Jun 21 21:45:47] seidos, And thus you try to access input[10]
827 <Snova> [Jun 21 21:45:58] remember in an array of length 10, the indexes are 0-9 inclusive
828 <bgs100> [Jun 21 21:46:04] When your elemtns only go from input[0] to input[9]
829 <bgs100> [Jun 21 21:46:13] elements*
830 <seidos> [Jun 21 21:46:31] but shouldn't both loops have the same number of iterations?
831 <bgs100> [Jun 21 21:46:36] seidos, Yes
832 <Snova> [Jun 21 21:46:47] yes. and they should be running 10 times each, but they're running 11 iterations
833 <bgs100> [Jun 21 21:47:00] So replace "i<11" with "i<10" in both of them
834 <Snova> [Jun 21 21:47:02] which is, at the least, one problem
835 <seidos> [Jun 21 21:47:21] ah
836 <bgs100> [Jun 21 21:47:34] Besides that it looks fine
837 <seidos> [Jun 21 21:47:37] wait, I still don't get
838 <seidos> [Jun 21 21:47:38] it
839 <bgs100> [Jun 21 21:47:51] What don't you get?
840 <seidos> [Jun 21 21:47:55] but you're saying if I change both loops to i<10 then it will work?
841 <Snova> [Jun 21 21:48:06] maybe, maybe not, but it's a bug nonetheless
842 <seidos> [Jun 21 21:48:09] I take in 11 inputs
843 <seidos> [Jun 21 21:48:15] then it adds 11 times
844 <Snova> [Jun 21 21:48:21] but your array only has 10 elements
845 <seidos> [Jun 21 21:48:22] it should come out to the right value
846 <bgs100> [Jun 21 21:48:22] Yes, because that way you won't be trying to access input[10]
847 <seidos> [Jun 21 21:48:29] ohhhhh
848 <seidos> [Jun 21 21:48:30] crap
849 <bgs100> [Jun 21 21:48:33] :P
850 <seidos> [Jun 21 21:48:43] so it's 0 to 9
851 <seidos> [Jun 21 21:48:44] dang it
852 <bgs100> [Jun 21 21:48:51] Yes
853 <bgs100> [Jun 21 21:48:57] seidos, Get it now?
854 <seidos> [Jun 21 21:49:19] I won't believe until it's compiled and shows the right answer :P
855 <Snova> [Jun 21 21:49:30] seidos: also, something worth mentioning is there is a shorthand for "sum = sum + input[i];", the += operator. "sum += input[i]" is equivalent, and there are many other compound operators like this (+=, -=, *=, /=, etc.)
856 <Snova> [Jun 21 21:49:57] I don't think it will change the fact that it's wrong, unless you're trashing the stack somehow...
857 <Snova> [Jun 21 21:50:09] but there's no obvious problems; it's a simple sum
858 <bgs100> [Jun 21 21:50:20] Compiled the fix and it works
859 <seidos> [Jun 21 21:50:25] I never would've found that problem
860 <seidos> [Jun 21 21:50:40] I was looking in the loops for the problem when it was in my array declaration :(
861 <bgs100> [Jun 21 21:50:45] Er
862 <seidos> [Jun 21 21:50:52] well, I guess it could have been the loops if I reduced both of them to 10
863 <bgs100> [Jun 21 21:50:56] I would say it was a problem with your loops :p
864 <seidos> [Jun 21 21:51:02] but that didn't make sense without knowing why
865 <Snova> [Jun 21 21:51:09] bgs100: only if 10 is necessarily better than 11 somehow :p
866 <bgs100> [Jun 21 21:51:11] Well, now ya know why
867 <bgs100> [Jun 21 21:51:21] Snova, Pshaw, of course it is
868 <bgs100> [Jun 21 21:51:25] Well
869 <Snova> [Jun 21 21:51:29] not in base 11!
870 <bgs100> [Jun 21 21:51:33] Except for 11 being a number-palindrome
871 <Snova> [Jun 21 21:51:38] and it's prime
872 <bgs100> [Jun 21 21:51:41] Mm
873 <Snova> [Jun 21 21:51:45] hmmmmm
874 <bgs100> [Jun 21 21:51:45] Good point
875 <Snova> [Jun 21 21:51:51] number systems based on prime numbers
876 <bgs100> [Jun 21 21:52:01] And there's a multiple of it in "1337"
877 <bgs100> [Jun 21 21:52:17] Yeah, 11 is pretty awesome
878 <bgs100> [Jun 21 21:52:35] Oh, and we're up to the 11th Doctor :p
879 <seidos> [Jun 21 21:52:38] the += operator is a trip
880 <pedro3005> [Jun 21 21:52:56] lol
881 <bgs100> [Jun 21 21:52:59] Snova, Your arguments have changed my mind!
882 <pedro3005> [Jun 21 21:53:00] it's easy
883 <bgs100> [Jun 21 21:53:03] 11 pwns 10
884 <Snova> [Jun 21 21:53:05] bgs100: :|
885 <pedro3005> [Jun 21 21:53:06] x = x + y
886 <pedro3005> [Jun 21 21:53:09] x += y
887 <bgs100> [Jun 21 21:53:12] Snova, What? :p
888 <seidos> [Jun 21 21:53:25] there's a variable in that +=
889 <seidos> [Jun 21 21:53:29] that's weird
890 <Snova> [Jun 21 21:53:34] bgs100: nothing. there should be a number system based on primes though, instead of the arbitrary "ten"
891 <seidos> [Jun 21 21:53:35] :D
892 <pedro3005> [Jun 21 21:53:51] Good night.
893 <seidos> [Jun 21 21:53:55] a number system based on primes?
894 <Snova> [Jun 21 21:53:56] g'night
895 <bgs100> [Jun 21 21:53:57] Night pedro3005
896 <seidos> [Jun 21 21:53:58] night pedro3005
897 <seidos> [Jun 21 21:54:06] ah
898 <seidos> [Jun 21 21:54:08] 2 is prime
899 <bgs100> [Jun 21 21:54:09] Snova, Ten isn't arbitary! It's ten in base ten!
900 <bgs100> [Jun 21 21:54:14] :P
901 <seidos> [Jun 21 21:54:38] so base 2 is a number system based on a prime number
902 <bgs100> [Jun 21 21:54:44] Whatever base 10 may happen to be
903 <Snova> [Jun 21 21:55:03] not quite what I meant... I don't really know what I mean
904 <bgs100> [Jun 21 21:55:08] Lol
905 <Snova> [Jun 21 21:55:13] they wouldn't be primes anymore
906 <bgs100> [Jun 21 21:55:19] 0_0
907 <bgs100> [Jun 21 21:55:33] wwhhoooaaaa
908 <bgs100> [Jun 21 21:56:36] Actually
909 <bgs100> [Jun 21 21:56:47] Why wouldn't they be?
910 <bgs100> [Jun 21 21:56:54] <mathclass>
911 <Snova> [Jun 21 21:57:35] because as soon as you count to four in your prime-based number system, you meet a number that isn't prime
912 <Snova> [Jun 21 21:57:39] </mathclass>
913 <seidos> [Jun 21 21:59:16] does that mean the primes are different based on the base?
914 * seidos [Jun 21 21:59:45] shakes head
915 <bgs100> [Jun 21 22:00:11] :/
916 <Snova> [Jun 21 22:00:22] I was thinking of counting in primes
917 <bgs100> [Jun 21 22:00:23] Oh
918 <bgs100> [Jun 21 22:00:27] I misunderstood
919 <Snova> [Jun 21 22:00:31] instead of 1,2,3,4,5 we'd go 2,3,5,7,11
920 <bgs100> [Jun 21 22:00:43] Ah...
921 <Snova> [Jun 21 22:00:45] except those numbers are only primes in base ten
922 <bgs100> [Jun 21 22:00:50] Yeah
923 <Snova> [Jun 21 22:00:52] 7 would be 4, and not prime
924 <bgs100> [Jun 21 22:00:52] Also
925 <bgs100> [Jun 21 22:00:56] FRREEE UNNIICOODEEE
926 <bgs100> [Jun 21 22:00:59] І wіη, ⅿυаҺаҺаҺа. Моаr ÑоⅼօrÑ•!
927 <Snova> [Jun 21 22:01:01] also, I have no idea what the heck it would be useful for
928 <seidos> [Jun 21 22:01:13] so it would be different, but not really
929 <seidos> [Jun 21 22:01:26] I mean 7 is still 7, even if it's represented as a different number in a different base
930 <Snova> [Jun 21 22:02:13] yes, but the fourth number in any number system is divisible by the second number
931 <Snova> [Jun 21 22:02:17] 3 * 3 = 7
932 <bgs100> [Jun 21 22:03:03] & * & = (((
933 <bgs100> [Jun 21 22:03:05] :p
934 <bgs100> [Jun 21 22:03:18] Hmm
935 * bgs100 [Jun 21 22:03:39] imagines a number system where O + M + G = 0_0
936 * seidos [Jun 21 22:03:46] tries to count in binary
937 <seidos> [Jun 21 22:03:56] I have to convert it to count
938 <Snova> [Jun 21 22:03:58] 1, 10, 11, 100, 101, 110, 111
939 <Snova> [Jun 21 22:04:03] not hard
940 <bgs100> [Jun 21 22:04:20] Just carrying some numbers every other time :P
941 <seidos> [Jun 21 22:04:24] so 0100 is divisible by 0010
942 <seidos> [Jun 21 22:04:29] crap, I almost said visible
943 <Snova> [Jun 21 22:04:30] yes, lots and lots of carrying
944 <seidos> [Jun 21 22:04:32] hmmm that works
945 <Snova> [Jun 21 22:04:36] and I can't do anything in it except count :p
946 <Snova> [Jun 21 22:04:53] well, I can see that, since if only one bit is set it's a power of two
947 <bgs100> [Jun 21 22:05:36] 111 + 10 = 1001
948 <bgs100> [Jun 21 22:05:40] I think? :p
949 <seidos> [Jun 21 22:05:52] I don't know how to add in binary without converting
950 <Snova> [Jun 21 22:05:59] hrm
951 <seidos> [Jun 21 22:06:04] to base 10...well, or using a calculator
952 <Snova> [Jun 21 22:06:07] 1101?
953 <Snova> [Jun 21 22:06:18] no, bgs was right
954 <bgs100> [Jun 21 22:06:21] Yeah
955 <Snova> [Jun 21 22:06:27] I could probably do it on paper
956 <bgs100> [Jun 21 22:06:31] yes
957 <bgs100> [Jun 21 22:06:33] Like:
958 <bgs100> [Jun 21 22:06:37] 111
959 <seidos> [Jun 21 22:06:39] ah, carrying
960 <bgs100> [Jun 21 22:06:40] 010
961 <bgs100> [Jun 21 22:06:42] +
962 <bgs100> [Jun 21 22:06:45] ___
963 <seidos> [Jun 21 22:06:56] 1001
964 <bgs100> [Jun 21 22:07:10] right
965 <seidos> [Jun 21 22:07:15] makes sense
966 <seidos> [Jun 21 22:07:21] now how do you multiply?
967 <bgs100> [Jun 21 22:07:22] mhm
968 <bgs100> [Jun 21 22:07:26] ...
969 <seidos> [Jun 21 22:07:32] 111
970 <seidos> [Jun 21 22:07:33] *
971 <seidos> [Jun 21 22:07:35] 010
972 <seidos> [Jun 21 22:07:37] ____
973 <bgs100> [Jun 21 22:07:58] 1110?
974 <seidos> [Jun 21 22:08:12] I dunno, I just keep anding it basically
975 <bgs100> [Jun 21 22:08:20] Let's convert and see if I'm right
976 <bgs100> [Jun 21 22:08:31] 7 * 2
977 <seidos> [Jun 21 22:08:34] yeah
978 <bgs100> [Jun 21 22:08:40] 14
979 <bgs100> [Jun 21 22:08:41] Yes
980 <bgs100> [Jun 21 22:08:44] I am right :D
981 <seidos> [Jun 21 22:08:44] I used the binary calculator in gnome
982 * bgs100 [Jun 21 22:08:58] does a little dance
983 <seidos> [Jun 21 22:09:10] how'd you do it?
984 <seidos> [Jun 21 22:09:14] what is 1 * 0 if not 0?
985 <bgs100> [Jun 21 22:09:14] Well
986 <bgs100> [Jun 21 22:09:18] seidos,
987 <bgs100> [Jun 21 22:09:24] 0 * 111 = 0
988 <seidos> [Jun 21 22:09:41] ah
989 <bgs100> [Jun 21 22:09:42] 1 (in the next place) * 111 = 111 (one place up)
990 <bgs100> [Jun 21 22:09:45] which is 1110
991 <seidos> [Jun 21 22:09:49] ah distributing it
992 <seidos> [Jun 21 22:09:52] forgot to do that
993 <seidos> [Jun 21 22:09:53] and add
994 <bgs100> [Jun 21 22:09:56] It was literally 10 * 1111
995 <bgs100> [Jun 21 22:10:01] er
996 <bgs100> [Jun 21 22:10:03] 111*
997 <Snova> [Jun 21 22:10:08] now do 100/10
998 <Snova> [Jun 21 22:10:18] never mind
999 <bgs100> [Jun 21 22:10:21] 10
1000 <bgs100> [Jun 21 22:10:32] amiright? :p
1001 <Snova> [Jun 21 22:10:43] annoyingly enough you're right in both base 2 and base 10 :p
1002 <bgs100> [Jun 21 22:10:51] :D
1003 * bgs100 [Jun 21 22:11:07] declares himself binary expert! :p
1004 <seidos> [Jun 21 22:11:26] still don't get the division
1005 <bgs100> [Jun 21 22:11:31] Well
1006 <seidos> [Jun 21 22:11:35] can't do it on paper, get the * though
1007 <bgs100> [Jun 21 22:11:40] Do it like in decimal
1008 <bgs100> [Jun 21 22:11:56] ___
1009 <seidos> [Jun 21 22:12:04] ha!
1010 <bgs100> [Jun 21 22:12:05] 10|100
1011 <Snova> [Jun 21 22:12:11] 6 + 6 = C
1012 <bgs100> [Jun 21 22:12:20] 10 goes into 1 zero times
1013 <bgs100> [Jun 21 22:12:28] 10 goes into 10 1 tim
1014 <bgs100> [Jun 21 22:12:32] time*
1015 <bgs100> [Jun 21 22:12:38] 10 goes into the next 0 0 times
1016 <bgs100> [Jun 21 22:12:40] thus 010
1017 <bgs100> [Jun 21 22:13:01] Snova, :p
1018 <seidos> [Jun 21 22:13:22] 10000000/10 = 100000
1019 <seidos> [Jun 21 22:13:46] I'm doing it on paper to help me visualize it
1020 <bgs100> [Jun 21 22:13:51] I remember for you fathers day I got some hexadecimal numbers and got my Dad to add them. The answer was DAD
1021 <bgs100> [Jun 21 22:13:57] s/you/one/
1022 <Snova> [Jun 21 22:14:14] heh
1023 <Snova> [Jun 21 22:14:40] geek seems to run in the family
1024 <bgs100> [Jun 21 22:14:42] This year I made him decode some various ciphertext :p
1025 <Snova> [Jun 21 22:14:49] hahaha
1026 <seidos> [Jun 21 22:15:17] I just sent my Dad an email
1027 <bgs100> [Jun 21 22:15:28] Although I basically had to spell out for him how to use the Vignere cipher even though I had told him before :p
1028 <bgs100> [Jun 21 22:15:56] The key was the answer to some other ciphertext :p
1029 <Snova> [Jun 21 22:16:02] haha
1030 <bgs100> [Jun 21 22:17:02] Snova, But yeah. My Dad is very much into math.
1031 <seidos> [Jun 21 22:17:59] my Dad isnt really into math
1032 <seidos> [Jun 21 22:18:10] the only person really into math are my brother and I
1033 <bgs100> [Jun 21 22:18:16] Ah
1034 <seidos> [Jun 21 22:18:34] my brother specialized in AutoCAD, and makes a living at it
1035 <seidos> [Jun 21 22:18:59] I have no specialty
1036 <bgs100> [Jun 21 22:20:50] Sometimes my dad drags me over to him and attempts to teach me some math, and occasionally I try to teach him some Python/C/Common Lisp/Shell/Various other stuff :p
1037 <seidos> [Jun 21 22:21:41] my Dad has tried to teach me anthropology, I think
1038 <seidos> [Jun 21 22:22:02] trying to remember the stuff he's talked about
1039 <seidos> [Jun 21 22:23:09] he did a study on left vs right handedness
1040 <seidos> [Jun 21 22:23:16] not sure what the hypothesis was
1041 <seidos> [Jun 21 22:24:03] I should call him and ask someday