shellac has quit [Quit: Computer has gone to sleep.]
<GitHub72> [jruby] nirvdrum pushed 3 new commits to truffle-head: https://git.io/v1zx9
<GitHub72> jruby/truffle-head 1cc597d Kevin Menard: [Truffle] Fixed directory operations with directory names containing non-ASCII characters.
<GitHub72> jruby/truffle-head 0a7c617 Kevin Menard: [Truffle] Untagged passing File.sticky? specs.
<GitHub72> jruby/truffle-head 2bf302c Kevin Menard: [Truffle] Re-tag spec until the spec is fixed on Travis.
FINbit has joined #jruby
<travis-ci> jruby/jruby (truffle-head:1cc597d by Kevin Menard): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/182141488)
camlow325 has quit [Quit: WeeChat 1.5]
FINbit has quit [Ping timeout: 240 seconds]
cremes has quit [Quit: cremes]
pawnbox has joined #jruby
pawnbox has quit [Remote host closed the connection]
prasun has joined #jruby
ale_ has quit [Ping timeout: 256 seconds]
ale_ has joined #jruby
etehtsea has joined #jruby
pawnbox has joined #jruby
Puffball_ has joined #jruby
prasun has quit [Remote host closed the connection]
Puffball_ has quit [Remote host closed the connection]
Puffball has quit [Remote host closed the connection]
etehtsea has quit [Quit: Textual IRC Client: www.textualapp.com]
etehtsea has joined #jruby
etehtsea has quit [Ping timeout: 268 seconds]
etehtsea has joined #jruby
alxs has joined #jruby
<GitHub165> [jruby] bjfish pushed 1 new commit to truffle-head: https://git.io/v1gW6
<GitHub165> jruby/truffle-head e8cbcd7 Brandon Fish: [Truffle] Implement String.new encoding argument
alxs has quit [Ping timeout: 260 seconds]
prasun has joined #jruby
thedarkone2 has quit [Quit: thedarkone2]
donV has quit [Quit: donV]
prasun has quit [Ping timeout: 245 seconds]
prasun has joined #jruby
pawnbox_ has joined #jruby
pawnbox has quit [Ping timeout: 246 seconds]
olle has joined #jruby
kwando has quit [Ping timeout: 245 seconds]
olle has quit [Quit: olle]
olle has joined #jruby
donV has joined #jruby
pawnbox_ has quit [Remote host closed the connection]
claudiuinberlin has joined #jruby
Puffball has joined #jruby
donValentin has joined #jruby
donV has quit [Ping timeout: 246 seconds]
pawnbox has joined #jruby
etehtsea has quit [Ping timeout: 250 seconds]
shellac has joined #jruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
vtunka has joined #jruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Ping timeout: 250 seconds]
prasun has quit [Ping timeout: 245 seconds]
shellac has joined #jruby
prasun has joined #jruby
vtunka has quit [Quit: Leaving]
FINbit has joined #jruby
vtunka has joined #jruby
prasun has quit [Ping timeout: 245 seconds]
FINbit has quit [Quit: Lost terminal]
drbobbeaty has joined #jruby
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
olle has quit [Quit: olle]
olle has joined #jruby
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Ping timeout: 268 seconds]
claudiuinberlin has joined #jruby
olle_ has joined #jruby
olle has quit [Ping timeout: 260 seconds]
olle_ is now known as olle
alxs has joined #jruby
alxs has quit [Ping timeout: 258 seconds]
claudiuinberlin has quit [Ping timeout: 265 seconds]
claudiuinberlin has joined #jruby
drbobbeaty has joined #jruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Ping timeout: 268 seconds]
claudiuinberlin has joined #jruby
claudiuinberlin has quit [Remote host closed the connection]
bbrowning has joined #jruby
vtunka_ has joined #jruby
vtunka has quit [Ping timeout: 248 seconds]
cremes has joined #jruby
alxs has joined #jruby
vtunka_ has quit [Remote host closed the connection]
vtunka has joined #jruby
tcrawley-away is now known as tcrawley
claudiuinberlin has joined #jruby
pawnbox has quit [Remote host closed the connection]
vtunka has quit [Quit: Leaving]
enebo has joined #jruby
<nirvdrum> jnr-posix is green again.
vtunka has joined #jruby
vtunka has quit [Quit: Leaving]
<GitHub155> [jruby] eregon pushed 2 new commits to truffle-head: https://git.io/v12Ou
<GitHub155> jruby/truffle-head de0a6fa Benoit Daloze: [Truffle] Fix 2 TODOs in RubyCallNode and use a proper node to splat arguments.
<GitHub155> jruby/truffle-head 10b9ba9 Benoit Daloze: [Truffle] Let jt's --jexceptions print uncaught Java exceptions....
donValentin has quit [Ping timeout: 260 seconds]
<GitHub135> [jruby] eregon pushed 1 new commit to truffle-head: https://git.io/v12n0
<GitHub135> jruby/truffle-head efb62cd Benoit Daloze: [Truffle] Simplify String#initialize and make it a primitive.
olle has quit [Ping timeout: 248 seconds]
olle has joined #jruby
thedarkone2 has joined #jruby
AckZ has quit []
donV has joined #jruby
olle has quit [Quit: olle]
<eregon> ebarrett: Hello
<eregon> ebarrett chrisseaton: I added a tag graal-vm-0.18 for jruby-build-pack
<eregon> ebarrett: The tag in the jruby repo contains the wrong truffle version though, since it's overriden in the build process for GraalVM
<eregon> You can build offline with: ./mvnw -Dtruffle.version=0.19 -Dmaven.repo.local=/path/to/jruby-build-pack/maven --offline package
tcrawley is now known as tcrawley-away
<eregon> ebarrett: BTW, do you need changes in jruby-truffle? Otherwise using GraalVM's bin/ruby would be easier :)
<eregon> If it's just something like CLOCK_MONOTONIC_RAW, we could easily add support for it (actually that particular one is already in as Process.clock_gettime(Process::CLOCK_MONOTONIC_RAW) )
AckZ has joined #jruby
<GitHub83> [jruby] enebo closed issue #4344: Can't call a `Proc` which has a required keyword argument and a positional argument https://git.io/v1t5Q
<GitHub107> [jruby] enebo closed issue #4308: New syntax errors in 2.3.1/2.3.2 tests. https://git.io/vX9z3
claudiuinberlin has quit []
<GitHub11> [jruby] herwinw opened pull request #4368: Implemented Hash#compact and Hash#compact! (ruby-2.4...hash_compact) https://git.io/v121r
<headius> nice
<GitHub26> [jruby] headius pushed 2 new commits to ruby-2.4: https://git.io/v121N
<GitHub26> jruby/ruby-2.4 b76218b Charles Oliver Nutter: Merge pull request #4368 from herwinw/hash_compact...
<GitHub26> jruby/ruby-2.4 8d3cd0c Herwin Weststrate: Implemented Hash#compact and Hash#compact!...
<GitHub139> [jruby] headius closed pull request #4368: Implemented Hash#compact and Hash#compact! (ruby-2.4...hash_compact) https://git.io/v121r
shellac has quit [Quit: Leaving]
<GitHub194> [jruby] headius pushed 2 new commits to master: https://git.io/v12SX
<GitHub194> jruby/master cf1bc69 Charles Oliver Nutter: JRuby only supports one version at a time now.
<GitHub194> jruby/master e816e5a Charles Oliver Nutter: Mild refactoring of JITCompiler and added IR metrics....
claudiuinberlin has joined #jruby
<travis-ci> jruby/jruby (master:e816e5a by Charles Oliver Nutter): The build was fixed. (https://travis-ci.org/jruby/jruby/builds/182363721)
Aethenelle has joined #jruby
shellac has joined #jruby
tcrawley-away is now known as tcrawley
zacts has quit [Quit: WeeChat 1.6]
zacts has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
herwin has joined #jruby
riddley has joined #jruby
<riddley> Hi, I'm seeing some UTF-8 strings get mangled in Jruby and the web is ALIVE with "solutions." What's the best solution?
<Aethenelle> mangled how? What's the evironment you're seeing this in?
bbrowning has quit [Quit: Leaving]
<riddley> Aethenelle, I'm reading messaes off a Kafka queue and ü is coming out as ü
<riddley> using jruby-kafka
<GitHub172> [jruby] amarkowitz opened issue #4369: break within a block throws LocalJumpError in JRuby but succeeds in MRI Ruby https://git.io/v1aGf
<headius> riddley: what versions of things?
<Aethenelle> I get proper behavior in irb on the console in 9.1.6.0.....
<riddley> headius, Jruby 9.1.5.0 and 2.2.2. of kafka-ruby and 0.8 of Kafka itself
<headius> riddley: ok...sometimes that's our bug and sometimes it's some JRuby extension not handling encodings right
<headius> you should report it with a way for us to reproduce
<Aethenelle> my guess so far is that kafka-ruby is doing the mangling.
<headius> do check 9.1.6.0 if you can
<headius> Aethenelle: yeah likely
<headius> we haven't had a major encoding issue in a long time
<riddley> I've opened an issue with jruby-kafka, but so far the maintainer has been very slow to respond.
<Aethenelle> every way I can think of that might result in mangling hasn't
<riddley> ok thanks guys
<headius> riddley: while you're waiting you could try to reduce down what it's doing and see if it's JRuby or not
<Aethenelle> i forget, is kafka considered binary safe?
<headius> keep us posted
<riddley> I know nothing about Java, and the jruby-kafka is a very thin veneer on Java
<riddley> headius, sadly I don't have the resources or time to re-create/reduce it... I was supposed to go production with my jruby-kafka based code yesterday when this issue was discovered so I'm in a bad spot
<riddley> why my company chose to go production with Kafka 0.8 is baffling to me
claudiuinberlin has quit []
<headius> riddley: well, open an issue with us anyway and maybe it will be something easy
<riddley> ok will do ty
<Aethenelle> riddley: what calls are you seeing this in?
<Aethenelle> I have some time and can help chase this a bit
<riddley> Aethenelle, here's my jruby-kafka request https://github.com/joekiller/jruby-kafka/issues/57
<headius> Aethenelle: thank you
<riddley> I've modified message = it.next.message.to_s to remove the call to #to_s
<riddley> and when i write 'message' to a file with 'wb' I get those whacky chars
<riddley> I'm hooking into a huge production system and the messages I'm consuming have NFS paths in them and when I call FileTest.exists?(path) it of course says no
<Aethenelle> what happens if you leave the to_s there? same thing? Have you tried a pure Java write to file?
<riddley> same thing. I don't know Java
<Aethenelle> What do you see if you do: java.lang.System.out.println message
<Aethenelle> to answer your question in that issue, open another issue for a separate problem... not my library, but it's a good default.
<riddley> Aethenelle, I'm happy to try that (won't it say that local var 'java' isn't defined?) but the sad news is that it takes about 20 minutes to get a message through the system
<Aethenelle> java, com, org, and possibly one other are automatic namespace/package resolver mechanisms... java.lang.System creates the proxy class Java::JavaLang::System
<riddley> hmm so messages that don't have multi-byte characters printed with that java.lang.... look like [B@3b809870
<riddley> is that expected?
<Aethenelle> what class is message?
<Aethenelle> byte[] ?
<riddley> the strings are about 1k JSON. earlier when I did 'pp message.class' it said #<Class:0x4e3f1bba>
<riddley> but I can do something else if that's the wrong thing to do
<Aethenelle> yup, byte[]
<Aethenelle> message = String.from_java_byte sit.next.message
<Aethenelle> make that:
<Aethenelle> message = String.from_java_bytes it.next.message
<riddley> ok, I'll try to send a multibyte string through the system
<Aethenelle> headius: got it! one sec and I'll get a gist up
<Aethenelle> ... part of it anyway...
<Aethenelle> java.lang.System.out.println "ü".to_java_bytes.to_s
<riddley> so with message = String.from_java_byte( it.next.message )
<riddley> it appears to just sieze up
<Aethenelle> from_java_bytes
<riddley> aah
<Aethenelle> headius: this one has the rest of my attempts: https://gist.github.com/anonymous/8c7d65b7c9dedc7ec9873bb85e3ee1a9
<headius> to_java_bytes produces raw bytes in whatever encoding Ruby's using
<headius> and then to_s very likely assumes they're 8-bit ascii
<riddley> ü :(
<headius> yep
<headius> if someone's doing that...it's wrong :-)
<riddley> Aethenelle, I still get the same thing
<lopex> so whatever utf non-ascii will break
<Aethenelle> jruby-9.1.6.0 :018 > "ü".to_java_bytes.to_s
<Aethenelle> => "\xC3\xBC"
<Aethenelle> Sign up for free
<Aethenelle> It's some strange interaction between java, kafka, and ruby...
<Aethenelle> riddley: you try this with another client?
drbobbeaty has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<riddley> Aethenelle, I haven't. Most of the Ruby stuff I can find says it supports Kafka 0.9 or greater
<riddley> no offence to anyone, but the only reason I'm not on MRI is to get access to jruby-kafka 2.2.2 which supports 0.8
<lopex> but ü is pretty non exceptional
<lopex> it's all lower bmp planes (european)
<riddley> the other day I had a wide-dash that turned into an 'a' with a ^ over it
<lopex> Aethenelle: can you try another german like ä ?
<riddley> – became â
<Aethenelle> jruby-9.1.6.0 :021 > java.lang.System.out.println "ä".to_java_bytes.to_s
<Aethenelle> ä
<riddley> where â was the wrong char
<lopex> headius: btw, did you see the case folding 2.4 did ?
<lopex> headius: not an overhaul, but a massive feature
<Aethenelle> riddley: what is DIngestWorker?
<riddley> Aethenelle, a Sidekiq worker class
<Aethenelle> jruby-9.1.6.0 :023 > "ä".to_java_bytes.to_s.force_encoding "UTF-8" => "ä"
<Aethenelle> jruby-9.1.6.0 :024 > "ä".to_java_bytes.to_s.force_encoding "UTF-16" => "\xC3\xA4"
lanceball is now known as lance|afk
<Aethenelle> so perform_async sticks it in redis?
<lopex> Aethenelle: that's kind of expected
shellac has joined #jruby
<riddley> Aethenelle, I think so
<Aethenelle> lopex: yes but when passing eeither of those results back to System.out.println, you get the mangled char
<Aethenelle> riddley: you're seeing these mangled chars in the resque queues?
<lopex> Aethenelle: maybe external encoding is not being set ?
<lopex> Aethenelle: or, still it breaks at JI
<riddley> Aethenelle, seeing them anywhere I try to use those strings. even File.open('/tmp/bobo','wb'){|f| f.write(message)}
<Aethenelle> lopex: maybe... there's definitely at least some wacky interaction between the ruby string in BINARY and the UTF-16 that Java uses internally
<lopex> ruby -> java definitely needs an encoding info
<Aethenelle> riddley: can you add: puts [message.length, message.to_a.size, message.to_s.bytesize].inspect
<riddley> this is something I'm not doing with magic comments or somethign?
<Aethenelle> preferably as soon as you get the thing in your callback
<riddley> do you want that on any message? or just messages with multi-bytes?
<Aethenelle> riddley: this is an irritating edge case either in kafka or jruby string handling
<riddley> multibyte chars*
<Aethenelle> multibyte chars
<riddley> ok, it'll be minute
<riddley> I have to request a support pack from a customer appliance from a customer with multi-byte chars in their name
<riddley> and that takes a bit
<riddley> the excitement of coding to a production system
<Aethenelle> riddley: you mean you don't have a staging system to test this against?
<riddley> Aethenelle, good joke :)
<Aethenelle> ouch
shellac has quit [Quit: Computer has gone to sleep.]
<Aethenelle> lopex: further complicating stuff: jruby-9.1.6.0 :028 > java.lang.System.out.println "\xC3\xA4" => ä
<lopex> Aethenelle: how about java.lang.System.out.println java.lang.String.new("ä".to_java_bytes, "utf-8") ?
tcrawley is now known as tcrawley-away
<Aethenelle> ä
<riddley> Aethenelle, with the [..].inspect you want me to puts, is that with String.from_java_bytes() or no?
<lopex> so JI assumes utf-16 at some point
<lopex> or internal encoding not being set ?
<riddley> [3234, 3234, 3234]
<riddley> that's w/o it
<Aethenelle> riddley: k thanks
<Aethenelle> looks like you're getting it from kafka okay
<Aethenelle> lopex: java.lang.System.out.println java.lang.String.new("ä".to_java_bytes, "utf-8").getBytes.to_s => ä
<lopex> Aethenelle: java.lang.System.out.println java.lang.String.new("ä".to_java_bytes, "utf-8").getBytes("utf-8").to_s ?
<lopex> or whatever getBytes("...") you want
<lopex> force_encoding and we went the full circle
<Aethenelle> ä
<lopex> what's the .encoding of that ?
<Aethenelle> java.lang.String.new("ä".to_java_bytes, "ascii").to_s.force_encoding("BINARY") => "\xEF\xBF\xBD\xEF\xBF\xBD"
<Aethenelle> ASCII-8BIT
<lopex> those might not be equivalent though
shellac has joined #jruby
<lopex> Aethenelle: try force_encoding to utf8
<lopex> on that result
<riddley> stepping away for just one sec, guys.
<Aethenelle> ä
<lopex> so JI doesnt take encoding into account at some point
<lopex> as mentioned previously
<lopex> the other complicating thing is it should fallback to internal encoding
<riddley> back
<lopex> Aethenelle: do you have an issue for that ?
<Aethenelle> lopex: it's where the javaproxy is returned to java.
<lopex> Aethenelle: smelly
<lopex> the problem is with "ä".to_java_bytes.to_s, as i has no way to guess that it's utf-8 again
<lopex> *it
<lopex> that's the point where it might fallback to internal encoding
<lopex> headius: ^^ ?
<Aethenelle> riddley: add .force_encoding("UTF-8") to the original message.to_s line
<Aethenelle> message = it.next.message.to_s.force_encoding("UTF-8")
<riddley> that was my first instinct and it made no difference
alxs has quit [Ping timeout: 265 seconds]
<Aethenelle> so if you puts message at that point, it comes out correct?
<riddley> it comes out incorrect
<riddley> with the umlaut-u being ü
<Aethenelle> you have any control of this message?
<lopex> it.next.message is a java String right ?
<riddley> none
<Aethenelle> it.next.message is a byte[]
<lopex> oh
<lopex> so no encoding info there ?
<riddley> claims UTF-8
<lopex> try java.lang.String.new(it.next.message, "utf-8")
<lopex> and then try utf-16
<riddley> lower-case like that?
<lopex> shouldnt matter
<riddley> kk
<lopex> in this territory we might think about -Dfile.encoding depending what on comes from where
<headius> lopex: ?
<lopex> headius: what!
<headius> why is it turning it to Java bytes in the first place?
<lopex> message ?
<headius> oh it's wrapping kafka
<headius> right?
<lopex> supposedly it's byte[]
<headius> and kafka whatever.message is a byte[]
<headius> String.from_java_bytes(it.next.message)
<lopex> so we need encoding info
<headius> it assumes UTF-8 I believe
<lopex> headius: shouldnt it assum internal ?
<lopex> *assume
<headius> or that
<headius> I'll check
<Aethenelle> riddley: aren't you running kafka 0.8.0?
<headius> optional encoding
<riddley> sadly, yes
<lopex> headius: pandoras box
<headius> String.from_java_bytes(it.next.message, Encoding::UTF8)
<headius> default logic seems wrong...uses default encoding in ByteList, so that's ASCII-8BIT
<riddley> it seems hung up again with message = java.lang.String.new(it.next.message, "utf-8")
<lopex> headius: yeah
<Aethenelle> riddley: how compatible is that with 0.8.2?
<lopex> headius: but the right logic should do what ?
<lopex> headius: also look at java external ?
<lopex> headius: since java does it
<headius> file.encoding probably
<headius> yeah
<headius> external
<lopex> right
<riddley> Aethenelle, sorry I missed the detail of the trailing .0 we may very well be running 0.8.2 -- when I asked the devs, they weren't very specific
<headius> forcing encoding should have worked
<lopex> and it works
<headius> message.to_s.force_encoding(Encoding::UTF8)
<lopex> we've been there
<headius> yeah strange that didn't do it
<lopex> er, it works
<headius> oh it does work?
<lopex> but if should work without it
<lopex> *it
<lopex> riddley: can you confirm ?
<headius> it should work
<Aethenelle> riddley: that may be an important detail ... jruby-kafka looks like it supports 0.8.2+
<lopex> headius: but it's PITA
<Aethenelle> headius: it works in irb but not in riddley's use case
<headius> o_O
<lopex> headius: does JI look ruby at internal ?
<lopex> er, at ruby internal
<headius> JI does, yes
<headius> Strings default to UTF-8 coming from Java to Ruby
<headius> they use actual encoding the other direction
<riddley> trying to confirm message.to_s.force_encoding(Encoding::UTF8)
<headius> er default to external I mean
<lopex> right
<Aethenelle> jruby-9.1.6.0 :056 > java.lang.System.out.println java.lang.String.new("ä".to_java_bytes, "utf-8").getBytes.to_s.force_encoding "UTF-8" => ä
<Aethenelle> java.lang.System.out.println java.lang.String.new("ä".to_java_bytes, "utf-8").getBytes.to_s => ä
<lopex> but internal also counts
<lopex> headius: since literals will be screwed
<headius> Aethenelle: yeah looks right
<riddley> Aethenelle, I'm not sure how to get the version # out of kafka remotely
<headius> it is literally just the raw UTF-8 bytes so force should be ok
<Aethenelle> but this is coming as a byte[] to a Ruby string to a Java string
<lopex> PITA
<riddley> also, something is very strange
<Aethenelle> headius: without the forced encoding it gets mangled on the way back to Java somewhere
<lopex> we shouldnt need that force_encoding
<riddley> message = it.next.message.to_s#.force_encoding(Encoding::UTF8) without the comment, it just hangs
<lopex> it should fallback to internal
<headius> well if it's turning a byte[] into a string I'm not surprised
<riddley> do I need UTF-8 ?
<lopex> headius: but you have the internal ruby encoding
<lopex> you can use that
<headius> riddley: hangs?
<Aethenelle> riddley: ?!?
<riddley> yea just sits there
<headius> are you sure it's not working properly but didn't finish?
<riddley> I let it sit for a good while
<riddley> I printed a '.' before and a '/.' after and never saw the '/.'
<headius> if it's actually hung try ctrl+\ and gist the thread dump somewhere
<headius> force_encoding should never hang
<riddley> ok I'll put it back
<headius> that's pretty weird
<lopex> headius: second thing, jcodings generator scripts will not work for 2.4
<headius> noooooo
<headius> what did they change?
<riddley> ctrl-\ printed ^\
<lopex> headius: lots
<riddley> and nothing happened
<headius> riddley: Windows?
<Aethenelle> you sure it's hanging in jruby and not because it's silently catching some error thrown from JRuby?
<riddley> Debian Jessie
<headius> hmm
<riddley> on the server and as my desktop
<headius> ok, jstack command then
<headius> jstack <pid> or something
<riddley> just type that?
<riddley> ok
<headius> it will yank the stack off of that hung Java process and print it
<riddley> is jstack included in the distribution?
<riddley> it doesn't seem to be
<riddley> sorry guys I removed my pipe to tee and ctrl-\ worked
alxs has joined #jruby
<Aethenelle> riddley: if it was api compatible, i'd suggest trying the pure ruby wrapper: ruby-kafka
<Aethenelle> I need to head home though... I'll try to get back on once i get to the train but it can be somewhat spotty...
Aethenelle has left #jruby [#jruby]
Aethenelle has joined #jruby
<riddley> Aethenelle, I'd love to use that, but I don't imagine it will work
<riddley> I'm also about 1.5 hrs late for leaving... I hate to leave and lose the momentum though
<Aethenelle> riddley: there's a chance it may... seems the 0.8.2 api is pretty similar to the 0.9.0 api...
<riddley> Aethenelle, I'll give it a shot
<riddley> Aethenelle, really like the speed of jruby though :)
<headius> riddley: oh tee, ok
<riddley> am I OK to delete that gist?
<Aethenelle> you can use it in jruby...
<riddley> it won't have the same problem in jruby?
alxs has quit [Ping timeout: 260 seconds]
<headius> so main sleeping is probably you, I assume
<Aethenelle> riddley: no idea there... probably not?
<headius> riddley: I don't see anything that looks unusual...the main thread is in a sleep loop
<headius> I can see loop and sleep on the stack and that's where it's sitting
<Aethenelle> gotta go... be back in about 30min
Aethenelle has quit [Quit: Aethenelle]
<headius> the other threads are JVM threads and Kafka threads...one of the latter is doing an IO poll
<headius> is it possible kafka is not responding?
<riddley> I never see line 4
<riddley> if force_encoding is there with the constant... if it's there with "UTF-8" it works fine
<lopex> transcoding loop ?
<headius> riddley: that could also mean an exception was raised
<lopex> why
<headius> lopex: not for force
<headius> riddley: oh really?
<riddley> let me verify
<headius> ok now that's really weird
<headius> use the string I guess
<headius> they should be equivalent
<lopex> but still JI ?
<headius> force_encoding(EncodingUtils.rbToEncoding(context, enc));
shellac has quit [Quit: Computer has gone to sleep.]
<headius> that's all it does
<headius> if it's an Encoding it uses it, otherwise it looks it up as a string
<lopex> yes
<riddley> works fine with the string
<lopex> no loops there
<riddley> but still shows the wrong characters
<lopex> and no exception
<lopex> er, actually, what the reduced case now ?
<riddley> I'm new to jruby, so I don't know how to run it in some way that shows exceptions, but it doesn't crash in either case... with the constant it just sits there
<lopex> we just need to reduce it properly
<lopex> w/o kafka
<headius> yeah
<headius> or with kafka and complete instructions on how to set it up :-D
<lopex> but that's something we can exmaplain
<riddley> oh
<riddley> I've never set up Kafka either
<GitHub52> [jruby] dmarcotte opened issue #4370: Invoking `define_singleton` on an object is adding a subclass to `ObjectSpace` https://git.io/v1aVN
enebo has quit [Quit: enebo]
<riddley> I just found in my notes that we are in fact running Kafka 0.8.2
<riddley> oh no, has this just run out of steam?
<lopex> the investigation ?
<riddley> yes
<lopex> headius: what if "ü".to_java_bytes used internal encoding ?
elia has joined #jruby
<lopex> er
<lopex> wrong
<lopex> what if JI used internal encoding when java -> ruby
<lopex> for java arrays
elia has quit [Client Quit]
<GitHub85> [jruby] headius closed issue #4370: Invoking `define_singleton` on an object is adding a subclass to `ObjectSpace` https://git.io/v1aVN
elia has joined #jruby
<headius> lopex: Ruby internal?
<lopex> yes
<headius> that would be fine with me
<headius> most people won't notice one encoding versus another
<headius> and that will be UTF-8 by default anyway
<riddley> if it's helpful, I can get on a webex with someone
<headius> riddley: I'm afraid I need to leave for dinner now :-\
<headius> at least confirm that force_encoding("UTF-8") produces the proper characters
<riddley> it does not
<headius> there may be somewhere else doing it wrong
<riddley> that was the first thing I tried long before pursuing help
<headius> ok, then try String.from_java_bytes(it.next.message, Encoding::UTF8)
<riddley> that hangs
<headius> I don't believe it!
<headius> :-)
<lopex> and java.lang.String.new(it.next.message, "utf-8")
<lopex> riddley: kill -3
<headius> something else is screwy then
<headius> I suspect something raises there for some reason...wrap with begin...rescue logic and see
<lopex> yeah
<headius> it should work :-( I wish I could offer more help
<headius> there's nothing in force_encoding that would hang
<headius> and Encoding::UTF8 is used all over
<headius> and I don't see it actually hung in force_encoding on your thread dump
<headius> appears to be in some loop elsewhere
<riddley> hehe I promise it prints a '.' and then just sits there
<riddley> no '/.'
<headius> run with -d
<headius> or try the begin/rescue
<riddley> TypeError: no implicit conversion of Java::JavaLang::String into String
<riddley> that's when I try to use a regex against the string from java.lang.String.new(message, "utf-8")
<riddley> NameError: uninitialized constant Encoding::UTF8
<riddley> Did you mean? Encoding::UTF_8
<riddley> that's with message.to_s.force_encoding(Encoding::UTF8)
<riddley> fixing it up to add the _ it works just fine
<riddley> (in that it doesn't appear to hang)
<riddley> but if it really is just the same thing as the string "UTF-8" being handed to force_encoding, I knew that didn't work before I asked for help
<riddley> -d is exciting!
<riddley> ü String.from_java_bytes(message, Encoding::UTF_8)