<fzakaria[m]> Are there any nice slides or some writeup on the history of JRuby ?
<fzakaria[m]> i'm in a reading mood :)
ur5us has quit [Ping timeout: 246 seconds]
_whitelogger has joined #jruby
_whitelogger has joined #jruby
ur5us has joined #jruby
TimGitter[m]1 has quit [Ping timeout: 260 seconds]
enebo[m] has quit [Ping timeout: 260 seconds]
claudiuinberlin[ has quit [Ping timeout: 260 seconds]
claudiuinberlin[ has joined #jruby
TimGitter[m]1 has joined #jruby
enebo[m] has joined #jruby
claudiuinberlin has joined #jruby
ur5us has quit [Ping timeout: 246 seconds]
<headius[m]> fzakaria: oh hmmm
<headius[m]> I did a talk soe years back that was mostly history
<headius[m]> maybe Euruko Budapest?
<headius[m]> doesn't look like I ever uploaded slides
drbobbeaty has joined #jruby
claudiuinberlin has quit [Ping timeout: 246 seconds]
xardion has quit [Remote host closed the connection]
xardion has joined #jruby
subbu is now known as subbu|lunch
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:a43742a by Thomas E. Enebo): The build was fixed. https://travis-ci.org/jruby/jruby/builds/664982277 [174 min 29 sec]
travis-ci has left #jruby [#jruby]
subbu|lunch is now known as subbu
<msp-greg[m]> Hello all,
<msp-greg[m]> A JRuby neophyte question re Windows. Looking at the JRuby head build used in Actions, and the JDK 11, the two are built using different msvc runtime versions. I looked at jruby.dll in JRuby. Normally, one doesn't combine the two, and it can cause issues...
<headius[m]> We currently only ship a 32-bit binary so it may not be a problem right now... when we can't load libjvm we fall back on spawning a subprocess
<headius[m]> Are you seeing a problem?
<msp-greg[m]> I really haven't tried much with JRuby. With the mention of ffi & OpenSSL, I looked at the msvc versions to see what matched up with JRuby. For instance, with Ruby MRI, the mingw & mswin builds use different compilers, so mixing their dll's is not a good idea...
<msp-greg[m]> I also didn't look at jruby.dll, so I don't know if it's really doing anything.
<headius[m]> ok, it's probably not a issue in practice but I know we can't combine different versions of the C library
<headius[m]> any problems you'd see would most likely fail very fast and probably not start up JRuby properly at all
ur5us has joined #jruby
<msp-greg[m]> Actually, I know a company that embeds MinGW Ruby in a Windows application built with recent Visual Studio tools, and the issues they had were not related to startup. I think it was more memory management, like one runtime would free memory that the other needed? Never got into any serious discussions, as I'm not really a c type.
<headius[m]> Ok we'll keep that in mind. Might be worth opening a bug on jruby/jruby-launcher so we keep it in mind going forward
<msp-greg[m]> Ok. I'll look more this weekend, as it could be built on Actions with a matching version... Same version used for the mswin build.
<headius[m]> the launcher is on its last legs these days and we seek to replace it with something easier to maintain, so this might all be moot soon
<headius[m]> one more wrinkle... most Linux environments don't set JAVA_HOME and link to `java` from /usr/bin/java, so can't as easily determine JAVA_HOME
ur5us has quit [Quit: Leaving]
<enebo[m]> headius: if you find that wrinkle let's table it for this launcher instead of putting hours more work into fixing it
<enebo[m]> add it as an issue though so we can fix it
<enebo[m]> if it is in fact a problem
<lopex> wrt wrinkle, what can the scripts do anyways
<enebo[m]> the complicated thing with that launcher is like an octopus it tries multiple ways of getting its answer so we almost need a matrix of what we think should or shouldn't work
<headius[m]> yeah
<headius[m]> enebo: the workaround of setting JAVA_HOME is a trivial ask
<headius[m]> at this point I'm starting to wonder if anything short of actually starting up java will be a reliable indicator of what JDK we're running on
<lopex> like debian alts ?
<headius[m]> that's a hell of a bitter pill to add to our already poor startup
<headius[m]> lopex: yeah
<lopex[m]> hm
<enebo[m]> headius: is /usr/bin/java actually not just a soft or hard link?
<enebo[m]> I guess that may nto help the script but the launcher can do the magic
<headius[m]> I don't have it in front of me... what is it for you?
<headius[m]> on fedora
<enebo[m]> I will see
<headius[m]> I thought they were typically soft links but I don't know if they all do it that way
<enebo[m]> although I don't use system java
<enebo[m]> HAHAH 0 lrwxrwxrwx. 1 root root 22 Dec 26 16:47 /usr/bin/java -> /etc/alternatives/java*
<headius[m]> for a soft link in theory it should resolve to JAVA_HOME/bin/java so it's a matter of canoncalizing it then (however one does that in C)
<headius[m]> hah great
<enebo[m]> 4 lrwxrwxrwx. 1 root root 72 Dec 26 16:47 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc31.x86_64/jre/bin/java*
<enebo[m]> so yeah round and round we go
<enebo[m]> but resolving to non-soft link will work on linux
<headius[m]> and that java/../.. would work but it's two links away
<enebo[m]> yeah so it needs to get real canonicalized file
<headius[m]> that might not be a terrible amount of work but I don't know the C to do it
<enebo[m]> well I won't even be doing it in C :)
<headius[m]> readlink I guess
<enebo[m]> but I have little fear of doing this...I am sure this is built in to fs
<headius[m]> heh yeah well I assume "not C" will have a way to resolve links
<headius[m]> readlink in C is POSIX
<enebo[m]> the good news is it isn't C I guess
<enebo[m]> the other good news is this is probably not OS specific code either
<headius[m]> so while file.is_link; file = readlink(file)
<headius[m]> now this is assuming my jmods trick is the best way to detect modules
<headius[m]> might be that detecting a sibling command is just as good
<headius[m]> like if you have `jlink` you're probably on Java 9+
<headius[m]> but I don't know if jlink is standard
<enebo[m]> ```
<enebo[m]> ``` let p = PathBuf::from("/usr/bin/java");
<enebo[m]> println!("FS: {:?}", fs::canonicalize(p).unwrap());
<headius[m]> neat
<enebo[m]> ok I did not apparently learn to paste but is is the right answer
<enebo[m]> FS: "/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.232.b09-0.fc31.x86_64/jre/bin/java"
<headius[m]> nice
<lopex[m]> rustenebo
<enebo[m]> lopex: I have ~98k binary vs linux 78k but on windows I am 97k vs 1M(exe) + 1M(dll)
<enebo[m]> and these compress to low 30s k with gzip
<enebo[m]> so I think we can just bundle binaries of all common platforms and it will still be a small gem
ur5us has joined #jruby
sagax has quit [Ping timeout: 240 seconds]
aemadrid[m]1 has joined #jruby
ur5us has quit [Ping timeout: 260 seconds]
klobuczek[m]1 has joined #jruby
aemadrid[m] has quit [Ping timeout: 246 seconds]
klobuczek[m] has quit [Ping timeout: 246 seconds]