IRC Logs for #circuits Saturday, 2014-04-05

*** silicio has joined #circuits00:49
ircnotifier860d22e87553 by prologic: Fix for Python 3 compat02:02
ircnotifier6180c1d29488 by prologic: Add newline to ready output02:02
ircnotifier4af3e5a78b11 by prologic: Vastly improved the features doc of circuits.web. Fixes Issue #6102:02
ircnotifiere3add036f329 by prologic: Improved the circuits.web How To guides02:02
prologichi silicio02:03
siliciohi prologic, how are you doing?02:14
prologicgood thanks!02:18
prologicyourself?02:18
prologicare you in the right channel btw? :)02:18
prologicThis is circuits -- the Python Application Framework :)02:18
siliciooh, I see. I'm sorry, I thought it was about electronic circuits.02:28
*** silicio has left #circuits ("Leaving")02:31
prologichehe02:32
prologicnps02:32
prologictry #electronics :)02:32
prologicor #arduino :)02:32
ircnotifierdb45d97225b4 by prologic: Repsect default arguments of request handlers when doing path traversal. Fixes Issue #4706:59
spaceoneprologic: can you tell me again: the circuits.web-WSGI mechanism is 1.) one process which runs all the time or 2.) the process is started for each request?10:06
prologicright now it's 1)11:03
prologicbut I would like to change this11:03
prologicto use the Worker() component11:03
prologicso wsgi callables are shoved through a multiprocessing pool11:03
prologicsomething I've been meaning to do for a while11:03
prologicShould we try to aim to do this for 3.0 or 3.1?11:03
spaceone3.211:07
ircnotifier75ec89e0be3c by prologic: Fixed incorrect its vs. it's usage11:07
prologicYeah okay11:07
prologicI'll write up an issue11:07
prologicre the Cookies example11:08
prologicit has to be that way11:08
prologicit doesn't work oehterwise11:08
prologicwhat you get back from the Cookies object11:08
spaceonehm? then i don't understand how this work11:08
prologicis not the raw value11:08
spaceones11:08
prologicbut a wrapped object11:08
prologicwith .value being the value11:08
prologicit's just how the stdlib cookie jar works11:08
prologicnot as nice as it should be11:08
prologicbut if we wanted better cookies storage11:08
prologicwe'd have to write our own I guess11:09
spaceonebut how is the cookie combined with the session then?11:09
prologicsorry?11:09
spaceonein your example there are 2 different values11:09
spaceone1 taken from the URI and one taken from the cookie11:09
spaceonethey don't seem to have something in common together11:10
prologichttp://circuits.readthedocs.org/en/latest/web/features.html#session-handling11:10
prologicthis one at the bottom?11:10
spaceoneyes11:11
spaceone"Combining Sessions with Cookies:"11:11
spaceonein that example the user decides the value of visits instead that the server decides it11:12
spaceone(this is the main purpose of cookies in the web)11:12
spaceone(i don't like cookies, actually i hate them, but ofc. the functionality should exist)11:13
prologicahh yes11:14
prologicI see your point11:14
prologicstoring the no. of visits in the users's browser is not ideal11:14
prologicI should change this11:14
prologicbad example :)11:14
spaceonethat is what i meanted when i wrote "combining session with cookie"11:14
spaceonemy example does that purpose11:14
spaceone(maybe i forgot to add a .value)11:15
ircnotifier5caecf28c137 by prologic: Fixed typo11:15
prologicyeah you need a .value11:15
prologicgot a full example handy?11:15
prologicI'll just replace mine with yours11:15
prologicalso re db stuff11:15
prologicthere really is no good way11:15
prologicexcept just to "use it" as is11:15
prologichardly any database engines support async i/o11:16
prologicusually most other frameworks just thread the calls11:16
prologicproblem is, circuits has no nice component to "do this for you"11:16
prologicI mean the database stuff11:16
prologici.e: a dbapi component or such11:16
spaceonehm, sqlalchemy suppports async io?11:16
prologicno11:16
prologicit doesn't11:17
prologicit uses multithreading11:17
prologichardly any RDBMS's support async i/o11:17
prologicfew a few exceptions11:17
prologicbut there's no consistent way11:17
prologictwisted for example has dbapi modules11:17
spaceone"@prologic | hardly any RDBMS's support async i/o" → don't support?11:17
prologicthat wrap dbapi in multirehading pools11:17
prologicyes don't11:17
prologice.g: mongo does11:18
prologicwith the motor library on pypi11:18
prologicthat's one I know of11:18
prologicsqlite doesn't11:18
prologicmysql/maria doesn't11:18
prologicpostgresql doesn't I'm pretty sure11:18
spaceonehmm :(11:18
prologicdb stuff just sucks11:18
prologicbasically in your web app11:18
spaceoneyes, but how much impact does it havE?11:18
prologicyou should just fire a task() event with a function to complete your db call11:19
spaceoneis it blocking long time?11:19
prologicor similar11:19
prologicand I think Justin does this with all his apps11:19
prologicthat's precisely the point I was making in the docs11:19
spaceoneare these apps open source?11:19
prologicjust use it as-is11:19
prologicit'll be fine most of the time11:19
prologicthen load balance and spawn multiple backends11:19
prologicas long as your database queries ton't take too long11:19
prologicyour app will be fine11:19
spaceone(i didn't have performance problems when i used sqlalchemy in a previous project)11:19
prologicno neither do I11:20
prologicif you'd like to improve that section11:20
prologicby all means11:20
prologicI'm just saying I'm not sure how to improve it11:20
spaceonei mean it's only sqlite with some SELECT statements11:20
prologica) I have no good examples to show11:20
spaceoneok11:20
prologicb) I don't use databases much really11:20
prologicand c) it all sucks ;/11:20
spaceonethe point what i wanted with that comments was:11:20
spaceoneit's very good to show that problem(atic?)11:21
prologicso hmm11:21
prologicwhat are you saying?11:21
prologicI should write a trival example using sqlite11:21
prologicthat blocks for a long time11:21
spaceonenoo11:21
prologicto show how badly it can be done?11:21
spaceoneno11:21
spaceone!11:21
spaceoneno!11:21
prologicok : )11:21
spaceonei want you to only change the first sentence11:21
prologicto?11:22
spaceonebecause for new users it feels like "don't use circuits'11:22
prologicok :)11:22
spaceoneinstead of "using SQL is a general problem in any web app"11:22
prologicahh k11:22
prologicalright11:22
prologiclet me try to re-phrase it11:22
spaceoneyep11:22
spaceonebtw. you improoved your typo-skills11:23
spaceonei didn't find that much11:23
spaceonehmm, my comments are gone?11:25
spaceoneprologic: can you sync latest to github11:26
prologichttp://arrow.shortcircuit.net.au:9000/11:33
prologichow's this?11:33
prologichttp://arrow.shortcircuit.net.au:9000/web/howtos.html#how-do-i-integrate-with-wsgi-applications11:33
prologichttp://arrow.shortcircuit.net.au:9000/web/howtos.html#how-do-i-integrate-with-a-database11:33
prologicwrong one :)11:33
prologicthis one11:33
*** circuits_github has joined #circuits11:34
circuits_github[circuits] therealprologic pushed 1 new commit to Issue78: http://git.io/jJiA6A11:34
circuits_githubcircuits/Issue78 bdea670 James Mills: Configure releases_document_name (See: https://github.com/bitprophet/releases/issues/22) -- See Issue #7811:34
*** circuits_github has left #circuits ()11:34
spaceoneAsynchronous → asynchronous11:35
prologic� <-- what's this?11:35
prologicit doesn't display properly here :)11:35
spaceone'a'11:36
spaceonei would merge the Note with the Warning!11:36
prologicok11:37
prologicdone11:37
spaceone"using databases in a async framework is problematic beacause most DB implementations doesn't support async ip operations"11:37
spaceonethe solution for this is to using threading11:38
spaceonethe following shows ways how to achieve the wanted behavior / db integration11:38
prologicok11:43
prologicupdated again :)11:43
spaceone:D please write out the shortened words11:44
spaceoneasync → asynchronous11:44
spaceoneDB → database11:45
spaceoneand the last two sentenced sound a little bit odd, maybe they can be rephrased or merged11:45
spaceonedo you still have the old version?11:45
spaceonebeacause → because11:46
spaceonemaybe "To achieve database integration a simple solution is to use threading"11:47
prologicok there11:50
prologicthis has to be it now :)11:50
prologicI haven't committed yet :)11:50
spaceoneyes, sounds good!11:52
prologicexcellent11:54
*** circuits_github has joined #circuits11:55
circuits_github[circuits] therealprologic pushed 1 new commit to master: http://git.io/AhU-Dw11:55
circuits_githubcircuits/master daadee9 James Mills: Improve database integration section in circuits.web howto guides11:55
*** circuits_github has left #circuits ()11:55
ircnotifier6cb4d325e867 by prologic: Improve database integration section in circuits.web howto guides11:55
prologicre Response.prepare()12:07
prologicwhat do you propose we do about it?12:07
spaceoneuhm, currently only noticing12:08
spaceoneit only happens when you wrongly use circuits12:08
spaceonein httoop and circuits.http i made sure that this cannot happen12:08
spaceonei can't imagine how this can be fixed in curcuits.web12:09
prologichmm12:09
prologicI agree we should handle this better12:09
prologicproblem is it's kinda the crux of the response12:09
prologicif that breaks how do you get a response out12:09
spaceonecrux?12:09
prologiccore issue12:09
prologichow did you make sure this can't happen in your library?12:10
spaceonein the very last exception case i am writing self.write(sock, bytes(Repsonse(500)))12:10
spaceonei was unable to trigger this case currently but then we cannot do anything more12:11
spaceonei also encoupled semantics from syntax12:12
spaceoneand ofc. i don't use third party libs (e.g. from python stdlib) in my core. (many of them are error prone, e.g. cookielib)12:15
prologictrue12:15
spaceone(i am not so good in expressing what i really mean in english sentences, i guess that is a big problem in our conversations)12:18
prologichttp://codepad.org/IyIbbEZq12:23
prologichttp://codepad.org/bVHOnG1K12:23
prologichttp://codepad.org/oZp1yerm12:23
spaceonei would fix this one layer deeper12:25
spaceonewhere str(response) is called12:25
spaceone(in my implementation there is only 1 place where str(response) is called). if there are multiple places in circuits.web then your fix is currently better12:26
spaceone!12:26
spaceoneah prologic… i didn't see that self.session is already cookie based12:39
prologicit is12:53
prologicI'm off to bed12:53
*** circuits_github has joined #circuits12:53
circuits_github[circuits] spaceone opened pull request #6: make clear that the session is based on cookies in the documentation (master...master) http://git.io/0qtsBg12:53
*** circuits_github has left #circuits ()12:53
*** circuits_github has joined #circuits12:55
circuits_github[circuits] therealprologic pushed 2 new commits to master: http://git.io/tTqtKQ12:55
circuits_githubcircuits/master dc47e25 SpaceOne: make clear that the session is based on cookies in the documentation12:55
circuits_githubcircuits/master 15cd4a6 James Mills: Merge pull request #6 from spaceone/master...12:55
*** circuits_github has left #circuits ()12:55
*** irclogger has joined #circuits14:57
ircnotifierf528a080ce71 by spaceone: make clear that the session is based on cookies in the documentation21:49
ircnotifier4a5b0afda3ac by prologic: Merge pull request #6 from spaceone/master21:49
*** bloody_ has quit IRC22:25
*** epicmuffin has joined #circuits22:27
prologic_hello epicmuffin22:44
prologichttp://arrow.shortcircuit.net.au:9000/tutorials/telnet/index.html23:16
prologicwho's around?23:16
spaceoneon monday i have to submit my final-project23:19
spaceonethe telnet grafic looks godd23:19
prologichehe23:23
prologicgood luck!23:23
prologicI'm pretty happy with this little tutorial23:23
prologicI'll commit and push it up23:23
prologicRe Issue #86: https://bitbucket.org/circuits/circuits/issue/86/telnet-tutorial23:23
prologicc45y wanted to see a few more non-trivial / non-contrived tutorials23:24
ircnotifier2ae8780cfc5b by prologic: Telnet Tutorial: Closes Issue #8623:30

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!