IRC log of swhack on 2002-02-17

Timestamps are in UTC.

00:00:59 [doid]
doid has quit (Read error: 110 (Connection timed out))
00:54:23 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
01:36:13 [AaronSw]
kmacleod, rss issues list?
01:51:53 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
03:16:17 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
03:40:21 [AaronSw]
AaronSw has changed the topic to: the device talks to you, is solar powered, and teaches you how to use it to link to the Web.
04:46:58 [Bensw|sarasota]
Bensw|sarasota (nobody@un.impressive.net) has joined #swhack
04:47:45 [Bensw|flordia]
Bensw|flordia (nobody@un.impressive.net) has joined #swhack
04:47:46 [Bensw|sarasota]
Bensw|sarasota has quit (Remote closed the connection)
04:47:58 [Bensw|flordia]
hello
04:48:19 [jeremiah]
hey
04:48:24 [jeremiah]
why are you in florida?
04:49:10 [Bensw|flordia]
vacation.. and also to see my granparents
04:49:43 [Bensw|flordia]
hmm is aaron up?
04:49:51 [AaronSw]
hi
04:50:07 [AaronSw]
how're things?
04:50:25 [Bensw|flordia]
ok
04:51:00 [sbp]
* sbp waves
04:56:06 [jeremiah]
hello
04:56:06 [Bensw|flordia]
Bensw|flordia has quit (Remote closed the connection)
04:56:29 [jeremiah]
* jeremiah points aaron and sbp to doid.com
04:56:31 [jeremiah]
he wrote about us
04:56:46 [sbp]
yep, I read it :-)
04:58:46 [jeremiah]
AaronSw: working on that networking code, there's a few funny things I have to deal with, like when you make a server with the xmlrpc thing it won't let you pass the object used as the server arguments (I don't think) which makes it a pain to set the ID of the servers
04:59:22 [AaronSw]
i don't follow
04:59:56 [jeremiah]
n/m, I'll explain it more in depth if I can't figure it out soon
05:00:01 [AaronSw]
Heh: "Damn. Lost all my trading profits."
05:00:08 [jeremiah]
trading profits?
05:00:13 [AaronSw]
doid...
05:00:16 [jeremiah]
oh
05:00:59 [AaronSw]
jer, it's pretty simple: you create a server class that takes the args, converts serverid into a proxy object and then passes it to my code, then you convert the objects it returns into servids and return it
05:01:10 [AaronSw]
that's the idea, anyway
05:02:19 [jeremiah]
hmm
05:03:11 [jeremiah]
what do you mean 'converts serverid into a proxy object'
05:03:50 [AaronSw]
well you have to make two objects, right? one to take outgoing stuff and one to do ingoing stuff.
05:03:55 [AaronSw]
the proxy is the outgoing stuff
05:04:20 [jeremiah]
hmm
05:04:23 [AaronSw]
so that instead of dealing with other Nodes, it deals with proxies which relay things to other servers
05:04:24 [jeremiah]
oh, proxys, gotcha
05:04:40 [jeremiah]
wait, one second, I'm gonna reread what you wrote
05:04:51 [AaronSw]
Node -> [proxy, proxy, proxy ...] <----> [server, server, server, ...] -> Node
05:04:57 [sbp]
logster, pointer
05:05:03 [sbp]
See http://blogspace.com/swhack/chatlogs/2002-02-17#T05-04-57
05:05:04 [sbp]
logster, pointer?
05:05:04 [sbp]
See http://blogspace.com/swhack/chatlogs/2002-02-17#T05-05-04
05:05:04 [sbp]
pff
05:05:11 [jeremiah]
oh, so we can use multiple protocols, not just xmlrpc
05:05:19 [jeremiah]
gotcha
05:05:25 [AaronSw]
that'd be good too
05:05:36 [jeremiah]
ok
05:14:37 [jeremiah]
is there some special plex protocol of text here? I don't see hwy we need all these server objects and ids and stuff, or maybe I'm very, very confused
05:15:21 [jeremiah]
hmm
05:15:25 [jeremiah]
one sec
05:35:19 [sbp]
Gotta run
05:35:23 [AaronSw]
well how were you going to do it, jer?
05:35:25 [AaronSw]
c'ya sbp
05:41:47 [jeremiah]
I was going to just let xmlrpc handle it, but then i realized
05:41:51 [jeremiah]
that would bind us to python
05:41:58 [jeremiah]
i didn't realize ALL that node returns is objects
05:42:02 [jeremiah]
Node the class, that is
05:42:06 [jeremiah]
so now it's simpler
05:42:32 [AaronSw]
it only returns objects? hmm.
05:42:37 [jeremiah]
most of the time it does
05:43:32 [jeremiah]
mind if I make the __repr__ method public?
05:43:44 [AaronSw]
what for?
05:43:55 [AaronSw]
you can just do `object` in python
05:44:16 [jeremiah]
wait, is __repr__ a special python method?
05:44:19 [jeremiah]
sorry, didn't know about that
05:44:23 [jeremiah]
I'm a bit tired right now too
05:44:30 [AaronSw]
yeah. __foo__ is always a special python method
05:44:45 [jeremiah]
ok
05:44:48 [jeremiah]
good to know
06:12:06 [jeremiah]
AaronSw: only functions they'll really need to access are getPred, getSucc, getClosestFinger and join, right?
06:12:11 [jeremiah]
s/functions/methods of Node
06:12:39 [AaronSw]
probably
06:12:42 [jeremiah]
ok
06:13:19 [jeremiah]
wait, join shouldn't be public
06:13:21 [jeremiah]
I don't think...
06:13:38 [AaronSw]
yeah.
06:18:21 [jeremiah]
is the finger table supposed to hold the ip and port for the nodes?
06:18:36 [AaronSw]
the finger table holds node objects
06:18:52 [AaronSw]
the objects should have ip and port values
06:19:04 [jeremiah]
what does the id do then
06:19:22 [AaronSw]
chord uses the id to work
06:20:00 [jeremiah]
so if I'm getting a node representation like <Node 1> back from a server, how do i connect to that node?
06:20:36 [AaronSw]
this node representation is returned from chord?
06:20:53 [jeremiah]
well, that's what we have now for `object`
06:21:12 [jeremiah]
for the Node object
06:21:36 [AaronSw]
right
06:21:49 [AaronSw]
but chord only has that object because you've given that to it
06:22:08 [AaronSw]
so give it your proxy object, which is a dummy and has i[ and port properties
06:22:30 [jeremiah]
hmm
06:22:46 [jeremiah]
so format should be <Node id ip:port>
06:22:47 [jeremiah]
?
06:23:03 [AaronSw]
why are you messing with repr at all?
06:23:17 [jeremiah]
* jeremiah shoots aaron in the head
06:23:24 [AaronSw]
* AaronSw shoots jeremiah
06:23:24 [jeremiah]
I thought you told me too...
06:23:26 [AaronSw]
you have a node object. use node.port and node.ip
06:23:34 [jeremiah]
but the goddamn node doesn't have those set
06:23:36 [jeremiah]
:)
06:23:39 [jeremiah]
sorry
06:23:41 [AaronSw]
well then set them!
06:23:44 [jeremiah]
hmm
06:23:58 [AaronSw]
wait, why do you need to know its ip and port?
06:24:02 [AaronSw]
you shouldn't have to
06:24:04 [jeremiah]
well we are on a network
06:24:23 [AaronSw]
yeah, you're supposed to be hiding that fact
06:24:32 [jeremiah]
xmlrpc needs to know it though
06:24:42 [AaronSw]
only for its own objects
06:24:54 [jeremiah]
right
06:25:00 [jeremiah]
but it will be calling a lot on a Node object
06:25:01 [jeremiah]
like this:
06:25:03 [jeremiah]
I'm a node
06:25:21 [jeremiah]
I do aaronsw.getPred()
06:25:29 [jeremiah]
it goes through the aaronsw node proxy
06:25:42 [jeremiah]
and asks the aaronsw node for it's predecessor
06:25:59 [jeremiah]
aaronsw returns it, but doesn't have the ip attached, it just gives back <Node 55>
06:26:05 [jeremiah]
how should the proxy figure out the id?
06:26:14 [AaronSw]
ah, i see.
06:26:23 [jeremiah]
or will the node that aaronsw returns really just be a proxy anyways
06:26:58 [AaronSw]
ok, so you [do something creative] so that the xmlrpc code changes a node object into a (host, port) tuple.
06:27:13 [AaronSw]
creative things include: changing the xml-rpc serialization code
06:27:26 [AaronSw]
writing dummy functions to handle each function
06:27:43 [jeremiah]
hmm
06:28:06 [jeremiah]
right now, is there anywhere in any of your code that stores ips and ports?
06:28:13 [jeremiah]
I don't know if we clarified that
06:28:16 [AaronSw]
no. and it shouldn't.
06:28:19 [jeremiah]
ok
06:28:20 [jeremiah]
good
06:29:03 [jeremiah]
do you want to store these values on the computer at all, or should it just ask the plex for them?
06:29:13 [jeremiah]
like a triple query
06:29:26 [AaronSw]
that'd be circular. your code needs to store them
06:29:38 [jeremiah]
ok
06:29:49 [jeremiah]
it'd be circular in the beginning, not once we have several nodes running
06:30:02 [AaronSw]
yeah... but for now...
06:30:06 [jeremiah]
ok
06:31:09 [jeremiah]
in the end, I think we should keep most of that in the plex, then when a node starts up, it takes a list of all the old ips and ports from the last time it was running (or if it's the first time, a list of bootstrap ones of nodes that are almost always on) and runs through them to connect
06:31:25 [jeremiah]
but I figure you thought that anyways
06:31:44 [AaronSw]
yeah, that would be cool.
06:31:59 [AaronSw]
but it still should cache host,ip
06:32:03 [jeremiah]
yeah
06:32:07 [jeremiah]
gonna make a bsddb for that
06:32:18 [jeremiah]
because, afterall, what is bsddb good for
06:32:27 [AaronSw]
i don't think it's worth it
06:32:49 [jeremiah]
well, we're going to want to keep it between starts
06:32:54 [AaronSw]
oh, i see
06:32:58 [jeremiah]
for bootstraping to the plex the next time
06:33:04 [jeremiah]
then once we're connected we can flush it
06:33:09 [AaronSw]
might want to just pickle things
06:33:16 [jeremiah]
hmm, ok
06:55:20 [jeremiah]
wow, that's pretty cool that you can create your own numbers in python (with the __add__ , __sub__ stuff)
06:55:29 [AaronSw]
Yeah, it's lots of fun.
06:55:33 [jeremiah]
have you ever used it?
06:55:46 [AaronSw]
some of it... don't think i used number stuff
06:55:50 [jeremiah]
ok
06:56:06 [jeremiah]
how do you usually test to see if a file exists? I'm sure there must be some easy way to do it and I'm not coming across it
06:56:32 [AaronSw]
in py? it's like os.isfile or something
06:57:23 [jeremiah]
thanks
07:10:39 [jeremiah]
* jeremiah is back (gone 32:06:22)
07:10:41 [jeremiah]
* jeremiah is away: I'm busy
07:12:16 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
08:33:56 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
10:52:29 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
11:36:30 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
12:53:06 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
13:26:32 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
14:20:10 [BenSw|sarasota]
BenSw|sarasota (nobody@un.impressive.net) has joined #swhack
14:20:42 [BenSw|sarasota]
hello
14:24:28 [AaronSw]
hey
14:26:30 [AaronSw]
what's up BenSw|sarasota?
14:27:23 [BenSw|sarasota]
nothing much
14:27:38 [BenSw|sarasota]
heh it seems that aarons up
14:30:49 [BenSw|sarasota]
welll gotta go bye everyone
14:31:17 [AaronSw]
later
14:31:18 [BenSw|sarasota]
BenSw|sarasota has quit (Remote closed the connection)
14:40:11 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
15:52:34 [AaronSw]
@ http://www.eff.org/IP/P2P/Napster/20010309_p2p_faq.html
15:52:46 [chumpster]
A: http://www.eff.org/IP/P2P/Napster/20010309_p2p_faq.html from AaronSw
15:52:54 [AaronSw]
A:|IAAL: P2P Legality FAQ
15:52:55 [chumpster]
titled item A
15:53:50 [AaronSw]
A::Auto-update may increase copyright liability, and developers can be liable for only distributing code (and not even running it yourself).
15:53:51 [chumpster]
commented item A
15:54:41 [AaronSw]
A::My question to Fred: What protections do minors have?
15:54:43 [chumpster]
commented item A
15:56:02 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
16:14:35 [kmacleod]
* kmacleod is beginning to dislike either Gnome terminal or a newer version of ircii. one of them is preventing me from seeing any history scrolled off the screen
16:18:05 [AaronSw]
ick
16:33:15 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
16:35:55 [AaronSw]
aargh! Zope is throwing BASE HREFs in my pages.
16:36:11 [AaronSw]
does it think i'm some sort of incompetent idiot that doesn't know how to link?
16:46:36 [AaronSw]
Marc Stiegler: "For a guy doing bidirectional typed links, the E language should be the dream machine for development; your project is, after all, an excellent example of the kind of application for which E is being developed..."
17:57:16 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
18:12:21 [AaronSw]
* AaronSw is out for lunch
19:11:19 [tansaku2]
tansaku2 has quit (Read error: 110 (Connection timed out))
19:39:37 [jeremiah]
hello
19:39:39 [jeremiah]
* jeremiah is back (gone 12:28:58)
20:08:29 [sbp]
Google wouldn't index the #swhack stuff, so I sent a mail to www-archive
20:08:41 [sbp]
http://lists.w3.org/Archives/Public/www-archive/2002Feb/0026
20:10:07 [sbp]
.google device talks solar powered teaches link Web
20:10:08 [xena]
device talks solar powered teaches link Web: http://www.skyhunter.com/marcs/finalexam.html
20:10:25 [sbp]
.http://www.skyhunter.com/marcs/finalexam.html
20:10:26 [xena]
Error 404 Not found Error 404 Not found The host name in the URL you have requested does not match any virtual server currently running. This may be because you entered the host name incorrectly, or because the necessary server alias has not been set up. Powered by Zeus Technology
20:11:06 [sbp]
* sbp remembers the article anyway
20:11:23 [sbp]
ah: http://web.archive.org/web/20020206214301/http://www.skyhunter.com/marcs/finalexam.html
20:33:59 [tansaku2]
tansaku2 (~sam@h134-046.tokyu-net.catv.ne.jp) has joined #swhack
20:37:28 [AaronSw]
hello
20:37:32 [AaronSw]
hey jeremiah
20:37:47 [AaronSw]
sbp, huh? "Google wouldn't index the #swhack stuff"?
20:38:03 [sbp]
it hadn't indexed anyo of the chatlogs since last december
20:38:14 [AaronSw]
hm, i blame jillzilla
20:38:17 [AaronSw]
;-)
20:38:22 [sbp]
:-)
20:38:30 [AaronSw]
funny subject
20:46:52 [sbp]
it's a quote form you
20:46:55 [sbp]
ugh: from
20:47:03 [AaronSw]
Ah, heh.
20:47:22 [sbp]
and it refers to the Googlebot, when it decides to index the post...
20:56:21 [wmf]
wmf (wesf@cs242733-11.austin.rr.com) has joined #swhack
20:56:26 [wmf]
@ http://regexps.com/src/docs.d/hackerlab/html/on-hacking.html
20:56:36 [chumpster]
B: http://regexps.com/src/docs.d/hackerlab/html/on-hacking.html from wmf
21:15:18 [AaronSw]
cool domain
21:15:58 [AaronSw]
B:|Hackerlab at regexps.com: On Hacking
21:15:59 [chumpster]
titled item B
22:32:36 [sbp]
ping - Aaron?
22:32:41 [sbp]
I just wrote a little program that can convert Plex Nodes and Stores into Eep Articles and lists, and vice versa
22:32:44 [AaronSw]
pong
22:32:47 [AaronSw]
cool!
22:32:52 [sbp]
but there's a weird bug with PlexRDF
22:33:01 [sbp]
here's what I'm doing to debug it:-
22:33:09 [sbp]
for triple in [rdf.node(), rdf.node('blargh:'), rdf.node()]:
22:33:09 [sbp]
if hasattr(triple, 'ruid'): print str(triple)+' '+triple.ruid
22:33:09 [sbp]
else: print str(triple)
22:33:28 [sbp]
now, usually, I get this (incorrect) print out:-
22:33:33 [sbp]
<plexrdf.rdfapi.Node instance at 0x10161c38> 1cgChwAnQ4e6
22:33:33 [sbp]
<plexrdf.rdfapi.Node instance at 0x10161a40>
22:33:33 [sbp]
<plexrdf.rdfapi.Node instance at 0x10161b58> 1cgChwAnQ4e6
22:33:41 [sbp]
but occasionally I get the correct version:-
22:33:48 [sbp]
<plexrdf.rdfapi.Node instance at 0x1015efb8> r8YEpfnrPLg4
22:33:48 [sbp]
<plexrdf.rdfapi.Node instance at 0x10160330>
22:33:49 [sbp]
<plexrdf.rdfapi.Node instance at 0x101607e0> 7FhhdE8zFHxb
22:33:56 [AaronSw]
hmm.
22:34:15 [sbp]
I can't believe that the forces of randomnivity are coming up with so many conflicting RUIDs :-)
22:34:33 [AaronSw]
Hmm.
22:34:36 [sbp]
otherwise, the transition from Eep to Plex and vice versa is remarkably smooth
22:34:42 [sbp]
I can round trip documents and stores
22:34:49 [sbp]
(recursively, too)
22:35:18 [sbp]
the funny thing is, the nodes are different... but the RUIDs are the same
22:36:49 [sbp]
wow, this is even weirder:-
22:36:50 [sbp]
Eep => Plex:
22:36:50 [sbp]
_:ruidETUdOVGp8iN3 <#canBeUsedWith> _:ruidETUdOVGp8iN3 .
22:36:50 [sbp]
_:ruidETUdOVGp8iN3 <#label> "Plex" .
22:36:50 [sbp]
_:ruidkfLoc7RYjeZU <#label> "Eep" .
22:37:04 [AaronSw]
hmm.
22:37:12 [sbp]
that's an example of what you get when you do NTriples => Eep => Plex => NTriples
22:37:19 [sbp]
original:-
22:37:19 [sbp]
_:Plex <#canBeUsedWith> _:Eep .
22:37:19 [sbp]
_:Plex <#label> "Plex" .
22:37:19 [sbp]
_:Eep <#label> "Eep" .
22:37:29 [sbp]
so there, the bNodes conflict, and they don't conflict!
22:37:36 [sbp]
are you doing quantum computing, or something?
22:37:50 [AaronSw]
Let me try it on my copy.
22:37:54 [sbp]
O.K.
22:38:07 [sbp]
perhaps I should download the latest version
22:38:22 [sbp]
[although I only downloaded it recently]
22:38:23 [AaronSw]
# don't want to give away my secret rng
22:38:32 [AaronSw]
perhaps i should upload the latest version
22:38:38 [sbp]
good idea
22:39:08 [sbp]
* sbp finds the tarball: http://cvs.plexdev.org/viewcvs/viewcvs.cgi/plex/plex/plexrdf/plexrdf.tar.gz?tarball=1
22:40:03 [sbp]
I thought: there's no way that I'm going to port all of Eep to PlexRDF, and there's no way that you're going to port PlexRDF to Eep. So the best thing to do is create a bride, and then we're both happy: we can work with the APIs that are most natural to us
22:40:15 [sbp]
s/bride/bridge/
22:40:30 [AaronSw]
i never get that problem
22:40:41 [sbp]
I should download the latest version
22:40:49 [sbp]
can you check it in?
22:40:57 [wmf]
wmf has left #swhack
22:41:08 [sbp]
ugh. Didn't notice he was here
22:43:34 [sbp]
* sbp goes through the CVS tree
22:44:12 [sbp]
3 months? wow
22:44:33 [AaronSw]
hold on, about to commit
22:44:55 [sbp]
cool
22:44:59 [AaronSw]
ok
22:45:33 [sbp]
just rdfapi and rdfapi-tests?
22:45:43 [AaronSw]
yeah, those are the only things that seemed relevant
22:46:01 [AaronSw]
oh, wait
22:46:22 [AaronSw]
ok, another checkin of ruid and bases
22:47:50 [sbp]
bases isn't showing up
22:47:51 [AaronSw]
on the eep<->plexrdf bridge thing: this is not a long-term solution
22:48:08 [AaronSw]
bases has been moved to utils/
22:48:12 [sbp]
ah
22:50:10 [AaronSw]
ok, the only thing uncomitted is the crypto stuff
22:50:53 [sbp]
Hmm... import plexrdf.rdfapi as rdf doesn't work anymore
22:51:07 [AaronSw]
huh?
22:51:22 [AaronSw]
why not?
22:51:22 [sbp]
ah, I've got to get utils... ugh
22:53:03 [sbp]
Hmm...
22:53:04 [sbp]
raise InputError, value
22:53:04 [sbp]
Must be a u'literal' 'uri' or Node(): data:,World%20Wide%20Web%20Consortium%20%28W3C%29
22:53:11 [sbp]
but it is a URI
22:54:49 [sbp]
I think it's a problem in PlexRDF again
22:55:00 [sbp]
File "eeplex.py", line 57, in test
22:55:01 [sbp]
u"World Wide Web Consortium (W3C)")
22:55:01 [sbp]
File "plexrdf/rdfapi.py", line 114, in triple
22:55:01 [sbp]
result = Triple(self, s, p, o)
22:55:01 [sbp]
File "plexrdf/rdfapi.py", line 84, in __init__
22:55:01 [sbp]
self.object = node(o)
22:55:02 [sbp]
File "plexrdf/rdfapi.py", line 66, in node
22:55:04 [sbp]
raise InputError, value
22:58:04 [sbp]
funny: I dunno what's wrong with it. It should convert the u'' string into a URI (as it did), and that should be a '' string
23:01:58 [AaronSw]
hmm
23:02:09 [AaronSw]
do the rdfapi-tests work?
23:02:25 [sbp]
nop
23:02:29 [sbp]
s/nop/nope/
23:02:35 [sbp]
raise InputError, value
23:02:35 [sbp]
Must be a u'literal' 'uri' or Node(): data:,World%20Wide%20Web%20Consortium%20%28W3C%29
23:10:08 [sbp]
oh: it didn't convert it out of unicode: <type 'unicode'>
23:11:07 [AaronSw]
ah
23:11:51 [sbp]
but I don't know why :-)
23:12:20 [AaronSw]
* AaronSw commits fix
23:12:41 [sbp]
ah: return str('data:,' + urllib.quote(value))
23:14:20 [sbp]
argh: AttributeError: Store instance has no attribute 'tripleList'
23:15:20 [sbp]
ooh! you fixed __repr__. Even better
23:16:13 [sbp]
File "plexrdf/ntriples.py", line 81, in serialize
23:16:13 [sbp]
for t in store.tripleList:
23:16:13 [sbp]
AttributeError: Store instance has no attribute 'tripleList'
23:17:05 [AaronSw]
hm
23:17:05 [sbp]
fixed on my local copy (you need to fix it your end too)
23:17:11 [AaronSw]
how do i fix it?
23:17:13 [sbp]
but (ugh) it still repeats the nodes
23:17:18 [sbp]
fix: for t in store:
23:17:38 [AaronSw]
maybe your rng is bum
23:17:56 [sbp]
pardon?
23:18:57 [AaronSw]
rng = random number generator
23:19:32 [sbp]
well, 'tis Python 2.2
23:19:41 [sbp]
$ python -V
23:19:41 [sbp]
Python 2.2
23:19:48 [AaronSw]
same here
23:19:58 [sbp]
and RUID uses "time" anyway
23:20:09 [AaronSw]
oh, maybe your clock is bad.
23:21:04 [sbp]
$ u timenow; echo ''; u timenow
23:21:04 [sbp]
20020217-232118
23:21:04 [sbp]
20020217-232119
23:21:13 [sbp]
seems alright
23:22:00 [AaronSw]
try running ruid three times in a row
23:23:39 [sbp]
ah, you're right:-
23:24:07 [sbp]
CJG6lRcGgzvJ
23:24:07 [sbp]
CJG6lRcGgzvJ
23:24:07 [sbp]
CJG6lRcGgzvJ
23:24:18 [AaronSw]
heh
23:24:33 [sbp]
NSRUID
23:25:44 [sbp]
"Note that even though the time is always returned as a floating point number, not all systems provide time with a better precision than 1 second." - \Python22\Doc\lib\module-time.html
23:28:24 [AaronSw]
it still should use a random number
23:29:21 [sbp]
Hmm... Well, I do: ''.join([string.lowercase[random.randrange(0, 25)] for x in xrange(8)])
23:29:51 [sbp]
and it works. I'm not sure why RUID is borked - it uses the same module
23:30:15 [AaronSw]
that is weird
23:30:43 [sbp]
oh. you're seeding it with the same thing each time. Pff!
23:30:59 [AaronSw]
i'm seeding it with time
23:31:08 [sbp]
yes, but my time is borked
23:31:16 [AaronSw]
ah.
23:35:51 [sbp]
I could just add random.randrange(0, 5000) onto it or something
23:36:13 [AaronSw]
sorry, i'm not feeling well enough to fix this now
23:36:30 [sbp]
in RUID: s = random.randrange(0, 100)
23:36:30 [sbp]
eek, you're feeling ill?
23:36:44 [AaronSw]
i guess i should remove the seeding
23:36:49 [AaronSw]
yeah, i've been feeling sorta sick all day
23:36:54 [sbp]
no worries
23:36:56 [sbp]
[ooh, that fixed it]
23:37:05 [sbp]
perhaps you're overworked
23:38:51 [AaronSw]
maybe...
23:39:44 [sbp]
wow, it still collided!:-
23:39:45 [sbp]
_:ruidiVSB70vNj5ZW <temp:eats> <temp:food> .
23:39:45 [sbp]
?ruidiVSB70vNj5ZW <rdf:type> <rdfs:Resource> .
23:39:53 [AaronSw]
hmm
23:39:57 [sbp]
I think that was a fluke though: it has a 1 in 100 chance of failing
23:40:09 [AaronSw]
sbp, just remove the seed lines
23:40:48 [sbp]
nah, that didn't work
23:41:17 [AaronSw]
why? works on my machine
23:41:29 [AaronSw]
just changing it to 100 isn't any better
23:41:33 [AaronSw]
it's worse
23:42:04 [sbp]
I now have:-
23:42:05 [sbp]
[[[
23:42:06 [sbp]
s1 = random.randrange(0, 100)
23:42:06 [sbp]
for i in range(20): s1 *= time()
23:42:06 [sbp]
s2 = random.randrange(0, 100)
23:42:06 [sbp]
for i in range(20): s2 *= time()
23:42:07 [sbp]
r.seed(s1+s2)
23:42:09 [sbp]
]]]
23:42:37 [sbp]
which works, but it's not perfect
23:43:04 [AaronSw]
just remove the seed code
23:43:11 [AaronSw]
gotta run: dinner
23:43:25 [sbp]
O.K.
23:43:37 [sbp]
I did remove the seed code, and it didn't work. I'll continue hacking it
23:47:58 [sbp]
here we go:-
23:47:58 [sbp]
chars = string.lowercase+string.uppercase+string.digits
23:47:59 [sbp]
return ''.join([chars[random.randrange(0, 61)]
23:47:59 [sbp]
for x in xrange(10)])
23:48:27 [sbp]
gives 10^62 variations. That should do
23:51:27 [sbp]
er... 62^10, rather
23:51:47 [sbp]
heh. Just a bit different. But still 839,299,365,868,340,224
23:55:56 [sbp]
N.B. It didn't work when I removed the seed code because it still relies upon the date