Logs for the RingoJS IRC channel,
as logged by ringostarr.
2012-02-03
[10:23] <hannesw> olegp, I remember you had a socket implementation for ringo somewhere?
[10:23] <hannesw> or was that for common-node?
[10:23] <olegp> I wanted to add it to ringo to be inline with the current commonjs proposal
[10:23] <olegp> currently it's only in common node though
[10:24] <olegp> https://github.com/olegp/common-node/blob/master/lib/socket.js
[10:24] <hannesw> ok, think I'll bring that to ringo :)
[10:24] <olegp> should be pretty easy to implement that as a Java wrapper
[10:24] <olegp> great!
[10:24] <olegp> also ... would be nice to have the commonjs httpclient
[10:24] <olegp> I can help with that if you want
[10:25] <hannesw> this one? https://github.com/olegp/common-node/blob/master/lib/httpclient.js
[10:25] <olegp> yea
[10:25] <hannesw> (i prefer looking at code than at specs :)
[10:25] <olegp> or I can add the ringo one to common node
[10:26] <olegp> at the moment thats the only part of common node thats incompatible with ringo
[10:26] <olegp> well, that and fs-base, but thats easy to work around
[10:27] <hannesw> i'm a bit unsure about the future path of httpclient in ringo /ping oberhamsi
[10:27] <hannesw> it currently relies on jetty client which starts its own threadpool, too heavy for many apps
[10:28] <olegp> the nice thing about the commonjs httpclient is that the response it produces is (almost) identical to the jsgi response object
[10:28] <olegp> so you can do stuff like https://github.com/olegp/common-node/blob/master/examples/http.js to make a proxy
[10:28] <hannesw> yep, just saw that, that's nice
[10:28] <olegp> not sure if thats possible with ringos current http client
[10:29] <hannesw> i wrote a http proxy with ringo once, but i can't remember :) think it needs more plumbing
[10:29] <olegp> btw already 18 people signed up for the helsinkijs meetup
[10:29] <olegp> should be good
[10:34] <olegp> hannesw have you had a chance to look at https://github.com/hns/stick/issues/27?
[10:36] <hannesw> olegp have looked at it, but not in depth
[10:36] <oberhamsi> hannesw, i know you mentioned that before... grobert_ wrote a httpclient util for rpr on to of apache client, afair, maybe that's better suited
[10:37] <oberhamsi> *on top of
[10:37] <hannesw> oberhamsi: yeah, will have a look at that
[10:37] <hannesw> olegp: the destructuring part is the easiest one
[10:37] <olegp> yup
[10:37] <olegp> everything else is a little tricky ..
[10:39] <olegp> what do you think about the whole common-utils idea?
[10:39] <olegp> essentially it's just separating out pure js modules from ringo
[10:39] <grobert_> oberhamsi, hannesw: the http client in rp isn't generic, it just implements what's needed for rp/rpr
[10:43] <hannesw> grobert_, oberhamsi also apache httpclient dependencie seems quite large. Maybe a simple http client built on java core classes would be best after all
[10:44] <hannesw> and let people who need more rely on add-on packages
[10:45] <hannesw> additional benefit: would run on google app engine
[10:45] <hannesw> see https://github.com/ringo/ringojs/issues/84
[10:45] <hannesw> I could add this for 0.9 milestone
[10:46] <hannesw> oberhamsi: what do you think? we could make current jetty httpclient an external package
[10:46] <grobert_> hannesw: yes, using java core classes would be probably best
[10:47] <oberhamsi> yes, sounds good. i could package it up
[10:48] <hannesw> cool! Seems we're in agreement. Adding issue to 0.9 milestone.
[10:54] <hannesw> https://github.com/ringo/ringojs/issues/84#issuecomment-3794254
[11:02] <hannesw> olegp: is it ok to start ringo sockets impl from your common-node file?
[11:02] <olegp> of course
[11:02] <hannesw> thanks :)
[11:02] <olegp> most of common-node is based on Ringo & I didn't ask for your permission, at least directly ;)
[11:03] <hannesw> that's ok, you don't have to :)
[11:03] <olegp> although I did mention it at devconf IIRC
[11:03] <olegp> they're doing it again this year btw, if you want to apply again
[11:45] <hannesw> Heh, just made my first successful HTTP connection through the ringo socket module :)
[16:56] <olegp> nice hannesw
[16:56] <olegp> can you get my telnet chat example to run?
[18:02] <hannesw_> olegp: I'm pretty far along with the socket API for ringo
[18:03] <hannesw_> however, I'm not totally convinced by the API
[18:03] <hannesw> it feels like a direct mapping of the low level Unix interface to JS
[18:04] <hannesw> even Node has different modules for TCP and UDP, and server and client sockets for tcp.
[18:04] <hannesw> how many implementations are the of the socket api besides common-node?
[18:05] <hannesw> maybe we should roll our own spec :)
[22:10] <thmundal> olegp i solved my issue regarding the repl thingy. got it working with emacs similar to how i do it with clojure
[22:15] <olegp> hannesw I'm happy to roll our own
[22:15] <olegp> I don't think there are any other implementations
[22:16] <olegp> tmundal cool, did you end up using Ringojs shell?
[22:17] <hannesw> olegp cool. I think the worst thing are the AF_INET style arguments
[22:17] <olegp> yeah, I disliked that as well
[22:17] <hannesw> also I'm not sure about mixing all kinds of sockets in one class
[22:19] <olegp> yeah, good point as well
[22:20] <olegp> then there's the sendFile, which should just be removed
[22:20] <olegp> and get/setOption - not clear where that would be used
[22:22] <olegp> hannesw, why dont you refactor as you see fit and push to github
[22:23] <olegp> I'll then take a look and bring common node in line with ringo
[22:23] <hannesw> seems like a good idea
[22:23] <hannesw> i'll play a bit with the implementation of the current api
[22:23] <olegp> ok
[22:32] <thmundal> yea olegb i used the ringo shell
[22:36] <thmundal> what are you guys working on? :)
[22:38] <olegp> I spent a lot of time today on adding harmony proxy support to https://github.com/olegp/mongo-sync
[22:38] <olegp> and in the end decided it wasn't worth the hassle
[22:42] <thmundal> kewl
[22:43] <thmundal> dunno what that is but it sounds nice xD im a newb at ringo and commonjs in general.. just playing around and learning :)
[22:44] <thmundal> if you are interested in seeing how i solved my problem, its here : https://github.com/thmundal/ringo-repl my very first git :P