IRC Logs for #circuits Monday, 2015-02-23

*** Osso has joined #circuits00:04
*** Osso has quit IRC00:09
riothow do i use worker pools in a request handler? return and yield don't mix so well00:20
prologicyeah you must not return00:23
prologicyou must yield00:23
riotjust exchange all returns with yields?00:23
prologicFoe xample:
riothmm, i see. Another one: i often get recursive errors that output a lot of repetitions and then blow the stack. Is there a way to stop that? It annoys me like heck ;)00:26
riotinteresting project, btw.00:32
riotand how can i get at any log/debug output from tasks?00:55
riotthis is not working well. As soon as i call the task via it returns nonetype and does other wild things01:22
riotif i call it as singlethreaded function, all goes smooth01:23
prologic<riot> hmm, i see. Another one: i often get recursive errors that output a lot of repetitions and then blow the stack. Is there a way to stop that? It annoys me like heck ;) <-- you'll have to be more specific01:24
prologicnormally this is caused by a mis-use of some part of hte framework01:24
prologicor for example not calling super(MySubclassedComponent, self).__init__(...)01:24
prologiccan you show me a stripped down version of this?01:25
riotit is very hard to get at errors in threads. Is there any help for that?01:52
prologicthreads or processes?01:53
*** Osso has joined #circuits01:53
riotthreads i assume, i've tried to follow your controller example.01:54
riotnow i get "NoneType object is not iterable"-exceptions, well, yeah, duh.01:55
prologicpaste a bit of your code?01:56
riothere you go:
rioti need to thread the url-getting because the internet might be very flaky and may not ever pause other parts of the system01:58
*** Osso has quit IRC01:58
prologicL111:                 yield serve_file(request, response, filename)02:04
prologicI don't think this is going to work02:04
prologicwhere's your
prologicL144                     yield serve_file(request, response, filename)02:04
prologicsame there too02:04
prologicL153:                         yield serve_file(request, response, self.defaulttile)02:05
prologicsame thing there too02:05
*** koobs has quit IRC02:05
riotno, actually, without the call, it works - the cached cases and default tile work good, but as soon as it finds an uncached tile and needs to call the task02:07
riotin L120, i get this trace:
*** koobs has joined #circuits02:09
rioti'm probably too tired to get this to work today, gotta catch some sleep :/02:10
prologictile, log = yield (yield
prologicI could be wrong but our coroutine implemtnation probably doesn't give you a usefable result straight away02:12
prologicwhich it shouldn't really02:12
prologicOsso: is that right?02:13
prologicoh he's not here02:13
riotnope, thats not it02:13
*** koobs has quit IRC02:14
prologicwhat does your task function look like?02:19
prologicAre you starting the Worker in process or thread mode?02:19
*** koobs has joined #circuits02:23
*** Osso has joined #circuits05:31
*** Osso has quit IRC05:36
*** Osso has joined #circuits09:08
*** Osso has quit IRC09:13
*** Osso has joined #circuits09:18
*** ninkotech has quit IRC09:57
*** 7GHAAYHNJ has joined #circuits10:07
riotprologic: hm, doesn't matter. The task is ll. 19-4311:05
riot(doesn't matter: what way i set up the workerpool, thread or process)11:05
prologicpaste that again I'll have a quick look before I got o bed11:07
riotthe function works, when run singlethreaded11:19
rioti.e with simple return call11:19
prologicone sec11:23
prologicAt L12011:24
prologicwhat is the value and type that comes back from
rioti've tried (debug code as in ll 21) with a str-tuple, but the original should just contain one binary blob that i got with urllib.urlopen11:26
riothmm, i have to check whether i get different results with py2.x..11:27
prologicgood idea11:27
prologicbecause you're using Python3 here11:28
prologicand whilst we do support it11:28
prologicwe may have missed something maybe11:28
prologicwe do unit test against it though11:28
riotsame error :/11:28
riotwith the debugging supplement Value ([<Value (('Foo', 'bar'))11:28
riotooh, i _think_ i have it running11:35
riotyeah, seems to work11:35
riotlets check with the "lame" source...11:36
riotbetter. but i gtg.11:44
prologicI'd be curious to know what "fixed" it :)12:01
prologicbut I'm going to bed12:01
prologici'll check the logs int he morning12:01
*** Osso_ has joined #circuits15:22
*** Osso has quit IRC15:23
*** Osso_ has joined #circuits16:16
*** Osso has joined #circuits16:25
*** Osso_ has joined #circuits16:33
*** Osso has quit IRC16:34
*** green1 has joined #circuits17:01
*** Osso has joined #circuits20:49
*** green1 has quit IRC21:22
*** green1 has joined #circuits21:23
riotprologic: okay, the tilecache works rather well now =)22:03
riotstill, my openseamaplayer broke, the urls are weird and resolve to 404's :/22:03
prologicwhat did you do to fix it?22:06
prologicI'm curious :)22:06
prologicbeen a while since I've done any work on circuits of late22:06
prologictoo busy with my real job and Django :)22:06
*** Osso_ has joined #circuits23:01
*** Osso has quit IRC23:02
*** green1 has quit IRC23:10
*** green1 has joined #circuits23:10
pdurbinprologic: how's Django treating you?23:30
prologicpdurbin: fucking terrible haha23:49
prologicno really23:49
prologicit might work well for a lot of people as a high level web framework23:49
pdurbinheh. why?23:49
prologicor is it a cms23:49
prologicbut seriously23:49
prologicthere are some/many things that are just so annoying23:49
prologicfor instance they've only just implemented proper http response streaming this year ffs23:49
prologicthis year! 201523:49
prologiccircuits.web has had streaming for god knows how long23:50
prologicever since it was conceieved?23:50
prologicthe whole point of async :)23:50
prologicand like other big massive frameworks it suffers from flexibilie and extensiblibility23:50
prologicbecause of complex business requirements23:50
prologicbut that's not Django's fault really23:50
prologicwell it kind of is23:50
prologicbecasue it's al OO23:50
prologicand very much WSGI (i.e: callables)23:51
prologiccallables and decorators23:51
prologicyou end up with some nice stacks of cuntction calls :)23:51
prologicfor instance we'd have to do things like completely copy the Django 1.2 entire caching framework into our own codebase23:51
prologicbecause we wanted to customize the way the cache keys were calculated23:51
prologicbecause it's not possible to voerride this in Django23:51
prologicnot in in the latest version 1.823:51
prologicanyway I'm bitching really23:52
prologicit's a fine web framework / cms23:52
prologic*iif* you use it as it is23:52
pdurbinis it fine if you kind of go with the way Django wants you to do things?23:52
prologicand don't try to do things outside of it's boundaries23:52
prologicyes probably23:52
prologicisn't any framework? :)23:52
prologicI guess that's why circuits and subsequently circuits.web tries to do very little for you as such23:53
pdurbinso what's a good use case for Django?23:53
prologicgives you a powerful component architecture and messaging framework23:53
prologicbut not much else23:53
prologica quick website that you slap together?23:53
prologicor content heavy website?23:53
prologicalso really it's quite slow IHMO23:53
prologicit's not optimized for high traffic/concurrent use really23:53
prologicyou have to do a lot of load balancing, caching, etc to really get godo performance out of it23:54
prologicif you have a lot of models it takes a while to spin up an instance of the app23:54
pdurbinprologic: on the circuits website have you written up a comparison with Django?23:55
prologicdo you think I should?23:55
prologicit wouldn't be a farie comparsion I don't htink23:55
prologicDjango is very high level23:55
pdurbinyou absolutely should23:55
prologicORM, Templates, Views, Models23:56
prologicCaching, etc23:56
pdurbinmore people have heard of Django, I suspect. so it would be instructive23:56
prologicwell I think it's time to redo all my sites anyway23:56
prologicgive them a new look and feel23:56
prologicbootstrap3 probably23:56
prologicand get some more content up there23:56
prologiclike don't get me wrong23:56
prologicDjango is fine really for what it's designed to do23:57
prologicand it tried to do everything without dependenices23:57
prologicit has it's own orm, template engine23:57
prologicit's own routing23:57
prologicit's own http server23:57
prologicbut yeah great for putting together a quick site23:57
prologicand stick to it's way :)23:57
pdurbingood for prototyping?23:57
prologicand things like tastepie work nicely with django for rest apis23:58
prologicprototyping what?23:58
prologicI'd use the word "good for slapping together a website"23:58
pdurbin"I need a webapp that does X"23:58
prologicbut not prototyping a specialized app23:59
prologicor restful services23:59
prologicwell that's the thing I guess23:59
prologicall webapps really start to look/feel the same really23:59
prologicthey're basically glorified websites23:59
prologicunless you're talking single-page apps23:59
prologicwith heavy use of websockets and/or ajax23:59
prologicyou know - an app tha truns client-side23:59

Generated by 2.11.0 by Marius Gedminas - find it at!