<JRubyGithub>
[jruby] eregon pushed 3 new commits to master: http://git.io/vUgnQ
<JRubyGithub>
jruby/master 05eabb6 Benoit Daloze: [Truffle] Undefined Allocator for class which are only internally instantiated....
<JRubyGithub>
jruby/master fb84fbc Benoit Daloze: [Truffle] Do not allow to allocate Bignum in user code....
<JRubyGithub>
jruby/master fc3d39e Benoit Daloze: [Truffle] Make RubyBasicObject.EMPTY_SHAPE static....
JRubyGithub has left #jruby [#jruby]
<alderamin>
I made a mistake in starting a few computing-intensive processes without the --server switch last night before going to bed. What was taking 7-8 hours with the --server switch is now at 11 hours. Is there any remotely accurate way to gauge time to completion? There's no status indicator or any way for me to query the process. It just runs until it's done.
<chrisseaton>
eregon: if you are working on Bignum, I'd like to find a way to make the value final - at the moment the code paths don't make that easy
<eregon>
chrisseaton: it is final now I think, no?
<chrisseaton>
eregon: I don't think so - I removed the final flag when I copied from Mutex as we need to set it initialize
<eregon>
yeah, just fixed that
<chrisseaton>
Ah ok
mcclurmc has joined #jruby
<eregon>
EMPTY_SHAPE is static now so it's easy and I also undefined the allocator to match MRI semantics
<chrisseaton>
ah yes of course - didn't think of that
<eregon>
they even undef new for some classes, not sure the value of doing that if #allocate raise anyway
<lopex>
chrisseaton: because it's from List interface for JI purposes
<chrisseaton>
ah
djellemah_ has quit [Ping timeout: 272 seconds]
<lopex>
Array implements List and Hash implements Map, so methods from those interfaces will convert
mcclurmc has quit [Remote host closed the connection]
colinsurprenant has joined #jruby
subbu is now known as subbu|breakfast
arturaz has quit [Ping timeout: 255 seconds]
<dinfuehr>
i am using jruby 1.7. one server starts with 1.9 per default and another with 1.8. I thought 1.9 is the default in jruby 1.7. Why could that be the case?
<lopex>
JRUBY_OPTS ?
djellemah_ has joined #jruby
mcclurmc has joined #jruby
<dinfuehr>
JRUBY_OPTS is not set. the server which starts in 1.8 has a x86 processor. could that be the reason?
<dinfuehr>
and JDK 6
donV has joined #jruby
deobalds has quit [Quit: Computer has gone to sleep.]
<lopex>
what does ps on that java process say ?
subbu|breakfast is now known as subbu
<dinfuehr>
one says: jruby 1.7.16 (1.9.3p392) 2014-09-25 575b395 on OpenJDK Server VM 1.6.0_20-b20 +jit [linux-i386], the other jruby 1.7.16 (ruby-1.8.7p370) 2014-09-25 575b395 on OpenJDK 64-Bit Server VM 1.6.0_0-b16 +jit [linux-amd64]
rsim has quit [Quit: Leaving.]
<dinfuehr>
The amd64 server uses 1.8 per default
<dinfuehr>
`env | grep JRUBY_OPTS` is empty for both servers
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 2 new commits to master: http://git.io/vU2Kp
<JRubyGithub>
jruby/master 14ae2c4 Thomas E. Enebo: Simplification of ruby_sourceline
<JRubyGithub>
jruby/master e4ce268 Thomas E. Enebo: Disable opttempvars for -X-C and JIT. The recent optimizations to fix multiple assignment...
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] eregon pushed 8 new commits to master: http://git.io/vU26Y
<JRubyGithub>
jruby/master 66f055a Benoit Daloze: [Truffle] Add a comment on the cyclic Class#name case.
<JRubyGithub>
jruby/master b1d476a Benoit Daloze: [Truffle] Remove usage of getSingletonClass() in ModuleNodes.
<JRubyGithub>
jruby/master 85c5875 Benoit Daloze: [Truffle] Remove usage of getSingletonClass() in UnresolvedDispatchNode.
JRubyGithub has left #jruby [#jruby]
<enebo>
wow I beat eregon by seconds!
<enebo>
things should become green again
pitr-ch has joined #jruby
<eregon>
:)
camlow325 has joined #jruby
pitr-ch has quit [Ping timeout: 256 seconds]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vU21v
<JRubyGithub>
jruby/master 43b68cd Chris Seaton: [Truffle] Optimise Array#pop()
JRubyGithub has left #jruby [#jruby]
deobalds has joined #jruby
KevinCorcoran has joined #jruby
deobalds has quit [Client Quit]
<lopex>
dinfuehr: ps aux on that java process
chamila has joined #jruby
brightball has quit [Ping timeout: 256 seconds]
vtunka has quit [Quit: Leaving]
pitr-ch has joined #jruby
<dinfuehr>
lopex: i used `jruby &` to do that: /usr/lib64/jvm/java/bin/java -Xmx500m -Xss2048k -Djffi.boot.library.path=/opt/jruby-1.7.16/lib/jni -Xbootclasspath/a:/opt/jruby-1.7.16/lib/jruby.jar -classpath : -Djruby.home=/opt/jruby-1.7.16 -Djruby.lib=/opt/jruby-1.7.16/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vU2bb
<JRubyGithub>
jruby/master 2e8f5e6 Chris Seaton: [Truffle] Array allocation sites weren't really being used.
JRubyGithub has left #jruby [#jruby]
shellac has quit [Quit: -> home]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest10260 is now known as mberg
skade has quit [Quit: Computer has gone to sleep.]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
mike_c_11 has quit [Read error: Connection reset by peer]
skade has joined #jruby
_djbkd has joined #jruby
bbrowning is now known as bbrowning_away
mkristian has joined #jruby
chamila has quit [Ping timeout: 246 seconds]
JRubyGithub has joined #jruby
travis-ci has joined #jruby
<JRubyGithub>
jruby/master 743b0dc Benoit Daloze: [Truffle] Do not call undefined methods with debug send.
<mjc_>
looks like they tend to make a tiny ruby wrapper for this stuff
<chamila>
I discussed with headius and what he advise was to keep what oj currently implemented in ruby as ruby, and port C stuff to java
<chrisseaton>
chamila: yeah but I don't get why you mentioned float - you've got a Fixnum - if you want to do something with it in Java code, call getLongValue(), and you'll get a long
<lopex>
private int java.lang.reflect.Field.modifiers
<lopex>
enebo: yeah, that's why I'm sumbled
<lopex>
*stumbled
<lopex>
there indeed is set_value, but I need set_int
<enebo>
there is a set_int?
<lopex>
no
<enebo>
lopex: you have an instance of java.lang.reflect.Field but not setInt on it?
lanceball is now known as lance|afk
<lopex>
that's right
<lopex>
and no other set* ones
<lopex>
and neither get*
dinfuehr has quit [Ping timeout: 245 seconds]
<enebo>
and if you java_class.get_class.get_simple_name what displays?
dinfuehr_ has quit [Ping timeout: 255 seconds]
<lopex>
NoMethodError: undefined method `java_class' for private int java.lang.reflect.Field.modifiers:Java::JavaField
<lopex>
after java.lang.reflect.Field.java_class.declared_field('modifiers')
vikaton has quit []
<lopex>
just plain old code to unfinalize a field
<chrisseaton>
chamila: if you want to use int you'll have to check the size of every Fixnum every time you call getIntValue - otherwise you risk silent errors
<enebo>
lopex: so some wacky internal field type
<lopex>
yeah
<enebo>
oh Java::JavaField
<enebo>
hmmm
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to master: http://git.io/vUaHI
<JRubyGithub>
jruby/master 2416cd3 Chris Seaton: [Truffle] Continue to reduce duplication in array nodes.
JRubyGithub has left #jruby [#jruby]
<lopex>
enebo: I believe set_value might to switching based on type
<lopex>
*be
<lopex>
*should :)
<enebo>
lopex: so this is an internal JRuby thing
<enebo>
lopex: worst-case you can just field.value to get the real field
<lopex>
final Object javaValue = convertValueToJava(value);
<lopex>
then it does field.set(null, javaValue);
<enebo>
lopex: but you probably want the field without a wrapper at all
<chamila>
chrisseaton: ah okay, thanks, seems like long is the better option
<lopex>
enebo: yes
<lopex>
oh getValue ?
<enebo>
lopex: but just see if .value on that field will work
<enebo>
@JRubyMethod value ()
bbrowning is now known as bbrowning_away
<lopex>
Can not set int field java.lang.reflect.Field.modifiers to java.lang.Integer
<enebo>
value.set_int(5.to_java(:int))
<enebo>
lopex: Not sure why it would not do that though
<enebo>
chamila: typically you get acquire from @JRubyMethods if you just add it as first parameter to the java method but if you cannot do that you can get it from Ruby.getCurrentContext().
<enebo>
lopex: hmm we must have some logic which converts reflect Fields to JavaField
<enebo>
lopex: but nothing which goes the other way
<chamila>
enebo: I think Ruby.getCurrentContext will work, I can't get it as a arguement since I am planning to use it outside a method globally to declare static final constant
<enebo>
chamila: if you use multiple threads you cannot cache threadcontext unless you know you will always be calling stuff using the same thread
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chamila>
it may get accessed by more than 1 thread
<enebo>
chamila: ultimately you may be asking for trouble making a static cache of any Ruby type in Java since it is easy to leak runtimes (consider doing this in an app server)
yfeldblum has joined #jruby
<enebo>
all instances of Ruby objects will retain a hard reference to Ruby which then holds a reference to the entire runtime
<chamila>
enebo: Is there any way I can create similar RubySymbol without using context of runtime?
subbu is now known as subbu|lunch
<enebo>
chamila: actually in this case you are using the instance of runtime and not ThreadContext but in either case you are holding a reference to the runtime by retaining an instance
<enebo>
chamila: I guess it depends on how you are setting up your Ruby runtime instance though
<enebo>
chamila: are you using ScriptingContainter or how are you initializing the runtime
<mjc_>
chamila: please don't do things that could leak runtimes, super painful for those of us who use app servers :(
<chamila>
enebo: I don't have much idea about that stuff
<enebo>
chamila: what are you working on? Perhaps that will help figure out best way to do this
<enebo>
chamila: StringWriter.java has a runtime field but you inherit from RubyObject so you can just call getRuntime() if you need it
<chamila>
enebo: no, here same sysbol object used again and again in other methods as well,I have implemented only 1 yet, so I thought of using 1 object without creatin objects again and again
<enebo>
chamila: I would make an instance of some sorts to contain these and pass that instance into each class which needs them in OjLibrary.load
oko has left #jruby ["peace ! i'm out !!"]
<enebo>
chamila: then if Oj is loaded by multiple runtimes in the same JVM they will have their own proper copy of the symbol
<chamila>
Oj.java has module level methods, which are declare static in java, so StringWriter may not have initialized at the time methods in Oj get called
<enebo>
at the top of load() you create Oj before StreamWrtier and StringWriter but regardless at the time you call load() none of this extension has been loaded yet and you ahve a reference to Ruby so you can make symbols and then somehow pass them into the classes which need them
<enebo>
I am trying to think of best way to pass in a context object
<chamila>
enebo: so u r suggesting to create StringWriter before Oj in load and pass it's Runtime to Oj?
<enebo>
chamila: no. I am thinking some type (any type) can contain references to created Symbols and any classes you make (like Oj or StringWriter) can get a reference to this instance. Then they can call methods getModeSymbol() which just returns the same :mode
<enebo>
chamila: It is possible the easiest was is to use Oj itself for this purpose
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
<enebo>
chamila: you actually make Oj first
iamjarvo has joined #jruby
<chamila>
enebo: for now I only need symbols for class Oj
<enebo>
chamila: then ((Oj) runtime.getConstant(“Oj”)).getModeSymbol() can be used
<enebo>
chamila: and there is only a single Oj ever made?
<chamila>
Oj is the module, it only has static methods, which can be called as Oj,dump, etc
<chamila>
Oj.dump
<enebo>
chamila: I see part of the problem but I also realized that perhaps you should not worry about this
iamjarvo_ has joined #jruby
iamjarvo_ has quit [Max SendQ exceeded]
<enebo>
chamila: runtime.newSymbol() is actually a get or create
<enebo>
chamila: so you will be doing a table lookup per call but you will not actually be making new symbols
iamjarvo_ has joined #jruby
<enebo>
chamila: as a module you would need to do some lookup to do this properly
<enebo>
chamila: so you would have to runtime.getConstant then cast that to ask for a sylbol
<enebo>
chamila: but you absolutely cannot use static fields
<enebo>
chamila: so I say use runtime.newSymbol(name) and depend on our symbol cache
<chamila>
enebo: I can simply repeat "RubySymbol.newSymbol(Ruby.getCurrentContext().runtime, "indent")" , I thought its better to declare them only once sice C code have done so
<chamila>
enebo: but I think for now repeating that would be the better option
iamjarvo has quit [Ping timeout: 256 seconds]
<enebo>
chamila: 2 things: 1) Oj is a module and has no state. You cannot use static so you need to retrieve them from something. 2) I think you will always have either threadContext or ruby already available to you in Oj
<enebo>
chamila: we have played tricks with storing values as weird names in instance var table but that is still a lookup against a table
<chamila>
enebo: I don't get 2
<enebo>
chamila: all of your code is executing under a @JRubyMethod
<enebo>
chamila: your original question came only out of wanting a static field
<enebo>
chamila: so I don’t think that is a concern any more
robbyoconnor has quit [Ping timeout: 264 seconds]
<chamila>
enebo: yeah, I also think so
<chamila>
enebo: thanks for ur time
<enebo>
chamila: sure np
mitchellhenke has quit [Quit: Computer has gone to sleep.]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] enebo pushed 1 new commit to master: http://git.io/vUVlP
<JRubyGithub>
jruby/master 5720901 Thomas E. Enebo: Fix MRI Proc.to_s failures
JRubyGithub has left #jruby [#jruby]
skade has quit [Quit: Computer has gone to sleep.]
<JRubyGithub>
[jruby] enebo pushed 1 new commit to master: http://git.io/vUw67
<JRubyGithub>
jruby/master b89e4a8 Thomas E. Enebo: yay no more proc failures
JRubyGithub has left #jruby [#jruby]
<mkristian>
could/should work
<CustosLimen>
mkristian, let me check it
<CustosLimen>
mkristian, its ok, I got it working by setting gemPath on asciidoctor plugin to gem.path which I set on command line (its also used by gem plugin)
<mkristian>
cool
mje113__ has quit [Ping timeout: 256 seconds]
<CustosLimen>
mkristian, I'm trying to set it up so you can get it to use gems from ~/.gem/ from ~/.m2/settings.xml - but have it build gems in target by default
mje113__ has joined #jruby
_djbkd has quit [Quit: My people need me...]
<mkristian>
CustosLimen, just be aware that the ~/.gem/jruby depends on compat version, i.e. jruby-9.0.0.0.pre2 will use 2.2 instead of 1.9 - but if you set the gem.path property right it should work
<CustosLimen>
mkristian, can't jruby make subdirs like cruby ?
marr has quit [Ping timeout: 264 seconds]
<mkristian>
it does but not is you set GEM_HOME manually. dito GEM_PATH
<CustosLimen>
mkristian, but it will though cause problems if one project uses compat 1.9 and another uses 2.2
<CustosLimen>
you will have to switch them as needed
<CustosLimen>
anyway its fine, I guess this wont be perfect, but close enough
<mkristian>
probably it will do anyways since jruby does not really need this separate directories
<CustosLimen>
project builds fine with and without -gem.useSystem
<mkristian>
:)
<CustosLimen>
anyway, jruby is awesome
<CustosLimen>
glad to see compat level moving to 2.2
<CustosLimen>
why does travis-ci join and part all the time ?
<nirvdrum>
CustosLimen: It's a bot. It reports CI job status and then leaves.
<CustosLimen>
nirvdrum, can't it just stay in here ?
<nirvdrum>
It could, probably. But I think the bot comes from a cluster of machines. Rather than coordinate all status through a single bot, I think it just joins and leaves. It also doesn't need to maintain a connection that way.
<nirvdrum>
The GitHub bot is similar.
<nirvdrum>
But don't quote me on that.
enebo has quit [Quit: enebo]
JRubyGithub has joined #jruby
<JRubyGithub>
[jruby] chrisseaton pushed 1 new commit to truffle-head: http://git.io/vUwNm
<JRubyGithub>
jruby/truffle-head 424e351 Chris Seaton: Merge branch 'master' into truffle-head