code logs -> 2007 -> Tue, 11 Dec 2007< code.20071210.log - code.20071212.log >
--- Log opened Tue Dec 11 00:00:30 2007
00:11 ChalcyNap is now known as Chalcedon
00:27 gnoham [lenin@85.8.5.ns-20483] has quit [Quit: Z?]
00:54 You're now known as TheWatcher[T-2]
00:55 Vornicus [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
00:58 Vornicus [~vorn@Admin.Nightstar.Net] has joined #code
00:58 mode/#code [+o Vornicus] by ChanServ
01:10 You're now known as TheWatcher[zZzZ]
01:54
<@McMartin>
17:53 <@Randolph> News: Starbase Warfare Allowed Again
01:54
<@McMartin>
17:53 <@Randolph> (lol QA)
01:54
<@McMartin>
17:54 < McMartin> Your shipment of fail has been temporarily delayed
01:54
<@McMartin>
17:55 <@Randolph> FAIL, QTY: 1, STATUS: in stock [BUY IT NOW]
01:56
<@Reiver>
?
01:57
<@Reiver>
Oh, seige weapons?
01:57
< Doctor_Nick>
yeah
01:57
< Doctor_Nick>
ccp is fuckin us again
01:57
<@Reiver>
One must wonder how the hell they got it /wrong/, and all.
01:58
<@McMartin>
The "blows away your boot config" was apparently an extra backslash combined with an utterly braindead file naming scheme.
01:59
< Doctor_Nick>
this whole fiasco has made me want to quit the game
01:59
<@Reiver>
...wait, what
02:00
<@McMartin>
So, before the "PvP is now a bannable offense, lol" bit I was posting the bits regarding "If you install the premium graphics update, your machine will no longer boot" stuff.
02:00
<@McMartin>
Becuase it would delete C:\boot.ini as part of the install process.
02:00
<@McMartin>
Instead of, well, {EVE Install dir}\boot.ini.
02:00
< Doctor_Nick>
only on XP though!
02:02
<@Reiver>
...
02:02
<@Reiver>
I... see.
02:03
<@Reiver>
And this escaped beta testing how?
02:03
< Doctor_Nick>
i dont know
02:04
< Doctor_Nick>
a myth 2 patch reformatted the partition it was on
02:04
< Doctor_Nick>
how did that escape beta testing? WHO KNOWS?!
02:05
<@McMartin>
I thought that was the Myth 2 uninstaller.l
02:05
< Doctor_Nick>
rite
02:10
<@Reiver>
I guess that's a thorough method of uninstalling...~
02:11 * McMartin will guess it slipped through beta testing since they were testing on a scratch drive.
02:11
<@McMartin>
"Yup, it's gone."
02:12 * Reiver nods.
02:41 ilovefire [~santros_v@209.82.191.ns-11321] has joined #code
02:45
<@Vornicus>
So, I really only have two things I wish to teach you, and then I think we can do a more complicated Exercise.
02:46
<@Vornicus>
The first thing, is xrange.
02:46
<@Vornicus>
Try this: for k in xrange(5): print k
02:46
< Doctor_Nick>
XRAAAANGGE!!! WOOO!
02:46
<@Vornicus>
(with appropriate newlining and indenting)
02:49
< ilovefire>
gives me 0, 1, 2, 3, and 4. In seperate lines.
02:49
<@Vornicus>
okay, now try: for k in xrange(2,5): print k
02:50
< ilovefire>
gives me 2, 3, and 4.
02:51
<@Vornicus>
and now: for k in xrange(0,10,2)
02:51
<@Vornicus>
(with the other goodies in there too)
02:51
< ilovefire>
gives me 0, 2, 4, 6, and 8.
02:51
<@Vornicus>
See how xrange works now?
02:51
< ilovefire>
Yes.
02:52
<@Vornicus>
Good.
02:52
<@Vornicus>
now, the other thing I want to show you, is break.
02:52
<@Vornicus>
What if we find ourselves in a loop, and want to stop, because some condition has been met?
02:52
< ilovefire>
Let me guess, put in a break
02:52
< ilovefire>
?
02:52
<@Vornicus>
Yep.
02:53
<@Vornicus>
break takes you past the very end of the innermost loop we're in.
02:53 * ilovefire nods. "And we do that how?"
02:53
< ilovefire>
Ah, okay
02:54
<@Vornicus>
for k in xrange(10): print "trying",k; if 77 % k == 0: print k,"works!"; break
02:55
<@Vornicus>
...oh, that won't work
02:55
<@Vornicus>
for k in xrange(2,10): print "trying",k; if 77 % k == 0: print k,"works!"; break
02:55
<@Vornicus>
that will.
02:55
<@Vornicus>
(the previous would give divide-by-zero)
02:56 Vornicus changed the topic of #Code to: It's like swiss bank accounts, but for coders! | Have a pastebin! http://rafb.net/paste | Channel mode +U, ask for voice to post links.
02:57 mode/#code [+oo Doctor_Nick ilovefire] by Vornicus
02:59
<@Vornicus>
break is another keyword, so you know the drill.
03:00 * ilovefire nods.
03:00 * ilovefire also updates his referance .txt.
03:01
<@Vornicus>
Okay. Those are the two things I wanted to teach. Now, for the Exercise: write a program that finds all the prime numbers from 0 to 1000, and prints them.
03:02
<@Vornicus>
from 2 to 1000, rather; 0 and 1 are neither prime nor composite, and should not be talked about.
03:02 * ilovefire nods.
03:02
<@Vornicus>
I expect you to have a lot of questions; do not hesitate to ask.
03:06
<@ilovefire>
Umm, Lesse.
03:08 * ilovefire gets lost rather quickly.
03:09
<@Vornicus>
How do you tell if a number is prime?
03:09
<@ilovefire>
if it is only divisible by itself and one.
03:10
<@Vornicus>
Okay. So, it's not divisible by any other numbers.
03:10
<@ilovefire>
Right...
03:10
<@Vornicus>
But, do we have to check every other number?
03:11
<@ilovefire>
Probably not, I'd say.
03:12
<@Vornicus>
Well, is a number ever divisible by a number larger than it?
03:12
<@ilovefire>
No.
03:12
<@Vornicus>
Okay.
03:13
<@Vornicus>
So we don't have to check numbers larger than it, or equal to it (because every number is divisible by itself, so it doesn't make sense to check), or smaller than 2.
03:13
<@Vornicus>
But there's something else.
03:13
<@Vornicus>
http://mathworld.wolfram.com/FundamentalTheoremofArithmetic.html <--- mee the Fundamental Theorem Of Arithmetic.
03:14
<@ilovefire>
Is this going to make my brain hurt?
03:14
<@Vornicus>
not really.
03:14
<@Vornicus>
What it says is, every number can be expressed as a product of prime numbers in exactly one way.
03:14
<@ilovefire>
Okay.
03:15
<@ilovefire>
So, is, um... for some reason I get the feeling factorization is going to be involved?
03:15
<@Vornicus>
So, here's the question: given a number n and a smaller number k such that n is divisible by k, Are there any numbers p such that k is divisible by p, but n is /not/ divisible by p?
03:16
<@ilovefire>
... Okay.
03:16
<@ilovefire>
Give me a moment so I can wrap my brain around that.
03:16
<@Vornicus>
okay.
03:18
<@ilovefire>
so, basically, something like, err.
03:18
<@ilovefire>
n, k < n, n/k is an integer, k/p is an integer, n/p is not?
03:18
<@Vornicus>
Right. oh, and n, k, and p are integers, and p < k
03:19 * ilovefire nods.
03:19
<@Vornicus>
(for the record, this is laying a groundwork to create an algorithm that will tell you if a given number is prime, if you have the primes below it)
03:19
<@ilovefire>
Now, I have to translate this into some sort of list, yes?
03:20
<@Vornicus>
Well, eventually. Right now we're just figuring out what it is we have to do.
03:20
<@Vornicus>
This should be some figuring, and we're not even looking at Python yet.
03:21 C_tiger [~c_wyz@Nightstar-5378.nycmny.east.verizon.net] has joined #code
03:21 * ilovefire scratches his head. "Now is probably a bad time to realize just how bad I am at math...
03:21
<@ilovefire>
"
03:21
< C_tiger>
There's #math for that.
03:21
<@Vornicus>
Heh.
03:22
<@Vornicus>
Consider this.
03:22
<@Vornicus>
Given n/k and k/p, can you get n/p?
03:22
<@Doctor_Nick>
you're a math
03:22
<@Vornicus>
(this should be /obvious/)
03:23
< C_tiger>
Hey Doctor Nick
03:23
<@ilovefire>
if n = k, and k = p, but umm, then n = p so it'd just be one so I'm wrong, in all likelyhood.
03:23
<@Doctor_Nick>
hay
03:24
<@Vornicus>
You're thinking in the wrong direction: what do you have to do to n/k and k/p to get n/p?
03:24
<@ilovefire>
remove the k?
03:24
<@Doctor_Nick>
ilovefire: remember in algebra where you would do multiplying and dividing to get rid of terms
03:24
<@Doctor_Nick>
do that
03:24
<@ilovefire>
Doctor, it's been three years since I had a decent algebra teachers.
03:24
<@ilovefire>
... teacher.
03:25
<@Doctor_Nick>
=(
03:25
< C_tiger>
Ok, trial and error. What happens when you multiply them, what happens when you divide them?
03:26
<@ilovefire>
well, if you multiply both of them by k, then sort of add them together somehow... this is probably wrong as well.
03:26
<@Vornicus>
Yeah, that's not it.
03:26
<@Vornicus>
You don't have to multiply them both by anything.
03:27
< C_tiger>
Ok, how do you multiply fractions?
03:27
<@ilovefire>
wait, fractions? D'oh, I was treating them like, err, well, a statement of division.
03:27
< C_tiger>
Which are essentially fractions.
03:27
<@ilovefire>
You multiply, umm... diagonally is the best way I can put it?
03:27
<@Vornicus>
not diagonally.
03:27
< C_tiger>
A fraction is just the top number divided by the bottom number.
03:27
<@ilovefire>
the... top one and the... bottom one on the next one, and the bottom on the first by the top on the seocnd?
03:28
< C_tiger>
That's addition... sortof.
03:28
<@ilovefire>
Oh.
03:28
<@ilovefire>
err.
03:28
< C_tiger>
Ok, concrete examples.
03:28
< C_tiger>
What is 1/2 of 1/3?
03:30
<@ilovefire>
1/6.
03:30
< C_tiger>
Ok, one more example: what is 1/2 of 3/4?
03:31
<@ilovefire>
3/8...
03:31
< C_tiger>
Great. How did you do that?
03:31
<@Vornicus>
and what's 2/3 of 3/5?
03:32
<@ilovefire>
... I, umm, mupliplied the... bottoms together, adn the tops? (this would be easier if I could remember which one was the numerator and which was the denominator.)
03:32
<@ilovefire>
... *multiplied.
03:32
< C_tiger>
Numerator is on top.
03:32
<@ilovefire>
Also it would be easier if I could spell.
03:32
<@ilovefire>
Okay.
03:32
< C_tiger>
Right.
03:32
<@Vornicus>
Yes, and right.
03:32
< C_tiger>
So now, on to Vorn's question: 2/3 * 3/5
03:34
<@ilovefire>
6/15, which can be simplified to 2/5.
03:34
<@Vornicus>
Okay.
03:34
<@Vornicus>
now, n/k * k/p
03:35
<@ilovefire>
kn/kp, which can be simplified to n/p?
03:35
< C_tiger>
Yay!
03:35
<@Vornicus>
Now, we know n/k and k/p are integers.
03:36
<@Vornicus>
Do there exist, in all the universe, two integers that when multiplied together give something that's /not/ an integer?
03:37
<@ilovefire>
no.
03:37
<@Vornicus>
Okay. So, then, for any number n, to see if it's divisible by some k, you need only see if it's divisible by the things k is divisible by.
03:37
< C_tiger>
Yep, because Z is closed under multiplication.
03:38
<@Vornicus>
C: ;_;
03:38
< C_tiger>
Sorry.
03:38
< C_tiger>
Ignore me.
03:38
< C_tiger>
It just occurred to me what Vorn is trying to do?
03:39
<@Doctor_Nick>
math!
03:39
<@Vornicus>
So, any number k, what's it divisible by?
03:40
<@ilovefire>
Well, depends on what number k is, but most definately at least 1 and k.
03:40
<@Vornicus>
Okay, what other numbers could k be divisible by.
03:42
<@ilovefire>
Without knowing what number k is, I really can't tell... or am I missing something again?
03:44
<@Vornicus>
Well, if k is prime, the only numbers it's divisible by are 1 and k, right. But if k is composite, you can divide it by some other numbers.
03:44
<@ilovefire>
Right...
03:44
<@Vornicus>
And those numbers could be prime or composite.
03:44
<@ilovefire>
Right...
03:44
<@Vornicus>
And if those numbers are composite, you can divide those by other numbers.
03:45
<@Vornicus>
And /those/ numbers could be prime or composite.
03:45
< C_tiger>
Prime factorization is the fancy word for it.
03:45
<@Vornicus>
but... it only goes so far down. Eventually you run out of numbers that aren't prime.
03:45 * ilovefire nods.
03:45
<@Vornicus>
And, indeed, eventually all numbers end up being divisible by primes.
03:46
<@ilovefire>
So, just theoretically, if you could find the largest prime number in a set, then you could use that to find all other prime numbers, or...?
03:46
<@Vornicus>
So, since we can certify that a number n is not divisible by a number k if there is a number p that divides k but not n...
03:47
<@Vornicus>
And since there's always a pile of primes at the bottom of the chain of numbers that k is divisible by...
03:47
< C_tiger>
Ok... as much as I love number theory...
03:47
<@Vornicus>
Do we really need to test composite numbers?
03:47
<@ilovefire>
Err... no?
03:47
<@Vornicus>
Okay.
03:47
< C_tiger>
We're doing this by sieving?
03:48
<@ilovefire>
Urg... bad news, I have to log off in ten minutes.
03:48
<@Vornicus>
C_tiger: yes.
03:48
<@Vornicus>
ilf: dang.
03:48
< C_tiger>
Can't we just do it by test division?
03:48
<@ilovefire>
Good news, with all this there's a good chance I'll be dreaming about numbers tonight.
03:48
<@Vornicus>
Seiving and test division are the same thing!
03:49
< C_tiger>
I thought sieving means going through and striking every second number, then every third, etc.
03:49
<@Vornicus>
Well, okay, the difference is, seiving you start with a big list of numbers, and test division you don't.
03:49
< C_tiger>
Test division means testing each number one at a time.
03:50
<@Vornicus>
it's like breadth-first vs. depth-first.
03:50
< C_tiger>
Yeah, but one is a whole lot easier to explain.
03:51
< C_tiger>
Ok, totally backtracking ilf, so you can solve this before you leave: how would you test if a single number was prime?
03:52
<@ilovefire>
Go down a list of numbers between that number and one, and see if it's divisible by any of them?
03:52
< C_tiger>
Great.
03:52
< C_tiger>
So can you write a piece of code to do that?
03:53
<@Vornicus>
(hint: a is divisible by b if a % b == 0)
03:54
<@ilovefire>
C: I could, yes, but I was just told to go ahead and shut down the computer. but it'd go something like def something things with things... argh, sorry.
03:54
< C_tiger>
Ok, think about it.
03:55 * ilovefire will, will try to write it tommarrow.
03:55
< C_tiger>
Ok.
03:56
< C_tiger>
You can always try the programmer's favorite: the pencil-paper code.
03:56
<@Vornicus>
Python is executable pseudocode! :P
03:56 ilovefire [~santros_v@209.82.191.ns-11321] has quit [Quit: Hmm, is it NORMAL for this, err, sort of jellyfish looking thing, with, umm, the fangs to be, well, humping my face? I also feel weak for some reason...]
03:56
<@Doctor_Nick>
yeah
03:56
<@Doctor_Nick>
pencil and paper code is by far the most reliable
03:56
<@Doctor_Nick>
it's just really slow!
03:57
< C_tiger>
I used to hate it.
03:57
< C_tiger>
Go into exams and have to write programs by hand.
03:57
<@Vornicus>
I nearly killed the one guy who tried that on me.
03:57
< C_tiger>
I only took two CS classes, both had pencil-only finals.
03:58
< C_tiger>
They SUCKED.
03:58
<@Doctor_Nick>
C_tiger: entire programs or code segments?
03:58
<@Vornicus>
After the first exam I walked up to him, put my hand in front of his face, and slowly closed it... making every joint in my hand pop.
03:58
<@Vornicus>
Then I said "that freaking hurt."
03:58
< C_tiger>
Simple programs, but sometimes entire programs.
03:59
<@Doctor_Nick>
Pencil and paper (for comparison) 0.0119 IPS
03:59
<@Doctor_Nick>
SONY PS3 (1PPE + 7SPEs) 230,400 MIPS (217600 MFLOPS) at 3.2 GHz
03:59
< C_tiger>
I think the worst one I wrote was 60 lines long (not counting close-braces)
04:02
< C_tiger>
I remember being pissed because of the 30 points for that question, I lost 3 for not using descriptive variable names (damned if I was going to write numberOfDiceThrownSoFar a dozen times) and another 5 for not indenting my loops at all.
04:03
<@Doctor_Nick>
yeah
04:03
<@Doctor_Nick>
introductory programming courses are like that
04:03
<@Doctor_Nick>
they suck balls
04:03
< C_tiger>
They do, which is why I never majored in CS.
04:04
<@jerith>
It's bad enough writing code like that. Have you ever tried marking it?
04:06
< C_tiger>
Their fault. My code projects were perfect.
04:06
<@jerith>
I used to tutor one of those courses.
04:06
< C_tiger>
I've had to mark 4 pages of someone trying to fudge Navier-Stokes in a circular spinning tube. It's a similar kind of pain.
04:07
<@jerith>
300 papers, 2-4 pages pf handwritten code in each.
04:07
< C_tiger>
Ok, you win.
04:07
<@Doctor_Nick>
why do they do this
04:07
<@jerith>
Due to scheduling messups, I had a weekend to do it in.
04:07
<@Doctor_Nick>
they have programming projects to test your programmin knowledge
04:08
< C_tiger>
At least where I was, there was a TA for every 10 students in the intro CS classes.
04:08
<@jerith>
Doctor_Nick: Because they're stupid.
04:08
<@jerith>
I had another guy marking with me, so we only did about 150 each.
04:09
< C_tiger>
Because in spite of all the controls and programs used to prevent cheating, inevitably on the easy programming projects people will cheat.
04:09 NSGuest-3333 [~sysop@67.183.91.ns-3660] has joined #code
04:09
< C_tiger>
After the intro classes, this becomes much harder as the possible solution paths diverge greatly.
04:10
< C_tiger>
So you sit the kiddies in a room give them time pressure and force them to code by hand.
04:11
< C_tiger>
Hey, question. Does anyone here use Windows XP?
04:12
< C_tiger>
Man, I feel worthless now. I'm going to go hide in a corner.
04:19
<@Doctor_Nick>
yeah
04:19
<@Doctor_Nick>
i use it on the computer i play video james on
04:22
< C_tiger>
You wouldn't happen to want to install Sage on it just to try it out would you?
04:22
< C_tiger>
Because I can't seem to get it to work and I'm really hoping it's not just me.
04:22
<@Doctor_Nick>
which sage
04:23
< C_tiger>
All the tech support is essentially for linux users.
04:23
<@Doctor_Nick>
the math program?
04:23
< C_tiger>
Yeah.
04:23
<@Doctor_Nick>
oh eez
04:23
<@Doctor_Nick>
geez
04:24
<@Doctor_Nick>
-us
04:24
<@Doctor_Nick>
the official windows version is just sage bundled with vmware
04:24
<@Doctor_Nick>
thats fantastic
04:24
< C_tiger>
Yeah.
04:24
< C_tiger>
And it hates me.
04:24
<@Doctor_Nick>
well, im not really surprised
04:24
< C_tiger>
Gee thanks.
04:25
<@Doctor_Nick>
running a huge complicated program on a virtual machine, well
04:25 * jerith does that all the time.
04:26
< C_tiger>
It's not even that.
04:26
<@Doctor_Nick>
lemme download this
04:26
< C_tiger>
Something's wrong with the way the server thing works.
04:27
<@jerith>
My job is making VMs for people to run huge complicated things on.
04:28
<@Vornicus>
Like, for instance, operating systems.
04:29
< C_tiger>
Yeah.
04:29
< C_tiger>
It looks fine in VMWare, but when I try to open a firefox page it doesn't find it.
04:30
<@Doctor_Nick>
oh, i thought you were talking about performance issues
04:34
< C_tiger>
Yeah, I'm just trying to figure out if anyone else has this problem.
04:34
<@Doctor_Nick>
well, its downloading
04:34
< C_tiger>
Thanks.
04:38 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
04:39 Syloq is now known as Syloqs-AFH
04:49
<@Doctor_Nick>
aaaaaaaa
04:49
< C_tiger>
?
04:49
<@Doctor_Nick>
this is taking forever
05:00
< C_tiger>
Yeah, sorry.
05:01
<@Doctor_Nick>
stupid question, but did you restart your computer after you installed the player?
05:03
< C_tiger>
Yes.
05:03
<@Doctor_Nick>
k
05:06
< C_tiger>
If it works for you, then my guess is it has something to do with my windows firewall
05:07
< C_tiger>
But I've fiddled with it with all different configs and it hasn't helped.
05:07
<@Doctor_Nick>
its working for me
05:07
< C_tiger>
Ok.
05:07
< C_tiger>
Sigh.
05:07
< C_tiger>
Thanks.
05:07
< C_tiger>
I really appreciate you trying.
05:08
<@Doctor_Nick>
hmm
05:09
<@Doctor_Nick>
It looks like vmware sets up some virtual network adapters on the system and then runs the server off of those
05:10
<@Doctor_Nick>
have you checked those out?
05:16
< C_tiger>
How?
05:16
< C_tiger>
I'm computer illiterate.
05:16
<@Doctor_Nick>
go to the control panel and open network connections, there should be a couple of "VMware network adapters"
05:18
< C_tiger>
Yeah.
05:19
<@Doctor_Nick>
dang
05:19
< C_tiger>
They're all there and connected.
05:20
<@Doctor_Nick>
have you tried reinstalling the player?
05:20
< C_tiger>
Yes... but it just occurred to me.
05:21
< C_tiger>
localhost probably refers to my other connection.
05:21
<@Doctor_Nick>
uhm
05:21
< C_tiger>
maybe I'll enter the ip address of one of these connections.
05:21
<@Doctor_Nick>
when you start the image up, it should give you an ip to connect to
05:21
< C_tiger>
it says localhost
05:21
< C_tiger>
so I do that.
05:21
<@Doctor_Nick>
??
05:22
< C_tiger>
localhost:8000
05:23
<@Doctor_Nick>
try 192.168.240.128
05:23
< C_tiger>
Nope.
05:24
<@Doctor_Nick>
when you're logging in, do you put in the "notebook" option?
05:24
< C_tiger>
time out.
05:24
<@Doctor_Nick>
?
05:24
< C_tiger>
I used to, then I was told to do the sage option and type notebook() in that.
05:25
< C_tiger>
But it used to say direct your browser to https://localhost:8000
05:25
<@Doctor_Nick>
hmm.
05:26
< C_tiger>
Whoa, no it does something different now.
05:26
< C_tiger>
Dang.
05:26
<@Doctor_Nick>
?
05:26
< C_tiger>
It gave me an IP address.
05:26
<@Doctor_Nick>
wellll
05:26
< C_tiger>
Dang.
05:26
< C_tiger>
Sweet.
05:26
<@Doctor_Nick>
cool beans
06:03
< C_tiger>
Sigh, now I need linux help. I'm totally mooching off this channel today.
06:06 Vornicus is now known as Darius
06:08
< C_tiger>
Ok, so my roommate has a new Asus EEE PC running Xandros. He connects to the wireless network fine, has an IP address but can't ping google.
06:11
< C_tiger>
But all the other (windows) computers in the apartment (There are five) connect fine.
06:15 C_tiger [~c_wyz@Nightstar-5378.nycmny.east.verizon.net] has quit [Connection reset by peer]
06:22 C_tiger [~c_wyz@Nightstar-5378.nycmny.east.verizon.net] has joined #code
06:50 Thaqui [~Thaqui@Nightstar-262.dialup.xtra.co.nz] has joined #code
06:50 mode/#code [+o Thaqui] by ChanServ
06:59
<@ToxicFrog>
C_tiger: 'can't ping' as in gethostbyname() fails, or as in the packets never come back?
06:59
<@ToxicFrog>
What happens if he tries pinging the gateway by IP?
07:01
< C_tiger>
The gateway pings fine.
07:01
< C_tiger>
But anything beyond doesn't.
07:01
<@Doctor_Nick>
install
07:01
< C_tiger>
the packets never come back.
07:01
<@Doctor_Nick>
whoops
07:03
<@ToxicFrog>
Traceroute shows them stopping at the gateway?
07:03
< C_tiger>
Traceroute does nothing.
07:03
< C_tiger>
I think.
07:03
< C_tiger>
what do I type exactly?
07:04
<@ToxicFrog>
traceroute www.google.com
07:04
<@ToxicFrog>
$ traceroute www.google.com
07:04
<@ToxicFrog>
traceroute to www.google.com (72.14.205.99), 30 hops max, 40 byte packets
07:04
<@ToxicFrog>
1 linksys (192.168.1.1) 1.523 ms 1.424 ms 3.017 ms
07:04
<@ToxicFrog>
2 10.5.96.1 (10.5.96.1) 208.097 ms 208.087 ms 208.886 ms
07:04
<@ToxicFrog>
...
07:04
<@ToxicFrog>
10 qb-in-f99.google.com (72.14.205.99) 256.617 ms 257.596 ms 257.561 ms
07:05
<@Darius>
That's a long-ass jump.
07:05
<@Doctor_Nick>
whoops
07:05
<@ToxicFrog>
?
07:05
< C_tiger>
WTF.
07:05
<@ToxicFrog>
How do you mean, Vorn?
07:06
< C_tiger>
Ok, so now it works okily dokily as Ned Flanders would say.
07:06
< C_tiger>
Seriously, my roommate goes to bed.
07:08
<@ToxicFrog>
Ohh.
07:08
<@ToxicFrog>
Odd, rather.
07:08 * ToxicFrog slwwp
07:08
< C_tiger>
Or not, he gets up, it dies.
07:09
< C_tiger>
This is um... NUTS!
07:10
<@Darius>
It's taking a very long time to go from 1 to 2 there.
07:11
< C_tiger>
My roommate is cursed.
07:11
<@ToxicFrog>
1 is my local gateway, seperated from me by about two meters of cat5. If that.
07:11
<@ToxicFrog>
2 is my ISP gateway, seperated from me by several kilometers of cable and various pieces of software and shared between six machines.
07:12
< C_tiger>
Ok, traceroute connects to google fine (after my roommate goes back to bed) but firefox won't connect to google.
07:12
<@ToxicFrog>
Also, traceroute seems to inflate ping times by a significant factor.
07:13
<@ToxicFrog>
traceroute google.ca is ~280ms, ping google.ca is ~28ms.
07:14
<@ToxicFrog>
C_tiger: all I can think is that ICMP is ok but TCP isn't working right - check firewall and connection filtering settings down the chain, try telnetting it on port 80 to see if it's just FF that's broken, etc
07:14
<@ToxicFrog>
I really can't help much at the moment, I've been up for 18 hours on 4 hours of sleep and my state vector is terribly fuzzy.
07:14
<@ToxicFrog>
So I'm going to bed now.
07:14
< C_tiger>
Ok, thanks for your help.
07:16
< C_tiger>
bash: telnet: command not found
07:16
< C_tiger>
??
07:23
<@Darius>
that's not an auspicious beginning.
07:23
< C_tiger>
No, I would say it isn't.
07:23
< C_tiger>
This PC was supposed to be idiot proof.
07:24
<@Darius>
Idiots shouldn't be using telnet.
07:25
< C_tiger>
It has no hard drive, only 2 GB of flash memory, and only four icons: Openoffice, firefox, messaging (pidgin) and skype.
07:27
<@Darius>
ls /usr/bin
07:27
< C_tiger>
a whole lot of stuff.
07:27
< C_tiger>
am I looking for something in particular?
07:37
<@Darius>
Uh... not sure, really.
07:37
<@Darius>
apt, yum, up2date...
07:38
<@Darius>
Though now that I think about it that doesn't work if you can't reach the internet those won't help.
07:38
<@Darius>
Uh...
07:39
<@Darius>
I think you might be able to convince ssh to act like telnet, but I dnon't know how.
07:46
< C_tiger>
Ugh.
07:54
< C_tiger>
Ok, more interesting observations.
07:55
< C_tiger>
sudo apt-get update works
07:55
< C_tiger>
connects and gets updates or something.
07:57
<@Darius>
wacky.
07:57
< C_tiger>
firefox still doesn't work and I don't have telnet.
07:57 Darius is now known as Vornicus-Latens
07:58
<@Vornicus-Latens>
apt-get install telnet ?
07:58
< C_tiger>
couldn't find package telnet
07:58
<@Vornicus-Latens>
:/
07:58
< C_tiger>
I'm cowering in a corner.
07:58
<@Reiver>
...what else would you call it?
07:59
<@Vornicus-Latens>
dunno.
08:00
<@Vornicus-Latens>
But it might be in a larger package.
08:02
< C_tiger>
Although I kinda feel bad installing a whole bunch of stuff on this computer.
08:07
< C_tiger>
Ok, I give up.
08:43 Vornicus-Latens [~vorn@ServicesOp.Nightstar.Net] has quit [Ping Timeout]
09:03 Chalcedon [~Chalcedon@Nightstar-11255.ue.woosh.co.nz] has quit [Quit: Gone]
09:30 AnnoDomini [AnnoDomini@Nightstar-28986.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
09:41 You're now known as TheWatcher
10:36 Thaqui [~Thaqui@Nightstar-262.dialup.xtra.co.nz] has left #code [Leaving]
11:36 Attilla [~The.Attil@194.72.70.ns-11849] has quit [Quit: <Insert Humorous and/or serious exit message here>]
11:48 Attilla [~The.Attil@194.72.70.ns-11849] has joined #code
14:43 gnolam [lenin@85.8.5.ns-20483] has joined #Code
14:43 mode/#code [+o gnolam] by ChanServ
14:54 KarmaBot [~fark.off@87.72.35.ns-26506] has joined #Code
14:54 mode/#code [+v KarmaBot] by ChanServ
15:54 AnnoDomini [AnnoDomini@Nightstar-29173.neoplus.adsl.tpnet.pl] has joined #Code
15:54 mode/#code [+o AnnoDomini] by ChanServ
16:10 Xiphias [Ameroth@Nightstar-25243.dsl.in-addr.zen.co.uk] has joined #code
16:37 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
16:49 You're now known as TheWatcher[afk]
17:44 Xiphias [Ameroth@Nightstar-25243.dsl.in-addr.zen.co.uk] has quit [Quit: I was never gone]
17:59 Vornicus-Latens [~vorn@Admin.Nightstar.Net] has joined #code
18:04 Chalcedon [~Chalcedon@Nightstar-11713.ue.woosh.co.nz] has joined #code
18:04 mode/#code [+o Chalcedon] by ChanServ
18:11 Syloq [Syloq@NetAdmin.Nightstar.Net] has joined #code
18:12 Syloq is now known as Syloqs-AFH
18:17 Chalcedon [~Chalcedon@Nightstar-11713.ue.woosh.co.nz] has quit [Quit: Gone]
18:26 You're now known as TheWatcher
18:38 Vornicus-Latens is now known as Vornicus
19:20 Syloqs-AFH [Syloq@NetAdmin.Nightstar.Net] has quit [Connection reset by peer]
20:44 gnolam is now known as SovietNinja
20:45 Doctor_Nick [~nick@Nightstar-23600.hsd1.fl.comcast.net] has quit [Quit: Konversation terminated!]
21:38 SovietNinja [lenin@85.8.5.ns-20483] has quit [Quit: Reboot]
21:40 gnolam [lenin@Nightstar-10613.8.5.253.static.se.wasadata.net] has joined #Code
21:40 mode/#code [+o gnolam] by ChanServ
21:40 gnolam is now known as SovietNinja
22:23 ilovefire [~santros_v@209.82.191.ns-11321] has joined #code
22:28 Thaqui [~Thaqui@219.89.45.ns-13582] has joined #code
22:28 mode/#code [+o Thaqui] by ChanServ
22:32 AnnoDomini is now known as And
22:32 And is now known as AnnoDomini
23:13 * ilovefire has a question! I keep getting 'TypeError: unsupported operand type(s) for /: 'int' and 'xrange''. What does this mean?
23:13
<@Reiver>
Which language?
23:16
<@ToxicFrog>
Python.
23:16
<@ToxicFrog>
Show us the code.
23:16
<@ToxicFrog>
I suspect this means you're trying to do something like: 2 / xrange(2,4)
23:17
< ilovefire>
voice please?
23:17 mode/#code [+o ilovefire] by AnnoDomini
23:17
<@ilovefire>
http://rafb.net/p/oWdPdO98.html
23:19
<@ToxicFrog>
Where's n defined?
23:20
<@ilovefire>
Well, umm, I thought with the current set of thigns for n, umm.
23:20 * ilovefire head scratches. Is probalby going at this in entirely the wrong way.
23:21
<@ToxicFrog>
Well, consider.
23:21
<@ToxicFrog>
First of all, primes(a) is meant to list all the primes between 2 and a inclusive, yes?
23:22 * ToxicFrog checks the backscroll. Yes, it is.
23:23
<@ToxicFrog>
So, what does that suggest to you as a starting range?
23:24
<@ilovefire>
well, specificaly between 2 and 1000, but if it were a... Hmm, could have mor eutility, I supopse, but...
23:24
<@ilovefire>
Umm.
23:25
<@ToxicFrog>
Ok, in that case I have a different question: if it's hard-coded to between 2 and 1000, why is it primes(a) when a will never get used?
23:26
<@ToxicFrog>
(sidenote: C_tiger: if apt-get update works, the problem is not with your network connection, it's with firefox)
23:26
<@ilovefire>
TF: Because whenever I tried just def primes:, it kept giving me an error.
23:26
<@AnnoDomini>
Why not 'primes()'?
23:26
<@ToxicFrog>
def primes():
23:27
<@ilovefire>
also gave an error. Said it wasnt' defined.
23:27
<@ToxicFrog>
ilovefire: def primes():
23:28
<@ToxicFrog>
When AD said "primes()", he meant "use that as the name that goes after the def and before the :", not "type that in verbatim"
23:28
<@ilovefire>
okay, that works.
23:28
<@ilovefire>
It didn't before, strangely enough.
23:28
<@ToxicFrog>
Specifically, a function declaration starts with: def name(arguments):
23:28
<@ToxicFrog>
If the function takes no arguments (aka parameters), there's nothing between the ().
23:29 * ilovefire nods.
23:29
<@ilovefire>
that fixes problem one, I suppose.
23:29
<@ToxicFrog>
So now, conceptually, you have something like: for k in 2 to 1000: if k is prime, print k
23:29
<@ilovefire>
http://rafb.net/p/FUeujO16.html this is the full text of the error message I'm getting.
23:29
<@ilovefire>
TF: conceptually, yes.
23:30
<@ToxicFrog>
So. Start of by writing that in python. Don't try to fill in "if k is prime" - just put a placeholder like, say, is_prime(k) in.
23:31 * AnnoDomini scratches head. Looks like some sort of type incompatibility. Little knowledge of Python, though.
23:32
<@ToxicFrog>
I imagine it's related to the attempt to declare n by writing "n < 1000; n > 1"
23:33
<@ilovefire>
okay.
23:36
<@ilovefire>
Done, now what should I do? Figure out code that'll check if k is prime?
23:36
<@ToxicFrog>
Well, first paste it so we can take a look :)
23:36
<@ToxicFrog>
But yes.
23:37
<@ToxicFrog>
As far as the actual programming goes, the next step is to devise code that actually determines whether k is or is not.
23:37
<@ilovefire>
http://rafb.net/p/Wvvvi829.html
23:37 * ilovefire nods
23:38
<@ToxicFrog>
this was discussed last night, for test division - "go down the list of numbers between this number and 1, and see if it's divisible by any of them"
23:39 * ilovefire nods, was attempting to figure out how to do this with what he knew about code.
23:39
<@ToxicFrog>
I note that my suggestion of is_prime(k) wasn't just to make it look more like actual code.
23:39
<@ToxicFrog>
You can create multiple functions in one file.
23:39 * ilovefire nods...
23:40
<@ToxicFrog>
http://rafb.net/p/kjDV1Z75.html
23:40
<@ToxicFrog>
An example.
23:41
<@ToxicFrog>
This is, in general, good practice - make your program out of smaller, modular pieces rather than one function that does everything.
23:42
<@ToxicFrog>
It also helps think about what you're doing - you don't get, for example, the "is k prime" code mixed up with the "k in 2 to 1000" code, either in your head or in the file.
23:43 * ilovefire nods
--- Log closed Wed Dec 12 00:00:36 2007
code logs -> 2007 -> Tue, 11 Dec 2007< code.20071210.log - code.20071212.log >