<lan5432>
Referencing issue: https://github.com/jruby/jruby/issues/3207 I was thinking on building documentation of JRuby, as a way to help myself learn more as well, do we have any starting documentation?
pawnbox has joined #jruby
pawnbox has quit [Ping timeout: 264 seconds]
evenix has quit []
camlow325 has quit []
ITXpander has quit [Quit: Leaving.]
johnsonch_afk is now known as johnsonch
pawnbox has joined #jruby
subbu has joined #jruby
pawnbox has quit [Ping timeout: 252 seconds]
<GitHub195>
[jruby] nirvdrum pushed 1 new commit to master: https://git.io/vao4u
<GitHub195>
jruby/master 1544fa7 Kevin Menard: [Truffle] Switched to using Rope#getRawBytes when we know we have a LeafRope.
<enebo>
eregon: atm I am still on 1.7.x which is more out of date I think but I will be fixing specs
evenix has quit [Ping timeout: 244 seconds]
subbu has joined #jruby
evenix has joined #jruby
<evenix>
What's the recommended way to serialize a model attribute in jruby? I used serialized :cc ( cc is my attribute) but I'm getting `ctiveRecord::JDBCError: Data truncation: Data too long for column 'cc' at row 1:`
<evenix>
would you recommend to change the column to blob with a limit of 16.megabyte
<evenix>
Or there is a better way?
subbu is now known as subbu|away
<evenix>
.. i just serialized it to JSON
nicksieger has quit [Ping timeout: 240 seconds]
Prasun has joined #jruby
norc has joined #jruby
<kares>
evenix: there's also a strange marshalling issue with sqlite (on the tracker) - just to be aware
<GitHub56>
jruby/jruby-1_7 3eb8c5f Thomas E. Enebo: Fixes #3745. IO#block_nonwrite causes CCE on Windows....
<GitHub21>
[jruby] enebo closed issue #3745: IO#write_nonblock causes CCE on Windows https://git.io/va6CV
evenix has quit []
CaptainHeavy has joined #jruby
<CaptainHeavy>
Hi everyone. I'm invoking a private Java instance method using the following (https://gist.github.com/mlk5060/32ba0a07e22445d680e3) but the object being returned is not of the required class (VisualSpatialField). Instead, its a "Java::JavaObject". I can't seem to cast it to what I need it to be to run tests, any advice?
camlow325 has quit [Remote host closed the connection]
subbu|away has quit [Read error: Connection reset by peer]
camlow325 has joined #jruby
<headius>
codefinger, enebo: hey, I had a crazy idea
<headius>
I was trying to think how we could update the launchers to let JVM decide heap max without having anyone using 1.7 suddenly see this change
<headius>
and then it hit me...the launcher has to do an install step anyway, so why don't we only install the mjruby binary for 9.1+
<headius>
nobody earlier than that will care and we can keep older versions using the old launcher with old -Xmx and not have to change anything
<headius>
only small wrinkle is platforms without the mjruby binary, but that's a smaller issue
<headius>
alternatively I suppose the C code for the launcher could have ifdefs of some kind we populate based on if it's 9.1+ or not
<enebo>
headius: sounds great to me
<codefinger>
makes sense
<enebo>
headius: only downside atm is that old launcher totally fucks up quoting
<enebo>
on windows
<headius>
I saw your bug about that
<headius>
you weren't running in powershell or anything were you?
<enebo>
but hey it has always been broken :)
<headius>
because powershell TOTALLY hoses quoting and command line parsing
<enebo>
it is broken in every possible environment
<headius>
wow really?
<enebo>
believe me I tested mingw, cygwin, cmd, and powershell
<headius>
because it has to pull the command line apart
skade has quit [Quit: Computer has gone to sleep.]
<headius>
so what you're telling me is that the bash script is still the best, most reliable launcher we have
<headius>
kill me now
<enebo>
headius: although honestly it is pretty simple to understand if we cannot dll launch we make a command line
<headius>
we could fix the dll launch
<enebo>
which is -e ‘puts “foo”’ wo; emd as “-e”, “puts”foo””
<enebo>
we cannot fix the dll
<headius>
detect model on install and install proper width binary
<headius>
ship two
<enebo>
so installer does it
<headius>
you're the installer king
<enebo>
but then how does -bin.zip and .atar.gz works
<headius>
KING
<enebo>
no binary I guess
<headius>
no binary yeah
<headius>
oh hmmm
<enebo>
but .bat calls .exze
<headius>
but we ditched the bat
<headius>
and it was busted long ago
<headius>
you want to see broken cli parsing, that thing was the pits
<enebo>
so at this point I think we are wasting time even thinking about this :)
<headius>
yeah huh, that's a toughy
<enebo>
9k will be fixed with mjruby
<headius>
ship the bash script and a bash binary
<enebo>
1.7 has never worked
ITXpander has quit [Quit: Leaving.]
<headius>
they can install the launcher if they want and that will choose correct binary
<enebo>
or perhaps it worked with old .bat but I doubt it
<enebo>
so I think we leave it as a legacy problem and move forward
<headius>
I like that solution
<enebo>
yeah it also fits the lets only use mjruby on 9k
<headius>
I forget, do we have mjruby on Windows yet?
<headius>
I do know of another option that's a pure-Java launcher solution almost as good
<headius>
very light weight library + your own java code to set up cli flags etc, and it does a relaunch
<enebo>
yeah mjruby compiles on windows
<enebo>
headius: mruby-cli compiles all of common platforms
<headius>
maybe putting the cart before the horse on that one then since only the weird platforms have no mjruby launcher
<headius>
that's right, freebsd, I'm calling you weird
<headius>
in other news, TIL freebsd jails have had more functionality than docker for over a decade
<chrisseaton>
what's wrong with the bash script? is it measurably slower than native?
<enebo>
yeah freebsd/netbsd/solaris/aix are not in the mruby-cli gang
<headius>
poor freebsd, nobody pays attention to you
<headius>
chrisseaton: shebangs
<headius>
that's the 90% issue
<enebo>
chrisseaton: #!/path/jruby -w
<headius>
the rest is just difficulty of processing command line without mutilating it
<enebo>
any args in a shebang line cannot work with shell scripts
thedarkone2 has joined #jruby
<chrisseaton>
ah, didn't know that
<headius>
enebo: you can't even put bin/jruby in a shebang if it's a script
<chrisseaton>
never seen an argument in a shebang anyway
<headius>
it will try to run the script with bash
<headius>
which is the STUPIDEST unixism I know
<headius>
I literally can't even
<enebo>
ancient issue of unix and it is why /usr/bin/env took root
<headius>
stupid unix
<chrisseaton>
so why can't people just use env?
<headius>
chrisseaton: we tweak rubygems to use env and put it in all our scripts, but most people don't think to do it since MRI doesn't need it
<enebo>
A second less important issue is the process does not show up as jruby either
<headius>
and env doesn't take arguments on all unixes
<headius>
it's a merry little flustercluck
<headius>
I believe it's bsd/darwin you can't pass args to env
<headius>
like /usr/bin/env jruby -some-arg
<headius>
there was a gem that did that
<chrisseaton>
could you have a stub executable, which execs the bash script for you?
<headius>
enebo: doesn't it?
<enebo>
heheh yeah mjruby
<headius>
I thought it does
<enebo>
for a bash script?
<headius>
since bash execs java
<headius>
it doesn't spawn it
<enebo>
headius: but it is called java
<headius>
oh
<headius>
I thought you meant it was called bash
<headius>
ok
<headius>
yeah it doesn't show up as jruby which would be nice
<headius>
and mjruby does
<headius>
and native launcher
<enebo>
chrisseaton: simple stub basically comes back to original problem of providing binary for uncommon platforms
<chrisseaton>
right, but at least it'll just be a one-line C program
<headius>
chrisseaton: we also get complaints and bugs from people on systems that don't have bash :-D
<chrisseaton>
time to go back to java -jar jruby.jar
<headius>
at least once a year someone gets frustrated enough with it to try to write a sh version
<headius>
and they fail
<enebo>
chrisseaton: it might not be one line if it needs any quote processing
<chrisseaton>
hopefully this will be another benefit of our upcoming AOT builds
subbu|away has joined #jruby
<headius>
could be
<headius>
this is a general java issue though
<headius>
'java' as a command line is terrible ux
<enebo>
chrisseaton: does jruby-truffle startup on windows do you know?
<chrisseaton>
it used to, but we haven't tried it in ages
<enebo>
chrisseaton: well that is positive at least
kith has quit [Quit: kith]
<chrisseaton>
we inherited a lot of dependency on posix when we imported the rubinius kernel, but I know we can at least do hello-world with that turned off now
<chrisseaton>
we don't see it as worth spending time on at this stage of development
<headius>
yeah, the posix stuff will be interesting...rbx has never even started up on Windows as far as I know, and you're using their code
<enebo>
chrisseaton: yeah rbx never ran on windows. I think someone only got it to compile for a while but not fully bootstrap
<headius>
we know that windows is a serious pain
<headius>
jruby has been, on and off, the only ruby to work properly on Windows for anything real
<chrisseaton>
We aren't do GraalVM builds on Windows at the moment either
<enebo>
chrisseaton: yeah it is something which can be fixed later
<chrisseaton>
Yeah, by someone else hopefully
<enebo>
chrisseaton: it is not instubstatial but possible…mainly lack of some posix sau7pport means more code paths
<enebo>
HAHA
<chrisseaton>
It's not really a research question - makes sense to get a proper windows dev team to do it, not researchers
<CaptainHeavy>
Hi everyone. I'm invoking a private Java instance method using the following (https://gist.github.com/mlk5060/32ba0a07e22445d680e3) but the object being returned is not of the required class (VisualSpatialField). Instead, its a "Java::JavaObject". I can't seem to cast it to what I need it to be to run tests, any advice?
<lopex>
enebo: you can disregard some optimizations there, like the single char class thingy
subbu|afk is now known as subbu
<lopex>
enebo: somewhat stalled at that work for other projects though
<lopex>
enebo: is there any blocker relying on that ?
<enebo>
lopex: I don’t know what is wrong with that test and whether anything depends on it
<enebo>
lopex: it would be nice to not regress for 1.7.25 though
<lopex>
enebo: anyways, it isnt as bad as I initially thought wrt the "being behind" thingy
<lopex>
enebo: not that overwhelming
<enebo>
it will be nice to get caught up
<enebo>
lopex: I was also wondering about emitting joni as IR the other day
<lopex>
gimme a dead line
<enebo>
lopex: but it is a bit too blue sky
<enebo>
for now anyways
<lopex>
enebo: as IR ? from it's AST ?
<enebo>
lopex: it would nice if we were able to test updates mid next week
<enebo>
lopex: yeah
<lopex>
enebo: oh, you do have an infrastructure for that now
<lopex>
enebo: but
<enebo>
lopex: yeah the jumping and branching is already there we just need simple translation but there are a bunch of instrs we would need to wrap or make new ones which call back into joni
<lopex>
the stack wont be easy
<enebo>
ah the stack
<enebo>
:)
<lopex>
different pops
<lopex>
like return from alternative
<lopex>
and return from subexp call
<lopex>
I still have no idea how to tackle that
<enebo>
ok well I did not look with any closeness but I was thinking it could have been an interesting GSoC project for someone
<lopex>
sure
<enebo>
potentially we could manage the stack as a temp value in IR and pass it to instrs
<enebo>
I guess that all depends though
<lopex>
and it needs to be very fast
<enebo>
yeah
<lopex>
enebo: I wonder
<enebo>
I guess backtracking and captures all have to be maintained somehow
<lopex>
enebo: for a subset of regexps one could use re2j
<lopex>
enebo: there's java impl for it now
<enebo>
afk a few
<lopex>
it's slower than joni on average in terms of processing
<lopex>
but it's linear
<enebo>
but I was just thinking about the fact we emulate a machine in joni and we have one IR format which can compile
<enebo>
then I was thinking I keep falling behind on the stuff I need to do and that a student could maybe learn a lot trying
<enebo>
OR A LOPEX
<lopex>
enebo: DFA ?
<enebo>
well my definition of machine may be a bit more loose than yours
<lopex>
enebo: lol I even looked at V8 stuff
<lopex>
enebo: but it seems to be a static asm emitter mostly
adgtl has joined #jruby
<lopex>
for a few minutes so I can be wrong on that
<adgtl>
What's best way to write pmap in jruby?
<enebo>
for many anything with an ‘ip’ instruction pointer qualifies as being labelled a machine
<lopex>
from scratch ?
<enebo>
really afk a sec now
chrisseaton has quit [Ping timeout: 264 seconds]
chrisseaton has joined #jruby
camlow325 has quit [Remote host closed the connection]
yfeldblum has joined #jruby
subbu has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]