#jython IRC Log

Index

IRC Log for 2013-12-19

Timestamps are in GMT/BST.

[0:26] * oscar_toro (~Thunderbi@190-22-236-42.baf.movistar.cl) has joined #jython
[1:29] <jimbaker> i have moved the socket reworking design doc to this repo, https://github.com/jimbaker/socket-reboot
[1:30] <jimbaker> once i have a bit more experience with bits & pieces of netty 4, i will branch jython accordingly. but this is a fairly major undertaking
[2:06] * oscar_toro (~Thunderbi@190-22-236-42.baf.movistar.cl) Quit (Ping timeout: 252 seconds)
[3:06] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[3:06] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[3:14] * lheuer (~Adium@unaffiliated/lheuer) Quit (Quit: Leaving.)
[4:33] <sinistersnare> jimbaker, first tuesday in january! so i have time
[5:01] <jimbaker> sinistersnare, cool. can you put your talk in a github repo? that will make it easier to review
[5:01] <sinistersnare> oh sure, ill do it in a few minutes then
[5:01] <jimbaker> sinistersnare, i assume you got the generate script now working
[5:03] <sinistersnare> yes, it looks nice now, ive got it going good
[5:12] <sinistersnare> jimbaker, https://github.com/sinistersnare/JythonTalk now it looks cool because it says most of it is in tex, therefore making me seem smart!
[5:14] <jimbaker> sinistersnare, looking good!
[5:14] <sinistersnare> :) yay!
[5:15] <jimbaker> anyway, i will review more closely, but it's much easier now it's in a repo
[5:15] <sinistersnare> i need to setup some code for livecoding, dont want to start bare off, but yay!
[5:15] <sinistersnare> and thanks for motivating me to do it :p
[5:15] <jimbaker> sinistersnare, i also hope you like my presentation workflow, which i got inspired to do by a good friend
[5:16] <jimbaker> i only required all of my students to use it too :)
[5:16] <sinistersnare> I do! its quite nice, but i cant figure out how to get a darn picture to render correctly! i love markdown though
[5:16] <jimbaker> reminds me, i need to make there presentations public
[5:16] <sinistersnare> oh, and DrexelU accepted me, CUB better step up :p
[5:16] <sinistersnare> oh seems nice, what on?
[5:17] <jimbaker> sinistersnare, yes, that's right
[5:18] <jimbaker> i taught principles of programming languages this past semester. so i had students give presentations on python PEPs and similar concepts in other languages - pick a proposed language feature, walk through it, talk about how the community reaction, all in a 5 min lightning talk, 20 slides, 15 seconds auto advanced, using generate to create the pdf
[5:19] <sinistersnare> awesome! must have been fun!
[5:19] <jimbaker> yeah, it seems like a nice assignment
[5:19] <jimbaker> also a good way to get students involve in as much collaboration as possible through github pull requests
[5:20] <jimbaker> (especially since PRs and comments on them were part of their grade for this assignment)
[5:20] <sinistersnare> My super smart friend didnt get into MIT and i attribute it to the fact that he was like 'wat' when they asked for a github account :p
[5:20] <sinistersnare> he always uses dropbox! i get so mad at him!
[5:21] <jimbaker> yeah, dropbox is good for some stuff, but got to use modern tooling
[5:21] <jimbaker> so re markdown & images - the key is to size the image
[5:21] <sinistersnare> oh, thats probably it!
[5:22] <jimbaker> so the metadata for the image will describe its actual printed size. the latex part of the pipeline will use that to figure placement
[5:23] <jimbaker> any image editor will allow you to set this. just make sure you don't lose any image quality in the resize
[5:23] <sinistersnare> yeah, ill do that right now
[5:23] <jimbaker> the best part of markdown is how you get free rendering in github
[5:24] <sinistersnare> yeah, i think 300x50 is good, but idk
[5:24] <jimbaker> for your README.md - i recommend just switching it to the talk
[5:24] <sinistersnare> another good idea :)
[5:24] <jimbaker> immediacy counts
[5:27] <sinistersnare> jimbaker, done! now resizing image
[5:31] <jimbaker> sinistersnare, lastly the markup you're using for the image should be like this, https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#wiki-images
[5:31] <sinistersnare> oh so not direct, but a reference, ok
[5:31] <jimbaker> oh one more lastly, i do recommend syntax highlighted code, https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting
[5:32] <sinistersnare> oh, either :=\ i ccant read
[5:32] <jimbaker> so use ````python to start the code block
[5:33] <sinistersnare> i didnt know beamer supported that! i know MD, i migrated the libgdx wiki from GCode style syntax to markdown, i guess im just hesitant to the breadth of MD it supports
[5:36] <jimbaker> yeah, beamer is quite versatile. now i personally like using the full latex support to do math
[5:37] <jimbaker> sinistersnare, ok, i think you got some good ideas on the range of what you can do??? adam-p's cheatsheet should be motivating
[5:37] <jimbaker> ttyl!
[5:38] <sinistersnare> awesome, i should be asleep anyways :p its 12:30 and school starts at 7:30!
[5:38] <sinistersnare> night
[6:18] * sinistersnare (~sinisters@pool-108-28-93-153.washdc.fios.verizon.net) Quit (Read error: Operation timed out)
[6:19] * sinistersnare (~sinisters@pool-108-28-93-153.washdc.fios.verizon.net) has joined #jython
[6:37] * lheuer (~Adium@f048141211.adsl.alicedsl.de) has joined #jython
[6:37] * lheuer (~Adium@f048141211.adsl.alicedsl.de) Quit (Changing host)
[6:37] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[6:38] * lheuer (~Adium@unaffiliated/lheuer) Quit (Client Quit)
[6:59] * lheuer (~Adium@f048141211.adsl.alicedsl.de) has joined #jython
[6:59] * lheuer (~Adium@f048141211.adsl.alicedsl.de) Quit (Changing host)
[6:59] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[7:28] * sinistersnare is now known as sinsnare|away
[7:28] * sinsnare|away is now known as sinsnare|zzZZzz
[7:37] * lheuer1 (~Adium@f048141189.adsl.alicedsl.de) has joined #jython
[7:39] * lheuer (~Adium@unaffiliated/lheuer) Quit (Ping timeout: 246 seconds)
[8:52] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Read error: Connection reset by peer)
[8:56] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[9:02] * lheuer1 is now known as lheuer
[9:02] * lheuer (~Adium@f048141189.adsl.alicedsl.de) Quit (Changing host)
[9:02] * lheuer (~Adium@unaffiliated/lheuer) has joined #jython
[9:40] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[11:08] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) Quit (Ping timeout: 246 seconds)
[11:15] * maxb (~maxb@jabberwock.vm.bytemark.co.uk) has joined #jython
[12:18] * grey_ (eaaltone@kapsi.fi) has joined #jython
[12:25] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Ping timeout: 245 seconds)
[12:32] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) has joined #jython
[12:40] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) Quit (Ping timeout: 240 seconds)
[13:13] * Oti (~ohumbel@adsl-84-227-99-202.adslplus.ch) Quit (Ping timeout: 246 seconds)
[13:14] * Oti (~ohumbel@adsl-89-217-233-24.adslplus.ch) has joined #jython
[13:25] <grey_> submitted proposal at http://bugs.jython.org/issue2107
[13:25] <grey_> I don't suppose you can edit typos in the tracker?
[13:50] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Excess Flood)
[13:50] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[13:54] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) has joined #jython
[14:10] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) Quit (Ping timeout: 240 seconds)
[14:24] * zz_whg is now known as whg
[15:05] <whg> So??? this new socket work seems likely to delay 2.7b2
[15:05] <whg> Sound about right?
[15:12] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 264 seconds)
[15:19] * fluxdude (~fluxdude@unaffiliated/fluxdude) has joined #jython
[16:05] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) has joined #jython
[16:55] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[17:01] <jimbaker> whg, well the way i see it is that 2.7 beta 2 depends on a working pip/virtualenv
[17:02] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 272 seconds)
[17:47] <whg> jimbaker: Oh, I understand.
[17:48] <whg> I thought it was a "just around the corner" thing, but now I think I just misunderstood
[17:49] <whg> Seems like the netty approach is to solve a "last mile is the hardest" sort of problem?
[18:01] <whg> I'm wishing I were better at sockets, so I could contribute more effectively than lurking in the IRC channel
[18:06] * fluxdude (~fluxdude@unaffiliated/fluxdude) Quit (Ping timeout: 246 seconds)
[19:53] <topi`> jimbaker: sadly, there has been no progress at all on twisted ticket #3413 (your comment is still the last one there...)
[19:54] <topi`> jimbaker: I'm re-trying to get my twisted code running on jython - I'll "emulate" a pipe if I have to ;)
[19:54] <topi`> or maybe the pipe can be emulated by unix sockets?
[19:55] <topi`> it is not the *same* but they do share some semantics
[20:30] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) has joined #jython
[20:35] * sinsnare|zzZZzz is now known as sinistersnare
[20:46] <sinistersnare> whg, i also wish i can help. hopefully my talk can get some interest in the DC crowd :)
[20:46] * also (uid1186@gateway/web/irccloud.com/x-hhsdiqqzqgcjsajw) has left #jython
[20:58] <topi`> I could help, if I could find some extra time somehow ;)
[20:58] <topi`> I guess it's just about re-prioritizing and dropping some stuff
[20:59] <jimbaker> whg, yeah, i don't think i realized what a big problem it was. part of is this that we've been tracking rapid development on pip
[20:59] <jimbaker> the challenge here is that pip wasn't moving so fast, so i didn't expect it
[20:59] * oscar_toro (~Thunderbi@190-22-177-8.baf.movistar.cl) Quit (Ping timeout: 264 seconds)
[21:00] <jimbaker> so in retrospect, maybe we could have said, maybe please don't go to using request over the summer
[21:00] <whg> Well, since I'm desperately trying to convince my team at work to use SQLAlchemy to power the "new, new, *new* data acces layer", and we need to support in-process usage from Java, I'm motivated
[21:00] <topi`> jimbaker: let me make a deal with you... if you promise to help me w/ getting twisted to work on jython (and finally getting my boss happy!) so I'll then return the favor!:)
[21:00] <whg> I'm just a total n00b when it comes to sockets
[21:01] <jimbaker> whg, i'm glad to hear that! don't worry, we will get this working
[21:01] <jimbaker> sadly until recently i have been a moderate n00b when it comes to sockets - because that's why i use python ;)
[21:01] <topi`> whg: I tried to convince my work mates to use Reportlab for python for PDF generation, but they want to go with a Java generation package, so I'll just bring my stuff over to jython - but it's twisted
[21:01] <jimbaker> i like to use higher level packages
[21:02] <jimbaker> topi`, re getting twisted on jython, we will get that too :)
[21:02] <whg> jimbaker: exactly
[21:02] <topi`> I've coded some socket stuff in C
[21:02] <topi`> that was MANY years ago
[21:02] <sinistersnare> im halfway through beej's C socket book
[21:02] <jimbaker> right, and you may not have considered how it all interacts w/ select and ssl :)
[21:02] <topi`> I have to say I always hated select()
[21:03] <jimbaker> topi`, yeah, it's a naive protocol
[21:03] <topi`> my work with the linux kernel had mostly to do with lower level network transports, like ethernet
[21:03] <topi`> jimbaker: it also causes you some grey hairs if you try to get something complicated to happen ;)
[21:03] <jimbaker> so some good news: my former colleague at canonical, robert collins (#2 emoployee at canonical, now at hp), reviewed my design last night
[21:04] <jimbaker> so he's quite knowledgeable about sockets. also talked w/ a couple other people on #python-dev about it
[21:05] <jimbaker> sinistersnare, i'm sure i might enlist your help too
[21:05] <sinistersnare> jimbaker, help with what?
[21:05] <jimbaker> on socket stuff ;)
[21:05] <jimbaker> just get the rest of the way through that book :)
[21:06] <topi`> jimbaker: I still have a lot of stuff in my backlog to wade through ... like your design docs
[21:06] <sinistersnare> oh goodness :p i can look at the code, but i dont have much experience in low level socket stuff
[21:06] <sinistersnare> ok ill make sure to when i have time!
[21:07] <topi`> jimbaker: is there any direct mapping from netty's "channels" concept into python's concepts?
[21:08] <jimbaker> so here's what i know. i have a very good understanding of concurrent programming, including concepts like futures. so i find netty 4 super comfortable. i have also simulated blocking ssl sockets with netty
[21:08] <topi`> evidently they live in ThreadPoolGroup
[21:08] <topi`> does netty have just one, single event loop? (making it quite similar to twisted...)
[21:08] <jimbaker> topi`, a channel is pretty similar to a file descriptor
[21:08] <jimbaker> topi`, no it does not have a single event loop
[21:09] <topi`> hey! why couldn't we implement a netty-based event loop for twisted, instead of that ugly select() code?
[21:09] <jimbaker> so it can be a SocketChannel, ServerSocketChannel, but also a FileChannel - so yes, we could eventually do selectable files
[21:10] <jimbaker> jruby also support selectable stdin and domain sockets, but that's a future investigation as well
[21:10] <jimbaker> but that code is in jnr (java native runtime)
[21:10] <topi`> ah, so the ThreadPool contains the daemon threads
[21:10] <jimbaker> topi`, correct
[21:10] <jimbaker> topi`, re twisted on netty, that's what we should do
[21:11] <topi`> was it your idea? :)
[21:11] <jimbaker> topi`, something i have certainly been mulling for a while :)
[21:11] <topi`> jimbaker: we can support selectable files, but for now we should focus on the socket use case.
[21:11] <topi`> jimbaker: it's hard to beat you on the ideas front!
[21:11] <jimbaker> topi`, yeah, don't worry about that :)
[21:12] <topi`> so - care to explain, how does netty's event loop work then?
[21:12] <jimbaker> topi, we need a java specific reactor, in part to manage subprocesses. but building on netty will give us better performance than using select
[21:13] <jimbaker> topi`, well one important difference compared to twisted is you are not so aware of the event loop
[21:13] <jimbaker> really this is because of the threadpool orientation, even if internally an event loop is being used to hand stuff off
[21:14] <topi`> ok, so the API exposed to the app programmer is actually thread-oriented?
[21:15] <jimbaker> topi`, where it looks like twisted is that it's heavily callback based - but because this is java, all of your callbacks are using objects (what netty calls handlers)
[21:15] <topi`> so you can't pass functions?
[21:15] <topi`> sorry I'm still somewhat a java newbie.
[21:16] <jimbaker> topi`, so jython does allows one to use callback functions - including lexically scoped closures - where java code requires a single method interface
[21:16] <jimbaker> eg Callable, Runnable
[21:16] <topi`> why do you say late binding of socket.bind is a fundamental limitation of java's design?
[21:17] <jimbaker> but this is not true of any of the netty handlers
[21:17] <jimbaker> re socket.bind - in java, either it is a server socket OR a peer socket
[21:18] <jimbaker> in netty, this is exposed as ServerSocketChannel and SocketChannel respectively
[21:18] <topi`> oh, ok.
[21:18] <jimbaker> so python (and in C) we can guarantee that a socket this is listening is a server socket
[21:18] <jimbaker> and connect is a peer socket
[21:18] <jimbaker> and they will never subsequently switch modes
[21:19] <jimbaker> but bind can be done earlier. the one case where it matters is for allocating an ephemeral port
[21:20] <topi`> pipeline = ch.pipeline(), is this ch.pipeline() a method of netty's?
[21:21] <jimbaker> so in cpython one can say socket.bind(0), then ask for the port
[21:21] <jimbaker> before socket.listen OR socket.connect
[21:21] <topi`> jimbaker: I don't think many protocols actually *require* ephemeral ports... maybe FTP
[21:22] <jimbaker> ch.pipeline() is a netty idea, yes
[21:22] <jimbaker> topi`, more importantly, it's not necessary for client-level code like requests :)
[21:23] <jimbaker> so my guarantee in this reworking is that it will work at least as well as the current socket/select support
[21:23] <jimbaker> but we will almost certainly get more done as well
[21:24] <jimbaker> topi`, what's nice about pipeline is that it allows for a nice layering of SSL, as well as app-specific aspects of a protocol
[21:25] <jimbaker> so users of netty take advantage of this to layer on http, and presumably similar protocols like websockets
[21:26] <jimbaker> topi`, so basically a handler in netty looks a lot like a twisted protocol
[21:26] <topi`> right
[21:27] <jimbaker> for twisted on netty, i don't know how relevant that is, iirc, ssl support in twisted is at a lower level - something like connectSSL
[21:29] <jimbaker> but for building the twisted reactor on netty, we will certainly be building it on a set of handlers, much like what i propose here
[21:29] <jimbaker> for socket/select API support
[21:29] <jimbaker> (ssl at least we get almost for free...)
[21:29] <topi`> yep, you're right, SSL in twisted is kinda clumsy
[21:30] <topi`> it's not abstracted in as clear a sense that you might think it is
[21:30] <topi`> there was a ticket about it, if IIRC
[21:31] <jimbaker> topi`, yeah, no worries. for my recent work on juju, we actually layered on top of ssh for our secure channels
[21:31] <jimbaker> and built some sort of SSH protocol on the command line ssh client
[21:32] <jimbaker> (which actually worked quite well)
[21:35] * zipp9 (~chatzilla@x2f2275d.dyn.telefonica.de) has joined #jython
[21:35] * whg is now known as whg_away
[21:36] <zipp9> hey, does anybody of you know how to make use of libxml2 in Java/Jython. I saw that the libxml2.dll is part of the jvm7, but don't find a way to use it with JAXP
[21:40] <jimbaker> zipp9, i'm not aware of how to directly use - it might be the case that JAXP relies on libxml2 itself
[21:41] * Diggty (~zsmith@monkeydev.ucsd.edu) has joined #jython
[21:41] <jimbaker> certainly the JAXP components are the standard way to do low-level XML in java
[21:42] * whg_away is now known as zz_whg_away
[21:47] <zipp9> jimbaker: it uses Xerces
[21:48] <zipp9> jimbaker: DocumentBuilderFactory.newInstance(); gets the Xerces Implementation class
[21:48] <jimbaker> zipp9, got it
[21:49] * robbyoconnor (~wakawaka@guifications/user/r0bby) has joined #jython
[21:49] <topi`> damn, my laptop just died without warning.
[21:49] <topi`> ran out of battery. damn snow leopard bugs like hell.
[21:50] <jimbaker> topi`, no worries
[21:50] <topi`> jimbaker: I'll try to test your code snippets, lets see if I can create a server socket and make it respond.
[21:50] <topi`> so I reckon I need a full install of netty
[21:51] <sinistersnare> ok gonna watch anchorman2! maybe ill read the book and prep the stuff when i get home. bye!
[21:51] <jimbaker> topi`, yeah, the only one known to work is this one here: https://gist.github.com/jimbaker/8017874
[21:52] * sinistersnare is now known as sinsnare|awaay
[21:52] <jimbaker> everything else is currently speculative ;)
[21:52] <jimbaker> sinsnare|awaay, enjoy!
[21:53] <jimbaker> topi`, so anything you can do to build up the code snippets will be awesome. can you simply fork my design branch in github so we can collect this together?
[21:53] <topi`> I can.
[21:53] <jimbaker> topi`, thanks!
[21:53] <topi`> I need to get my virtual machine back online, and it seems to be FUBAR after reboot
[21:54] <topi`> busybox can't find root :/
[21:54] <jimbaker> my colleagues tell me great things about docker
[21:54] <jimbaker> but that starts w/ a linux base of course
[21:56] * zipp9 (~chatzilla@x2f2275d.dyn.telefonica.de) Quit (Quit: ChatZilla 0.9.90.1 [Firefox 25.0/20131025151332])
[21:57] <topi`> jimbaker: so, did you get any output with this nettyclient.py already?
[21:57] <jimbaker> topi`, yes
[21:57] <topi`> it seems to try to connect to a SSL port
[21:58] <jimbaker> it works exactly the same as the example code that is cited at the top, http://docs.python.org/2/library/ssl.html#client-side-operation
[21:58] <topi`> I want to try to get "normal" sockets
[21:58] <jimbaker> topi`, to get normal sockets, you just need to remove this line, https://gist.github.com/jimbaker/8017874#file-nettyclient-py-L29
[21:59] <jimbaker> Bootstrap is an example of the builder pattern
[21:59] <jimbaker> if you want server sockets, just use ServerBootstrap
[21:59] <topi`> the docs.python.org example wraps a ssl socket
[21:59] <jimbaker> but each method call builds up wht this thing will construct
[22:00] <jimbaker> topi`, right, you want something analogous to this code, https://gist.github.com/jimbaker/7752779
[22:01] <jimbaker> topi`, i find it funny reading, could i do a flip here? now i actually know ByteBuffers work
[22:01] <topi`> so why would you need a flip?
[22:02] <jimbaker> topi`, a flip allows you to take a written buffer and make it available for reading; or vice versa
[22:03] <jimbaker> but it's not applicable to say a simple wrap, as seen in line 11 in that example
[22:03] * robbyoconnor (~wakawaka@guifications/user/r0bby) Quit (Ping timeout: 265 seconds)
[22:04] <jimbaker> topi`, so getting back to netty, to make https://gist.github.com/jimbaker/8017874 work you w/o SSL, it really should be a simple matter of removing the use of SSL in the channel pipeline
[22:04] <jimbaker> everything else works the same
[22:05] <jimbaker> in particular, getting the result of a read is always done by a handler
[22:05] <jimbaker> which you need to addLast to the pipeline, as seen in line 53
[22:06] <jimbaker> so this feels very much like writing twisted
[22:06] <topi`> I need to upgrade jvm, I still have 1.6.0 on my VM
[22:06] <jimbaker> meanwhile the write uses a ChannelFuture
[22:06] <topi`> Jython 2.7b1+ (default:14e5ae0b30d3, Oct 4 2013, 17:57:58)
[22:06] <topi`> [OpenJDK 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_27
[22:06] <jimbaker> topi`, yeah, that's probably a good idea
[22:07] <jimbaker> we will still go to java 7 for beta 2
[22:07] <topi`> do you have any opinion about OpenJDK versus the official Oracle packages?
[22:07] <topi`> I just take whatever debian ships.
[22:07] <agronholm> oracle has non-buggy swing code
[22:08] <agronholm> and working Java Web Start
[22:08] <topi`> none of these will be issues for me
[22:08] <agronholm> not sure what else it has
[22:08] <topi`> I just need to remember keep Java disabled from the browser ;)
[22:09] <agronholm> the non-oracle java plugins don't work anyway
[22:11] * enebo (~enebo@c-75-73-8-169.hsd1.mn.comcast.net) Quit (Quit: enebo)
[22:20] <topi`> funny how the jython startup script still looks for the old JRE...
[22:20] <topi`> jython/jython: line 270: /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java: No such file or directory
[22:20] <topi`> I wonder where that gets cached...
[22:23] <topi`> I fully recommend rewriting that jython startup script with something more sensible, say, python
[22:23] <topi`> Windows is probably the only OS nowadays that does *not* ship with python
[22:24] <jimbaker> topi`, yeah, we had one person work on this and make good progress
[22:24] <jimbaker> really need to revisit and see where we are
[22:25] <topi`> oddly it seems that jython starts up little bit faster now with OpenJDK 1.7.0_45
[22:25] <jimbaker> it might be in a pull request. btw, if anyone has pull requests and bug reports (such as grey_!), i've been casually watching these, but the reality is that ssl is taking a lot of time as a critical bug
[22:26] <topi`> jimbaker: should I install netty just from a maven repo?
[22:26] <jimbaker> fwierzbicki, Oti, and pjenvey might have more time right now as well, don't know...
[22:26] <jimbaker> topi`, i just downloaded the build
[22:27] <topi`> ok
[22:27] <jimbaker> and ran against the all-in-one
[22:27] <jimbaker> we have not historically built w/ maven, but it's something we should explore, especially since netty is nicely subdividable
[22:38] <pjenvey> think it looks at JAVA_HOME topi
[22:38] <pjenvey> topi`
[22:44] <topi`> pjenvey: I didn't have that defined, either...
[22:44] <topi`> I'll try to define it to the new position
[22:44] <topi`> no luck.
[23:34] <topi`> jimbaker: if I've understood correctly, netty is basically kind of a wrapper around Java 7's NIO, isn't it?
[23:35] <topi`> I mean, it provides a higher level way to use NIO
[23:35] <jimbaker> topi`, correct
[23:36] <jimbaker> i'm not absolutely certain it requires NIO2 (which is in java 7), but that would make sense
[23:37] <jimbaker> i know that an early version on netty 4 was using Asynchronous*Socket stuff, but apparently they moved it back to SelectableChannel, while retaining some of the Async*Sock style of coding
[23:38] <topi`> jimbaker: by the way, why doesn't java have any pipe implementation? I'd think os.pipe is such an important concept
[23:39] <pjenvey> there's an nio2 Pipe
[23:40] <topi`> oh, maybe that could be used to get twisted working?
[23:40] <pjenvey> IIRC when I redid jython's file years ago on nio2, I added os.pipe
[23:41] <pjenvey> but a fellow committer amak made a good point that most uses of pipe probably needed other things
[23:41] <pjenvey> we didn't have
[23:41] <pjenvey> so we left it out for the time being
[23:41] <topi`> AttributeError: 'module' object has no attribute 'pipe'
[23:41] <pjenvey> how is twisted using it exactly
[23:41] <topi`> I'll have a look at the particular twisted code.
[23:42] <pjenvey> if it'll help twisted along that's a good argument for adding it
[23:42] <jimbaker> topi`, iirc, twisted itself does not export a pipe concept, just things like subprocess management
[23:43] <jimbaker> so if we implemented a java-specific reactor, using netty + some other support, possibly using jnr as necessary, we might have something fairly complete
[23:44] <pjenvey> yea you might find the pipe usage is tied together w/ some other low level posixy things we don't support (like fork)
[23:45] <jimbaker> i know charlie nutter has been wanting to support fork for a long time in jruby, don't know the progress there
[23:45] <jimbaker> but twisted itself does not rely on fork, just some specific reactor implementations
[23:46] <jimbaker> topi`, so jnr is pretty useful, we can get stuff like this - https://github.com/jnr/jnr-unixsocket/blob/master/src/main/java/jnr/unixsocket/example/UnixClient.java
[23:50] <jimbaker> the trick is just integrating into netty 4. should be straightforward. not a priority for us of course :)
[23:55] <topi`> ok, the os.pipe() is called from UnixWaker, which is a somewhat hacky way of allowing thraeds and signals to wake up the IO task
[23:56] <topi`> however, there's a SocketWaker, which is used on Windows, because it doesn't support on selecting on pipes - so that could be used for twisted on jython!
[23:58] <topi`> this is in posixbase.py

Index

These logs were automatically created by JythonLogBot on irc.freenode.net using a slightly modified version of the Java IRC LogBot.