jdev - 2019-08-19


  1. gh

    Kindly ignore this message.

  2. guus.der.kinderen

    No!

  3. wurstsalat

    Hm it would be nice if this group chat had a proper name. Something like "Jabber/XMPP Development". I think the name/title is not set yet.

  4. ralphm

    wurstsalat: the proper name of this room _is_ jdev, so I set that as its title. The description is "Jabber/XMPP Development".

  5. ralphm

    It might be that your client shows this suboptimally.

  6. wurstsalat

    alright! no it shows "jdev" corretly then

  7. pep.

    I wish conversations displayed the topic at the top instead :(

  8. Zash

    I named my bookmark for this room "XMPP Development"

  9. wurstsalat

    Zash, good idea, Gajim had some improvements for name displaying lately :)

  10. bent3n

    Hi, I'm new to servers and networking. I want to build an xmpp server(I'll rent the server). It's for a chat application I want build(learning project )

  11. bent3n

    Any suggestion ? Please be as basic as possible as I'm new

  12. Zash

    Get a Debian VM, install Prosody, tweak the config and poke some DNS, ???, PROFIT!

  13. bent3n

    Zash Thanks. I have a linux VM installed on my mac. I installed prosody on it I tested it with prosody's client IM app and it works(my domain is localhost). I'm using a bridged network connection. Connecting to the VM from the Mac (host) is the challenge

  14. guus.der.kinderen

    bent3n - Openfire is pretty easy to setup on any computer

  15. Zash

    Prosody is a server, not a client.

  16. guus.der.kinderen

    and geared towards easy entry

  17. bent3n

    I don't know if I was doing anything wrong that's why I decided to rent a server and then learn

  18. bent3n

    guus.der.kinderen I installed openfire on the linux guest. I can only access the admin webpage from the host( my MAC)

  19. guus.der.kinderen

    bent3n exactly what is your goal here? If it's just to experiment, I'd be perfectly happy to host a service for you for a couple of days.

  20. guus.der.kinderen

    that'd save you from the troubles of setting one up yourself.

  21. bent3n

    I'm learning from a textbook. and the HTTP connection manager in the textbook is no longer up. So I'll have to create my own if I want to learn

  22. guus.der.kinderen

    if you'd try to learn how to setup a server, then you'd have to set it up yourself, obviously :

  23. bent3n

    yeah. Unless bridging between my host and my guest works(which hasn't for me right now) that's why I'm leaning more towards renting a server

  24. guus.der.kinderen

    let me set one up for you, so that you can at least experiment for a couple of days

  25. guus.der.kinderen

    if you want to rent that later, we can discuss it.

  26. guus.der.kinderen

    woudl that work for you?

  27. bent3n

    That would more than work

  28. Zash

    I don't know about you all but I just run `./prosody` locally on my workstation. Renting a whole machine seems like a bit overkill.

  29. bent3n

    thanks guus.der.kinderen

  30. guus.der.kinderen

    no problem. pick any subdomain (as in the 'something' in "something.goodbytes.im") please

  31. bent3n

    guus.der.kinderen Zash Here's the app I wanted to test :

  32. bent3n

    let Hello ={ connection: null, start_time: null, log: function(msg){ $("#log").append("<p>"+ msg +"</p>"); }, send_ping: function(to){ let ping = $iq({ to: to, type:"get", id:"ping1"}).c("ping", {xmlns:"urn:xmpp:ping"}); Hello.log("Sending ping to:"+to+"."); Hello.start_time = (new Date()).getTime(); Hello.connection.send(ping); }, handle_pong: function(iq){ let elapsed =(new Date()).getTime() - Hello.start_time; Hello.log("Received pong from server in : "+ elapsed+" ms"); Hello.connection.disconnect(); return false; } }; $(document).ready(function(){ $("#login_dialog").dialog({ autoOpen: true, draggable: false, modal: true, title:"Connect to XMPP", buttons:{ "Connect": function(){ $(document).trigger("connect",{ jid: $("#jid").val(), password: $("#password").val() }); $("#password").val(""); $(this).dialog('close'); } } }); }); $(document).bind('connect', function(ev, data){ let conn = new Strophe.Connection("http://bosh.metajack.im:5280/xmpp-httpbind"); console.log(conn); conn.connect(data.jid, data.password, function(status){ if (status === Strophe.Status.CONNECTED){ $(document).trigger('connected'); }else if (status === Strophe.Status.DISCONNECTED){ $(document).trigger('disconnected'); } }); Hello.connection = conn; }); $(document).bind('connected', function(){ // inform the user Hello.log("Connection established"); Hello.connection.addHandler(Hello.handle_pong, null, "iq", null, "ping1"); let domain = Strophe.getDomainFromJid(Hello.connection.jid); Hello.send_ping(domain); }); $(document).bind('disconnected', function(){ Hello.log("Connection terminated..."); //remove the connection object Hello.connection = null; });\

  33. bent3n

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Hello - Chapter 3</title> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/cupertino/jquery-ui.css"&gt; <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.js"&gt;&lt;/script&gt; <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt; <script src="scripts/strophe.js"></script> <script src="scripts/flXHR.js"></script> <script src="scripts/strophe.flxhr.js"></script> <link rel="stylesheet" href="hello.css"> <script src="hello.js"></script> </head> <body> <h1>Hello</h1> <div id="log"> </div> <div id="login_dialog" class="hidden"> <label>JID:</label><br/><input type="text" id="jid"> <label>Password:</label><br/><input type="password" id="password"> </div> </body> </html>

  34. guus.der.kinderen

    woah, please don't copy that much code here 🙂

  35. guus.der.kinderen

    some of us are on mobile phones 🙂

  36. bent3n

    guus.der.kinderen bent3n would be ok for the subdomain

  37. Zash

    Déjà vu https://logs.xmpp.org/jdev/2019-08-09?p=h#2019-08-09-ce5c5bf5f9431f5b

  38. bent3n

    Zash Yes, I tried what JC suggested by installing prosody on my guest (Linux on the VM on my MAC)

  39. bent3n

    guus.der.kinderen Sorry I did not know that

  40. bent3n

    There isn't much stuff out there for a beginner(let alone recent material). Like I said. I'm a beginner with 0 experience with networking

  41. guus.der.kinderen

    bent3n, email me at guus@goodbytes.nl so that we can exchange credentials etc

  42. guus.der.kinderen

    note that I'm not planning to provide development support with regards to your textbook code 🙂

  43. bent3n

    guus.der.kinderen just emailed you

  44. guus.der.kinderen

    received it, tx. I'll forward you instructions shortly

  45. guus.der.kinderen

    it takes about 10 minutes for the provisioning to happen.

  46. bent3n

    Thanks

  47. bent3n

    no problem with code support. I need a connection manager that works. the book I'm using is about 10 years old. The only trustworthy resource for beginners I could find

  48. guus.der.kinderen

    Yeah, that's an issue. We (the XMPP Standards Foundation) could use more resources for easy entry.

  49. Zash

    Hot damn, published in 2010? Time flies.

  50. bent3n

    hahahaha. It's Jack Moffit's book

  51. Zash

    I know, I have it

  52. Kev

    The Book is even older.

  53. Kev

    2008 or so?

  54. Kev

    Although as it's not code-sample based primarily, it's pleasing how often it's still relevant when I point the team to it.

  55. Zash

    Kev: Time for a remake?

  56. Kev

    I think it's not worth it until we've solved the archive+routing2 stuff.

  57. Kev

    At that point, maybe.

  58. guus.der.kinderen

    bent3n check your mail

  59. guus.der.kinderen

    note that DNS propagation might require some time to get to every corner of the earth - but it's usually pretty fast.

  60. bent3n

    just seen it. Thanks guus.der.kinderen !

  61. guus.der.kinderen

    Oh, I should upgrade that webclient that ships with it. The latest version has interesting debugging options, which will probably help you in your own efforts.

  62. guus.der.kinderen

    I'll try upgrading later.

  63. bent3n

    thank you so much ! guus.der.kinderen

  64. guus.der.kinderen

    I just upgraded it (still had the console open 😛 )

  65. guus.der.kinderen

    try hard-refreshing the inVerse URL if you had already opened it. It should have changed from version 4.2.0 to 5.0.1.

  66. guus.der.kinderen

    I've now enabled debug mode on that client. If you open the development console of your browser (typically: F12), you'll see a bunch of useful information.

  67. bent3n

    guus.der.kinderen I got this error when I entered my credentials into the page that loaded from the inverse URL

  68. bent3n

    2019-08-19T14:32:39.174Z WARNING: Message Archive Management (XEP-0313) not supported by this server

  69. guus.der.kinderen

    known issue - ignore it - it simply works.

  70. bent3n

    ok cool !

  71. guus.der.kinderen

    https://github.com/conversejs/converse.js/issues/1676

  72. bent3n

    guus.der.kinderen Kev Zash So next is to configure the server to do something right? I ask I switched out the connection manager to the one Guus provided and it still shows connection terminated -- I was expecting it to connect at least

  73. bent3n

    I'm new to networking

  74. guus.der.kinderen

    the XMPP server can be used to connect your XMPP client to, and to use that to send back and forth messages.

  75. guus.der.kinderen

    the connection manager (BOSH) is one way of connecting to the server (it's basically an HTTP wrapper for XMPP traffic)

  76. guus.der.kinderen

    I've provided you with an account. You should be able to use that to authenticate against the server, and start sending messages and whatnot.

  77. Zash

    Most XMPP servers these days have a BOSH connection manager built into the server itself, so it's not a proxy anymore and might behave differently to a standalone BOSH proxy

  78. bent3n

    Zash So does that mean the code I provided above will have to be edited in some way ? Kev These are the files I downloaded so I could use strophe for the example in the book (Hello app on chapter 3)

  79. bent3n

    1. checkplayer.js 2. flensed.js 3. flXHR.js 4. flXHR.swf 5. flXHR.vbs 6. strophe.flxhr.js 7. swfobject.js 8. strophe.js 9. updateplayer.swf

  80. bent3n

    Am I missing any ? can you please point me in the right direction so I can download the files necessary/relevant today so I can complete that example ?

  81. guus.der.kinderen

    (i'm off to feed the offspring)

  82. bent3n

    hahaha the offspring

  83. travis

    Swf ?

  84. travis

    If your book wants you to use flash in 2019 burn it

  85. travis

    Haha .vbs too even better

  86. Kev

    bent3n: I know nothing much about Jack's book, and I don't do JS-based XMPP. Pinging me won't help here.

  87. MattJ

    Yeah, this stuff is from before CORS was widespread

  88. travis

    yea I suspect you'd be better off burning that book and going with something from this decade

  89. travis

    otherwise you are going to struggle a lot with implementing it, then be rewarded by it not working in any modern browser

  90. jonas’

    I would suggest not to *burn* the book, but putting it aside is probably wise.

  91. travis

    details details... :)

  92. Zash

    travis: The problem is that there's no book from this decade.

  93. Zash

    Depending on whether 2010 counts as this decade or the previous one.

  94. travis

    probably true

  95. bent3n

    Off got I plane to catch. I'll land at 3pm ET

  96. Kev

    Zash: Well, that's only a problem if the book was written as a guide for a codebase.

  97. Kev

    I think (obviously biased) TDG has aged relatively well, but obviously Jack's book on strophe is going to age badly because the web has changed in 10 years.

  98. Zash

    Kev: Sure, XMPP basics probably haven't changed all that much. Higher level things have moved a bit tho. Were Carbons and MAM around back then for example?

  99. Kev

    I don't recall. I think 289's in there but not 313, but wouldn't swear to it.

  100. Kev

    But sure, thing's have changed. The question is whether what's there becomes wrong, or just incomplete.

  101. pep.

    Also the sleekxmpp book is still here to haunt us for some time. I wouldn't even recommend slixmpp nowadays, I'm looking forward yo aioxmpp in Python

  102. pep.

    Also the sleekxmpp book is still here to haunt us for some time. I wouldn't even recommend slixmpp nowadays, I'm looking forward to aioxmpp in Python

  103. jonas’

    "looking forward to"?

  104. Kev

    pep.: You mean TDG? Most of the book doen't cover sleek, there's just a few examples at the back.

  105. pep.

    Hmm, badly said

  106. pep.

    I don't know the book, Kev. I'm just heard there was one on sleekxmpp.

  107. Kev

    Not AFAIK.

  108. Kev

    But TDG has some SleekXMPP examples at the back.

  109. ralphm

    I'm not sure if Jack's book has aged that badly. Strophejs just works and I don't think it is affected as much as other web technologies.

  110. jonas’

    .swf was mentioned above

  111. moparisthebest

    if it has you copying around .swf and .vbs files that's a bad sign

  112. ralphm

    I'd summarise most new development around frameworks for presentational code, single page apps, WebRTC. So stuff using strophejs might have changed dramatically.

  113. ralphm

    Which reminds me ikDisplay should have a complete overhaul of its UI bits.

  114. Zash

    ralphm, was ikDisplay pubsub based?

  115. ralphm

    Is. Yes.

  116. ralphm

    E.g. a feed on XMPP: https://display.ik.nu/xmpp

  117. ralphm

    Still has the FOSDEM banner on it 🤣

  118. Zash

    😀

  119. ralphm

    It used to be smooth, but browsers have changed and UI should be redone to use modern transitions features.

  120. bent3n

    ralphm Zash moparisthebest Kev MattJ So where would you point a beginner ? For learning resources and the necessary files for strophe or any other JS xmpp library?

  121. bent3n

    I'm open to new libraries provided there's support and a community? currently checking what webRTC is

  122. bent3n

    JC told me about converse a couple of weeks ago

  123. moparisthebest

    I would guess converse.js would be the way to go