XSF Discussion - 2013-01-25


  1. Lance

    switching to using some form of UUID would eliminate having to deal with converting relative/full paths though

  2. Jef

    well, it is certaintly more simple

  3. Jef

    i like it

  4. Lance

    honestly, I would probably even go one further and move the <file /> element into the fis namespace

  5. Lance

    but, using the existing one does make sense, since you'll want to do file transfer. so idk

  6. Jef

    yea, it is better to reuse what we have already

  7. Jef

    and we don't really need to add or remove anything from the metadata defined in jingle

  8. Lance

    right. so that works great as is

  9. Jef

    are you going to Fosdem?

  10. Lance

    yeah. the summit and saturday at fosdem

  11. Jef

    that's awesome

  12. Lance

    I also have: https://gist.github.com/4630085

  13. Lance

    to play with doing things with disco

  14. arcriley

    hey lance

  15. arcriley

    are you a PSF member?

  16. Lance

    I dont think so

  17. arcriley

    would you like to be?

  18. Lance

    sure

  19. arcriley

    perk: special members luncheon at PyCon

  20. arcriley

    all current and prospective members can attend

  21. Lance

    sounds like the XSF perks

  22. arcriley

    pretty much lol except we dont do voting every quarter

  23. Lance

    application process?

  24. arcriley

    via nomination, and then you're voted in person at the luncheon

  25. Lance

    ah, ok

  26. arcriley

    do you maintain any python packages beyond Sleek?

  27. Lance

    Not anymore. There were a few personal ones a while back that have been obsoleted and removed

  28. arcriley

    ok

  29. Lance

    I may end up with a whole collection of them if I go with making each sleek plugin a separate package

  30. arcriley

    heh

  31. Lance

    the independent versioning that way is very tempting

  32. arcriley

    well i need to writeup a nomination about things you do in the python community. anything else i can add, like speaking at groups, sprints, etc?

  33. Lance

    unfortunately, sleek has been my only involvement in the greater python community so far

  34. Lance

    all of the groups and hackathons i've done have been at xsf functions

  35. arcriley

    oh will you be staying for the sprints at pycon?

  36. arcriley

    (thats when the real fun at pycon begins, btw)

  37. Lance

    maybe. i still have to review the schedules and what my work schedule allows

  38. arcriley

    the weekend is for the suits. they go to these massive talks and rub shoulders with us. then the conference suddenly drops to just developers and the booze and shenanegans start up

  39. Lance

    Jef: I sent a link with some disco pondering, in case you missed it in the chat history

  40. arcriley

    so much work gets done during the sprints too

  41. Lance

    sounds good, I'll try to be there then

  42. arcriley

    when fosdem is over we should start hammering out the poster. 4' x 4' infographic.

  43. Lance nods

  44. arcriley

    hey lance, quick "which is more pythonic" opinion

  45. arcriley

    right now the class decorator for xslt extensions is nodetree.Stylesheet.extension, eg: @nodetree.Stylesheet.extension('http://example.com/namespace') class MyExtension:

  46. arcriley

    the reason thats a decorator and not a superclass is the decorator registers the class to the namespace url, which a superclass couldn't do in response to defining the class

  47. arcriley

    writing a set of method decorators which "register" methods within it as either function or element extensions, which looks more pythonic:

  48. arcriley

    @nodetree.Stylesheet.ext_function('hello') def hello(self, args) : return 'hello, world!'

  49. arcriley

    or @nodetree.Stylesheet.Extension.function('hello') def hello(self, args) :

  50. Lance

    arcriley: one sec, reading

  51. arcriley

    the latter is more verbose and an extra level of namespace, but i think it looks cleaner and i like that the association between class and method decorators is clear

  52. arcriley

    tho four levels of namespace starts to feel like java

  53. Lance

    what are you extending? ie, what is 'hello'?

  54. arcriley

    XSLT. so, eg, "<exam:hello/>" in the XSLT would be replaced with an xml text node "hello, world!"

  55. Lance

    ok, so that's the xpath for the template

  56. arcriley

    actually sorry i confused it, function would be xpath yes, where element would be my example

  57. arcriley

    the class decorator Element registers the defined class with libxslt and stores it in Stylesheet.__extensions for later access.

  58. Lance

    what else falls in Extension?

  59. arcriley

    that's about it. as a type it needs to hold the uri you're defining long enough to wrap, and then its cleaned up. its just a decorator

  60. Lance

    i'd just go with @nodetree.Stylesheet.extension

  61. Lance

    and just do the appropriate thing if given a function or a class

  62. arcriley

    eh?

  63. arcriley

    the question is how to name the method decorators

  64. Lance

    oh, i think i'm confused from too many converstations

  65. arcriley

    without them, there's no way to know whether a method is for a function or element, or potentially other extension point

  66. Lance

    do you have an example of a class with these in use?

  67. arcriley

    no because im writing the code right now :-)

  68. arcriley

    brand new API.

  69. Lance

    I'd either go with the ext_* version

  70. Lance

    or make the extension type a parameter

  71. Lance

    @nodetree.Stylesheet.extend('function', ....)

  72. Lance

    sorry, have to go to an appointmen

  73. arcriley

    no prob im talking to a few people about this

  74. Lance

    sigh, why do most clients display adhoc command forms in the ugliest ways?

  75. stpeter

    Lance: good question

  76. stpeter

    Lance: clearly someone needs to develop a sleek new client on top of SleekXMPP ;-)

  77. Lance

    there's poezio, but its console only

  78. stpeter

    the other thing we could do is complete the voting on a website and use the JIDs for XEP-0070 authorization

  79. Lance

    do any clients support that?

  80. stpeter

    I have not tested it in a long time

  81. Lance

    or rather, do browsers support it

  82. Lance

    clients only have to display a link

  83. Lance

    ok, looks like just digest-md5, so they should

  84. Lance puts xep-0070 on short list of new plugins to add to sleek

  85. stpeter

    yeah, ultra-secure digest-md5!

  86. Lance

    what I really want in a client is one that displays message forms inline with chats

  87. arcriley

    is that actually used by anyone?

  88. Lance

    they would if they showed up inline

  89. Lance

    it would just make interacting with bots so much nicer. an actual form instead of pseudo-form text commands

  90. arcriley

    WWW-Authenticate: Basic realm="xmpp" Do any browsers actually use that? ^^

  91. Lance

    ooh

  92. arcriley

    client aside thats the big issue I see

  93. Lance

    we'd have to test, but I think they would

  94. arcriley

    that'd have to use some javascript hook im not aware of

  95. Lance

    oh, basic

  96. Lance

    i was thinking of the digest one

  97. arcriley

    either

  98. Lance goes to make a test script

  99. Lance

    the realm option is pretty standard though, its just not a domain in this case

  100. Lance

    oh, but it would also try asking for a password

  101. arcriley

    IIRC when you get a authorization request a dialog opens requesting your username/password.

  102. arcriley

    and you would then have to script to return your JID, etc etc

  103. Lance

    username would be your jid, and empty password

  104. Lance

    er, no. the password is the transaction id

  105. arcriley

    how would the user have a transaction ID?

  106. Lance

    it gets sent to your JID via your xmpp client

  107. Lance

    copy/paste

  108. arcriley

    is there a javascript hook for that?

  109. Lance

    it is certainly not the most user friendly workflow

  110. Lance

    not that i'm aware of. it would certainly make it a smoother process

  111. Lance

    but it can still be done manually

  112. Lance

    this really is a case where cridland's 'browsers need to run xmpp natively' idea shines

  113. arcriley

    i agree with that.

  114. arcriley

    its a chicken and egg problem tho.

  115. Lance

    chrome already does it for syncing apparently; it would be nice if it was just more exposed and configurable

  116. arcriley

    the big problem that needs to be worked out is the javascript security model for it. how to keep malicious websites from sending xmpp spam on your behalf, stealing your contact data, etc while also providing enough functionality to be genuinely useful

  117. Lance

    right

  118. bear

    couldn't the transationid/password dealio be handled like oauth tokens

  119. bear

    that way the owner of the jid could revoke an apps use of their xmpp stream

  120. bear

    and have it tied directly to a resource part of the jid

  121. bear

    hell, make it bear@jid.com/transactionid