PMXBOT Log file Viewer

Help | Karma | Search:

#dcpython logs for Tuesday the 29th of November, 2011

(Back to #dcpython overview) (Back to channel listing) (Animate logs)
[00:07:18] <aclark> oath is annoying… ish.
[00:07:40] <aclark> s/oath/oauth/
[16:12:10] <aclark> morning
[16:12:39] <aclark> so, paul smith had to cancel for next tues anyone want to save the day?
[16:15:28] <dahoste> :(
[16:16:55] <aclark> dahoste: oh like you were going to come :-)
[16:16:56] <aclark> j/k
[16:16:58] <aclark> yeah
[16:17:21] <aclark> kinda sucks but we'll reschedule it
[16:17:43] <dahoste> totally was... it was going to be my inaugural appearance! (no, not really)
[16:18:07] <dahoste> but I was feeling even worse than usual, about not going, since it'd been hyped up. :)
[16:21:37] <aclark> j00bar to the resq
[16:21:41] <aclark> dahoste: hah
[16:21:52] <aclark> dahoste: come in january there will be schwag
[16:21:59] <dahoste> aclark, roger that.
[16:22:13] <aclark> like, lots of it IIUC
[16:31:19] <kennethreitz> j00bar: why you chose redis for the celery backend
[16:31:28] <j00bar> kennethreitz: sane chords
[16:31:38] <kennethreitz> dahoste: debatably the most awesome schwag you've ever seen
[16:32:00] <j00bar> kennethreitz: chords are tasksets that have a callback when all tasks in the taskset are complete
[16:32:00] <kennethreitz> there were python shotglasses at pycodeconf
[16:32:39] <j00bar> redis backend basically sets up a counter and since redis has atomic decrement-and-return, decrements that counter as each task in the taskset is finished until it hits zero - at which point the call back is dispatched
[16:32:49] <kennethreitz> oh i meant for you talk
[16:32:51] <kennethreitz> :)
[16:33:22] <j00bar> oh - we use redis for a lot of other stuff. the celery talk wouldn't be redis specific.
[16:33:24] <aclark> Y U NO CHOOSE RIGHT TECHNOLOGY?! :-)
[16:33:59] <j00bar> y u no liek vegtabels
[16:34:42] <kennethreitz> i use redis for everything
[16:34:52] <aclark> i can see that
[16:34:57] <kennethreitz> that isn't a relational
[16:35:09] <j00bar> kennethreitz: i use frank's red hot.
[16:35:31] <j00bar> kennethreitz: ever use redis' pseudo relational features?
[16:35:46] <kennethreitz> oh?
[16:36:07] <aclark> IIRC we had a redis talk that i spaced out in…
[16:36:10] <j00bar> the hidden gem of redis - super powerful, super hard to use right: http://redis.io/commands/sort
[16:36:23] <aclark> either that or i'm thinking of the mongo db talk
[16:37:08] <j00bar> also, coming in redis 2.6 - server-side scripting support
[16:37:25] <kennethreitz> yay lua
[16:38:05] <j00bar> kennethreitz: the real win there is embedded JSON processing
[16:38:18] <j00bar> lua's c-based json library is included
[16:38:39] <j00bar> makes my protobuf solution rather silly.
[16:38:49] <kennethreitz> yeah, i remember antirez going back and forth on that
[16:38:52] <kennethreitz> super awesome
[16:39:00] <j00bar> well, it's going to be horribly misused.
[16:39:06] <kennethreitz> of course it is
[16:39:10] <kennethreitz> that's the fun :)
[16:39:20] <kennethreitz> i think it's great though
[16:39:40] <j00bar> you know the old saying, "give a mouse weapons-grade plutonium..."
[16:39:48] <j00bar> or something like that.
[16:41:12] <aclark> hah
[17:05:15] <hazmat> celery has lots of gotchas
[17:29:00] <aclark> k
[17:36:29] <kennethreitz> that's why a celery talk would be good
[17:36:32] <kennethreitz> ;)
[17:42:03] <aclark> Title: "Celery has lots of gotchas" by Kapil Thangavelu :-)
[18:54:15] <j00bar> aclark: is there an initial verdict?
[18:54:38] <aclark> j00bar: yeah, redis
[18:56:39] <j00bar> okey doke.
[18:56:49] <j00bar> 30-45 you said?
[18:57:33] <aclark> j00bar: right. we usually go around the room for most of the first hour then have a talk
[18:57:45] <j00bar> bueno
[19:22:21] <hazmat> nice
[19:23:15] <hazmat> aclark, it might be more aptly titled "friends don't let friends use celery" ;-)
[19:23:25] <aclark> hah, nice
[19:24:12] <hazmat> its probably fine with redis, but for other storages, it needs to more actively promote ones that work at scale
[19:24:28] <hazmat> like don't use rdbms for queues, don't use rabbit for results, etc
[19:24:52] <hazmat> its a lot of code and policy for a problem that can be handled pretty simply by rolling your own
[19:24:59] <hazmat> or use something as simple as pyresque
[19:25:34] <hazmat> er.. i mean pyres.. https://github.com/binarydud/pyres
[19:25:35] <aclark> did we have a celery talk once? it's all a blur…
[19:26:04] <hazmat> probably
[19:26:15] <hazmat> my attendance isn't particularly regular
[19:27:07] <aclark> yes we did: http://www.slideshare.net/richleland/celery-the-distributed-task-queue
[19:49:19] <aclark> DJANGO Y U NO NAMESPACE PACKAGES FOR SETTINGS MODULE
[19:51:34] <papna> Ugh, namespace packages.
[19:53:38] <kennethreitz> settings in general is terrible.
[19:54:30] <aclark> kennethreitz: i'm WTF'ing over here. whenever i use the zc.buildout to install django i don't have to think about it. if i pip install it i'm lost. i should just look at what that recipe does as a reminder
[19:55:38] <aclark> i'd love to be able to say DJANGO_SETTINGS_MODULE=some.module.in.some.package but i get the impression it's looking for an actual module name not a package name ;-)
[19:56:01] <kennethreitz> who knows
[19:56:20] <kennethreitz> i think they're making it better though
[20:01:26] <aclark> i also get the sense that i just STFU and create non namespaced package i can do it like they do in https://docs.djangoproject.com/en/dev/topics/settings/ e.g. mysite.settings
[20:01:37] <aclark> s/i just/if i just/
[20:12:05] <aclark> oh neat so if you define a settings the module the admin stops allowing you to create new projects
[21:12:15] <aclark> Ah, i think what i was missing is that once you create a project you don't need django-admin.py anymore you can use manage.py
[21:12:30] <aclark> !slap aclark
[21:52:23] <richleland> aclark I use django-admin.py
[21:52:33] <richleland> peronally I despise manage.py
[21:53:21] <richleland> every time I create a virtualenv that uses Django, I modify ~/.virtualenvs/MYENV/bin/postactivate
[21:53:40] <richleland> and add export DJANGO_SETTINGS_MODULE=my.settings to it
[21:54:01] <richleland> then I can use django-admin.py from anywhere
[21:54:36] <richleland> whereas with manage.py you have to be in the folder that contains it or specify the full path to it
[21:56:15] <aclark> richleland: oic
[21:56:19] <aclark> interesting
[21:56:33] <aclark> yep
[21:59:02] <aclark> richleland: there seems to be some disconnect between Django's conventions and Python's packaging conventions… or something
[21:59:34] <richleland> aclark how so?
[21:59:36] <aclark> richleland: like can "apps" live in namespaced packages for example?
[21:59:57] <richleland> aclark sure they can
[22:00:06] <aclark> doesn't seem to be the convention
[22:00:19] <richleland> you just have to reference them in INSTALLED_APPS like 'mynamespace.myapp'
[22:00:23] <aclark> right
[22:00:28] <aclark> and install them in your venv
[22:00:32] <richleland> django.contrib is a good example
[22:00:35] <richleland> yeah
[22:00:37] <aclark> ok cool
[22:00:48] <richleland> although, that's not technically a namespaced external or anything
[22:01:41] <richleland> I really like the namespaced method of grouping apps
[22:02:17] <richleland> I started to implement something like it at natgeo - natgeo.stats, natgeo.core, etc.
[22:02:30] <richleland> but I think something about namespaces are mystical to some people
[22:02:44] <richleland> and they get scared of em or something
[22:03:55] <richleland> I wonder if (in terms of Django) the preference for loose coupling of apps tends to make folks think that namespacing is inherently weird or something
[22:04:02] <MattBowen> but, but "Namespaces are one honking great idea -- let's do more of those!"
[22:04:41] <richleland> I'd see namespaces in Django being used more to group open-sourced, organization provided apps, but I don't see that too often
[22:04:50] <aclark> richleland: apps and projects are like Plone's products and instances… terms that don't mean anything in the larger Python scope of things
[22:05:03] <richleland> aclark yep
[22:10:35] <aclark> richleland: i think i'm just trying to get at "What is the Python terminology" for this, where appropriate. Obviously a settings module is something that Python is not going to have. So can I pip install a bunch of packages, export DJANGO_SETTINGS_MODULE=some.namespaced.package.settings then run bin/paster serve myapp.ini (and only call manage.py or django-admin.py for django specific things)
[22:11:11] <aclark> Plone has a "management script" I don't really care to use any more as well
[22:11:24] <aclark> except when i have to