code logs -> 2008 -> Sat, 06 Dec 2008< code.20081205.log - code.20081207.log >
--- Log opened Sat Dec 06 00:00:12 2008
00:37
<@Attilla>
Hah, man these random walks are hilarious. Mostly because of the ten I just made, about two of them retained reasonable end positions (one 0 and one 4) the others got to ridiculous distances left or right (this had a thousand steps involved) like -88 and 44
01:02 AnnoDomini [~farkoff@Nightstar-29346.neoplus.adsl.tpnet.pl] has quit [Ping Timeout]
01:08 AnnoDomini [~farkoff@Nightstar-29296.neoplus.adsl.tpnet.pl] has joined #Code
01:08 mode/#code [+o AnnoDomini] by ChanServ
01:10 AnnoDomini [~farkoff@Nightstar-29296.neoplus.adsl.tpnet.pl] has quit [Quit: Do not burn the candle at both ends, as it leads to the life of a hairdresser.]
01:25 You're now known as TheWatcher[T-2]
01:28 You're now known as TheWatcher[zZzZ]
01:49 GeekSoldier_ [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has joined #code
01:51 GeekSoldier [~Rob@Nightstar-8573.midstate.ip.cablemo.net] has quit [Ping Timeout]
02:45 GeekSoldier_ is now known as GeekSoldier
03:08 gnolam [lenin@79.136.60.ns-4387] has quit [Quit: Z?]
04:26 Mr_Wizard [~Z@Nightstar-5401.atm2-0-1041217.0xc329e232.boanxx12.customer.tele.dk] has joined #Code
05:46 Mr_Wizard is now known as Serah
06:11 Serah [~Z@Nightstar-5401.atm2-0-1041217.0xc329e232.boanxx12.customer.tele.dk] has quit [Quit: Be right back, got some smiting and righteous justice to attend to.]
06:49 * Reiver frowns.
06:49
<@Reiver>
I have some text here that an error message is claiming is apparently UTF-8
06:50
<@Reiver>
Is there any way to ensure it is ASCII-fied, just in case
06:50
<@jerith>
Not without knowing what it is.
06:50
<@jerith>
You can check that it's all 7-bit ASCII.
06:51
<@jerith>
If there are high bits set, you can assume it's UTF-8 and attempt to decode it.
06:53
<@McMartin>
And if that decoding fails, which it can, because UTF-8 is sane, you'll know it's a filthy lie.
06:54
<@McMartin>
And yeah, if the text is all Unicode Code points 127 or below, which is to say, if it is in fact ASCII, UTF-8 and ASCII (and ISO-8859-1!) are all identical.
06:55
<@jerith>
The best thing to do is work entirely with UTF-8 internally and {en,de}code on the edges where necessary.
06:56
<@McMartin>
Wellllll.
06:56
<@McMartin>
If you're doing a lot of extended character work...
06:56
<@McMartin>
You may be better off with UCS-4 internally and translate on the edges.
06:56 * jerith nods.
06:56
<@Reiver>
I figured it out, hilariously via Opera
06:57
<@jerith>
I generally use whatever native unicode type the language provides.
06:57
<@Reiver>
Which lets you specify the encoding in use - it's usually set to Automatic, but I forced it into ASCII and found that the ' and - characters were not ASCII at all.
06:57
<@Reiver>
So I replaced them by hand while the browser was forced into ASCII mode, and et voila.
06:58 * Reiver thanks jerith, whose idea of checking for 'all 7-bit ASCII' was what tipped him off.
06:58 * jerith takes a bow.
07:09 grossroot[idle] is now known as grossroot
09:32 You're now known as TheWatcher
09:43
< Pink>
I'm glad I had my sound turned off while you folks were tripping my hilight left and right
09:43 * TheWatcher upreads, notes that one has caused him no end of fun, and has resulted in custom mods for phpBB2 as several people he knows are in the habit of composing posts in word, and copy&pasing into posts, complete with typographic quotes, en/em-dashes and the lot
09:45
<@jerith>
Yeah.
10:06 AnnoDomini [~farkoff@Nightstar-29296.neoplus.adsl.tpnet.pl] has joined #Code
10:06 mode/#code [+o AnnoDomini] by ChanServ
10:14 You're now known as TheWatcher[afk]
11:01 grossroot is now known as grossroot[idle]
11:57 gnolam [lenin@79.136.60.ns-4387] has joined #Code
11:57 mode/#code [+o gnolam] by ChanServ
14:03 You're now known as TheWatcher
15:24 Netsplit Troika.TX.US.Nightstar.Net <-> DeepThought.NY.US.Nightstar.Net quits: Syloqs-AFH, @McMartin, grossroot[idle], ToxicFrog
15:40 Syloqs-AFH [~Syloq@Admin.Nightstar.Net] has joined #code
15:40 ToxicFrog [~ToxicFrog@Admin.Nightstar.Net] has joined #code
15:40 McMartin [~mcmartin@Nightstar-14680.dsl.pltn13.sbcglobal.net] has joined #code
15:40 grossroot[idle] [~grossroot@Nightstar-2147.hackthisbox.org] has joined #code
15:40 mode/#code [+o TheWatcher] by ChanServ
15:40 mode/#code [+o Consul] by ChanServ
15:40 mode/#code [+o jerith] by ChanServ
15:40 mode/#code [+o Reiver] by ChanServ
15:40 mode/#code [+o Attilla] by ChanServ
15:40 mode/#code [+o MyCatVerbs] by ChanServ
15:40 mode/#code [+o GeekSoldier] by ChanServ
15:40 mode/#code [+o AnnoDomini] by ChanServ
15:40 mode/#code [+o gnolam] by ChanServ
15:40 mode/#code [-o C_tiger] by ChanServ
15:40 mode/#code [-o crem] by ChanServ
15:40 mode/#code [+o McMartin] by ChanServ
15:40 mode/#code [+o ToxicFrog] by ChanServ
15:52 Vornucopia [~vorn@Admin.Nightstar.Net] has joined #code
15:54 Vornotron [~vorn@Admin.Nightstar.Net] has quit [Ping Timeout]
17:05 You're now known as TheWatcher[afk]
18:27 You're now known as TheWatcher
18:57 * MyCatVerbs pets ChanServ.
20:35 * C_tiger cries
21:36
<@GeekSoldier>
what's wrong' C_tiger?
21:59
<@Attilla>
Curses I have forgotten how to do outputting into files in C
22:01
<@Attilla>
(And if this requires shell scripts :/)
22:04
<@McMartin>
Attilla: Well, shell scripts make it way easier
22:04
<@McMartin>
Since yout hen have the C write to stdout with printf or whatever and you just run that code with > target-file at the end
22:04
<@McMartin>
Otherwise, you fopen the target and fprintf to it, then fclose it.
22:08
<@gnolam>
Or fwrite() it, if it's binary data.
22:09
<@gnolam>
<insert standard disclaimer on endianness and padding here>
22:09 Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has quit [Quit: <Insert Humorous and/or serious exit message here>]
22:24 Mr_Wizard [~Z@Nightstar-5401.atm2-0-1041217.0xc329e232.boanxx12.customer.tele.dk] has joined #Code
22:26 Attilla [~The.Attil@Nightstar-9469.cdif.cable.ntl.com] has joined #code
22:26 mode/#code [+o Attilla] by ChanServ
22:38
< Vornucopia>
Euler 29 is rather surprisingly easy. That I didn't haveto learn any math and just let python's set() thing do the job is probably why. :)
22:40
<@GeekSoldier>
29 is the polynomial one?
22:40
< Vornucopia>
29 is "the number of distinct numbers in a**b for a,b in (2..100)"
22:41
< Vornucopia>
27 is the longest quadratic sequence of prime numbers.
22:43
<@GeekSoldier>
ok, I had been working 27 (brute force, rather inelegant, and broken still)
22:44
<@GeekSoldier>
I have crappy memory sometimes.
22:47
< Vornucopia>
27 is probably best to do brute force.
22:48
<@ToxicFrog>
Yeah.
22:48 * Vornucopia examines 31 now.
22:48 You're now known as TheWatcher[afk]
22:49
<@Attilla>
Hmm, fopen, fclose and fprintf?
22:49
<@Attilla>
(Just rechecking since I had to restart my compy)
22:50
<@McMartin>
Get the man pages on those, yeah.
22:51
<@ToxicFrog>
Yeah.
22:51
<@ToxicFrog>
And fwrite for raw output.
22:52 Vornucopia is now known as Vornicus
22:56
<@GeekSoldier>
ehn? has range changed in Python 3.0?
22:57
< Vornicus>
Range and a few other things that used to return lists now return iterators or "views"
22:57 * McMartin wonders if P65 runs in Python3.
22:57
<@GeekSoldier>
hmmm.
22:57
<@GeekSoldier>
i suppose I have to figure iterators out now.
22:58
< Vornicus>
iterators aren't hard.
22:59
<@McMartin>
Can't you still use them most places you'd use lists?
22:59
<@McMartin>
for x in it: etc?
22:59
<@ToxicFrog>
Yeah, iterators are pretty easy unless it's C++ or Java~
22:59
< Vornicus>
Yeah. yOu can't index into them though
23:00 * ToxicFrog ponders writing an indexable iterator
23:00
<@GeekSoldier>
I'm trying to assign a range to a list, then use that to ompare values.
23:00
<@GeekSoldier>
p = range(100)
23:00
<@GeekSoldier>
print(p)
23:00
<@GeekSoldier>
returns range(0,100)
23:00
<@McMartin>
TF: They got easier in Java starting in 1.5~
23:01
<@McMartin>
for (x : iterable) { ... }
23:02
<@McMartin>
TF: fseek, ftell
23:02
<@ToxicFrog>
Yeah.
23:02 * McMartin now goes to spend Money
23:03
<@GeekSoldier>
ok... you have to force it into a list: list(range(100))
23:06
<@GeekSoldier>
but it casts indices as floats?
23:07
<@GeekSoldier>
haha... nope...
23:07 * GeekSoldier forgot about the "//" operator.
23:12 * Vornicus indents 7 deep to solve 31.
23:21
< Vornicus>
okay, 32 is gonna be tricky.
23:21
< Mr_Wizard>
You're doing homework?
23:21
< Vornicus>
No, Project Euler.
23:21
< Mr_Wizard>
Same deal?
23:22 mode/#code [+oooooo Alek|gone C_tiger crem Pink Syloqs-AFH Vornicus] by Vornicus
23:22 mode/#code [+vvv grossroot[idle] Mr_Wizard NSGuest-34] by Vornicus
23:22
<@Vornicus>
http://projecteuler.net/
23:22
<+Mr_Wizard>
Awww.
23:22 * Vornicus dunno who you are, so you get v instead of o.
23:23 Mr_Wizard is now known as Serah
23:23
<@Vornicus>
ah
23:23 mode/#code [+o Serah] by Vornicus
23:24
<@Serah>
So homework, except for fun?
23:24
<@Vornicus>
:P
23:25
<@GeekSoldier>
heh, essentially.
23:25
<@Serah>
That's what it says.
23:25
<@Serah>
The intended audience include students for whom the basic curriculum is not feeding their hunger to learn, blablabla.
23:31
<@Vornicus>
This one... damn, I don't know where to start.
23:42
<@Consul>
I should consider trying to get this Zonet USB wifi dongle working in Fedora. Google says it's theoretically possible.
23:51
<@Vornicus>
...not fast enough...
23:55
<@Vornicus>
but it works.
23:55 Consul [~consul@Nightstar-3759.dsl.sfldmi.ameritech.net] has quit [Quit: Leaving]
--- Log closed Sun Dec 07 00:00:23 2008
code logs -> 2008 -> Sat, 06 Dec 2008< code.20081205.log - code.20081207.log >