PMXBOT Log file Viewer

Help | Karma | Search:

#dcpython logs for Monday the 14th of November, 2011

(Back to #dcpython overview) (Back to channel listing) (Animate logs)
[14:35:28] <aclark> morning
[14:35:39] <MattBowen> aclark: !
[14:36:51] <aclark> MattBowen!
[14:37:54] <MattBowen> aclark: neat -- what were you doing with it?
[14:38:03] <MattBowen> aclark: i used it for a pubsub system backed by scala, but just a toy
[14:38:52] <aclark> using it on vanity.aclark.net to store entries
[15:01:50] <hazmat> i did some queuing work with redis a few weeks ago similiar to resque, its nice.. but i think i'm going to switch out for mongodb (findandmodify for atomic queue ops)
[15:02:07] <hazmat> i'm curious about the pubsub functionality of redis though
[16:08:53] <aclark> anyone want to critique this change for webscale! https://github.com/ACLARKNET/vanity_aclark_net/commit/b8aa113ad5d175d8482fd279939007d2eec87b84
[16:10:40] <aclark> kennethreitz: still in sf?
[16:14:30] <kennethreitz> aclark: got back yesterday :)
[16:17:16] <aclark> kennethreitz: ah! any interest in fixing vaincheese? people are opening tickets on vanity.aclark.net re: case sensitivity (not important at all of course :-))
[16:17:31] <kennethreitz> haha, nice :)
[16:17:41] <kennethreitz> Remind me later today :)
[16:17:48] <aclark> k
[16:18:15] <aclark> kennethreitz: i noticed you hadn't committed the change to version 1.1.2 in the code, FWIW
[16:18:29] <kennethreitz> local version
[16:18:36] <kennethreitz> er, didn't push it to github
[16:18:48] <aclark> kennethreitz: next i'm going to add ALL the packages on pypi somehow, so i can pick a random one and get it's dl count
[16:19:00] <aclark> only way i know is to look at /simple, unfortunately
[16:19:17] <j00bar> aclark: how much traffic did steve holden send your way?
[16:19:24] <kennethreitz> only have 5mb of cache on it i think
[16:19:36] <aclark> j00bar: hah, haven't looked yet… only made like 50 cents on adsense though ;-)
[16:19:54] <aclark> j00bar: it's hilarious he is opening tickets on it
[16:19:54] <j00bar> aclark: what does your filter() fn do?
[16:20:00] <j00bar> in your changeset?
[16:20:15] <aclark> j00bar: takes all the redis entries from lrange and returns the first uniq 20 (i hope)
[16:20:32] <j00bar> why are you using a list?
[16:20:41] <j00bar> (haven't read any of the other code)
[16:20:43] <aclark> j00bar: in filter or in redis?
[16:20:49] <j00bar> in redis
[16:21:17] <aclark> j00bar: because i when i read the redis docs i found lpush and that sounded like a good way to keep track of entries
[16:21:26] <j00bar> only if the order matters
[16:21:31] <aclark> it does
[16:21:44] <aclark> as i'm building a "recent" list
[16:21:47] <j00bar> ah.
[16:22:00] <aclark> at least i think it matters
[16:22:04] <j00bar> but you don't want duped entries.
[16:22:31] <aclark> right
[16:22:31] <j00bar> how large is the list?
[16:22:39] <aclark> well
[16:22:51] <aclark> i want to record the entries actually, because i'm going to do a "most requested"
[16:23:16] <j00bar> that sounds like a zset to me
[16:23:21] <aclark> so if someone requests Django 50 times and Pyramids 25 times…
[16:23:21] <aclark> oh?
[16:23:27] <j00bar> scored sets
[16:23:38] <aclark> as for size, it's infinite (or could be)
[16:23:39] <j00bar> values are unique but have a "score" associated with them
[16:23:46] <aclark> !google redis zset
[16:23:47] <pmxbot> http://twitter.com/antirez/status/5053225293 - Twitter / Salvatore Sanfilippo: The Redis ZSET type explai ...
[16:23:54] <j00bar> you can atomically increment the score associated with any member
[16:24:10] <j00bar> and you can grab by score ranges
[16:24:26] <aclark> j00bar: yeah your right, this needs to be redone non-aclark-ghetto-style, thanks
[16:24:35] <j00bar> http://redis.io/commands/#sorted_set
[16:25:06] <j00bar> and if you do stay with lists, lrange(key, 0, -1) for large sets is expensive if only for how much data it sends that you eventually throw away
[16:25:21] <aclark> i thought that too
[16:25:36] <j00bar> for small lists, back-and-forth for multiple redis lookups is slower
[16:25:51] <j00bar> for large lists, grabbing smaller chunks and concat'ing is faster
[16:26:06] <aclark> IC, interesting
[16:26:33] <j00bar> so if you were to identify the avg likelihood of there being dupes in any sequence of 20, (say it's 10), grab 30 entries
[16:26:37] <j00bar> then if you need more, grab more
[16:27:35] <aclark> efficient
[16:27:56] <j00bar> <3 teh redises
[16:32:01] <aclark> j00bar: it's really nice. i love stuff that is easy to get started with and redis could not have been simpler
[16:33:28] <j00bar> also hiredis++
[16:50:53] <aclark> time for "real work" ;-)
[16:52:30] <aclark> I'm already loving vanity.aclark.net for package pimping. never would have heard of ErikRose's http://pypi.python.org/pypi/blessings
[17:48:29] <j00bar> neat - tburke just showed me this: http://pypi.python.org/pypi/Dozer
[17:50:29] <aclark> j00bar: i've seen that, some dude came to a meetup and wanted to name his PythonPaste killer "Dozer" and people were like "Uhhh… it exists". Actually, I think it was me that said that because I looked the name up on PyPI
[17:50:45] <aclark> never tried it though
[17:54:39] <benji> I would think some sort of vanity badge would be popular. People could put it on their non-pypi package home page to show off.
[17:55:41] <aclark> benji: open a ticket! :-)
[17:56:22] <benji> aclark: you drastically underestimate my lazyness
[17:57:58] <j00bar> aclark: pmxbot needs to support opening tickets for you
[18:02:26] <aclark> j00bar: or DCPython_Hubot
[18:14:40] <j00bar> DCPython_Hubot sleeps in too late. doesn't even come into work until 1pm.
[18:25:37] <aclark> !slap DCPython_Hubot
[23:14:28] <aclark> jaraco: anyone ever thought about including pip w/distribute?