tcrawley is now known as tcrawley-away
enebo has quit [Ping timeout: 260 seconds]
thedarkone2 has joined #jruby
erikhatcher has quit [Quit: erikhatcher]
camlow325 has quit [Quit: WeeChat 1.5]
bzb has joined #jruby
bzb has quit [Quit: Leaving]
ankitr has joined #jruby
ankitr has quit [Ping timeout: 240 seconds]
baweaver is now known as baweaver_away
tcrawley-away is now known as tcrawley
tcrawley is now known as tcrawley-away
baweaver_away is now known as baweaver
yosafbridge has quit [Quit: Leaving]
yosafbridge has joined #jruby
ankitr has joined #jruby
ankitr has quit [Ping timeout: 268 seconds]
ankitr has joined #jruby
_whitelogger has joined #jruby
tcrawley-away has quit [Ping timeout: 240 seconds]
tcrawley-away has joined #jruby
tcrawley-away is now known as tcrawley
tcrawley has quit [Changing host]
tcrawley has joined #jruby
thedarkone2 has quit [Quit: thedarkone2]
ankitr is now known as atm0sphere
chrisarcand has quit [Ping timeout: 240 seconds]
chrisarcand has joined #jruby
byteflam1 has joined #jruby
damnski has quit [Ping timeout: 240 seconds]
byteflame has quit [Ping timeout: 256 seconds]
damnski has joined #jruby
shellac has joined #jruby
erikhatcher has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
shellac has joined #jruby
erikhatcher has quit [Quit: erikhatcher]
vtunka has joined #jruby
ankitr has joined #jruby
atm0sphere has quit [Ping timeout: 246 seconds]
prasunanand has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
shellac has joined #jruby
ankitr has quit [Ping timeout: 256 seconds]
ankitr has joined #jruby
ankitr has quit [Ping timeout: 256 seconds]
ankitr has joined #jruby
ankitr has quit [Ping timeout: 260 seconds]
ankitr has joined #jruby
marahin has joined #jruby
bbrowning_away is now known as bbrowning
prasunanand has quit [Ping timeout: 246 seconds]
<GitHub129> [jruby] donv closed issue #1023: Slowdown when enabling invokedynamic for YAML + ActiveRecord example https://git.io/vSZ4K
prasunanand has joined #jruby
donV has joined #jruby
donV has quit [Client Quit]
donV has joined #jruby
donV has quit [Client Quit]
donV has joined #jruby
donV has quit [Client Quit]
donV has joined #jruby
donV has quit [Client Quit]
donV has joined #jruby
erikhatcher has joined #jruby
ankitr has quit [Ping timeout: 256 seconds]
<donV> Anyone tried using Slim as templating engine in a Java (Spring MVC) application?
shellac has quit [Ping timeout: 268 seconds]
enebo has joined #jruby
<donV> enebo: Hi there!
<enebo> donV: hello
<donV> enebo: All well?
<enebo> yeah I think so but now I need to run again 5 days off stinks
<nirvdrum> enebo: These magic comments are driving me slowly mad.
<nirvdrum> *slowly driving
<enebo> nirvdrum: I remember vaguely first n lines can conditionally be coding but that the generic pragmas can be anywhere?
<nirvdrum> As far as I can tell, there are only 3 we handle: coding/encoding, frozen_string_literal, and warn_indent.
<nirvdrum> warn_indent doesn't work. We just detect it and no-op.
<enebo> nirvdrum: ah well that is possible :)
<enebo> nirvdrum: but coding cannot be anywhere can it?
<nirvdrum> frozen_string_literal should print a warning after a token has been encountered.
<nirvdrum> And coding should be the top line.
<nirvdrum> But, it's possible to parse the same line 3 times which is nutty to me.
<nirvdrum> I did find a way to reduce that slightly and, incidentally, fix a bug in the lexer.
<nirvdrum> Those should probably be #equalsIgnoreCase instead of #equals.
<enebo> nirvdrum: ahahahaha omg I hate this code
<nirvdrum> If you find "cODiNG", that match fails and then is rediscovered in #set_file_encoding
<enebo> nirvdrum: really? I guess now that you mention it I know CcOoDdIiNnGg works like that
<nirvdrum> And it works in #set_file_encoding.
<enebo> I was not sure about all features
<enebo> ok
<enebo> nirvdrum: you fixing it also in our codebase once you work this out?
<nirvdrum> The bug is FRoZen_stRING_LiTERAl should also match.
<nirvdrum> The exact match fails here and there's no secondary search.
<enebo> nirvdrum: just in case kidnappers write code
<nirvdrum> enebo: I can. I didn't want to start poking your lexer without your input though.
<nirvdrum> enebo: Oh, it gets even better. If you do an case-insensitive ignore, you don't need #set_file_encoding at all. EXCEPT, evidently vim style comments are also valid.
<enebo> nirvdrum: well I trust your judgement and would love it if you cleaned our stuff as well
<nirvdrum> So, if the top line of a file is a comment and it doesn't have a standard magic comment, the entire thing is scanned for vim comments.
<enebo> nirvdrum: plus the more we are in sync in this stuff the easier it will be to sync later
<enebo> nirvdrum: but if you are unsure about something I can help figure it out too
<nirvdrum> Seriously. Look at set_file_encoding. That method is insane.
<enebo> nirvdrum: ah yeah that is an MRI ported method
<enebo> well mostly anyways
<nirvdrum> So, in summary, there's a scan for '-*-', another scan for standard magic comments, then another scan for embedded non-standard comments.
<nirvdrum> At the risk of being arrogant, this seems like something that a single regexp pass could handle.
<enebo> nirvdrum: If these are all inherently first line stuff it seems a single joni regexp woudl work best
<enebo> nirvdrum: So at some point I think I partially did part of this as a regexp but left in what was already ported
<nirvdrum> I think this follows onto a recent JRuby issue.
<enebo> nirvdrum: but they have some wacky logic around \n and # which is hard to grok
<enebo> nirvdrum: I think I just made it work and moved on
<nirvdrum> If this is the top line of your file:
<nirvdrum> # If the encoding==ascii-8bit, then we're screwed.
<nirvdrum> Then you can't load it.
<enebo> nirvdrum: ah I susprised we don't iso8859_1 it?
<nirvdrum> Because MRI thinks you're trying to set the encoding to "=ascii-8bit"
<nirvdrum> It just plucks "coding=<something>" out of comments.
<nirvdrum> Okay. I'll see if I can get the regexp working.
<enebo> nirvdrum: yeah and it is not a real encoding
<enebo> nirvdrum: and we are still treating identifiers as java strings which need a charset
<enebo> hmm
<nirvdrum> If your top comment has a '=' or ':', we make a substring and do a case-insensitive compare to 'coding'.
<nirvdrum> For each such '=' or ':'.
<enebo> does MRI?
<donV> Woohoo!
<enebo> donV: notice "partial" in that sentence but still time heals all wounds :)
<nirvdrum> enebo: I believe so. They also don't pass through a regexp engine. It's a hand-written state machine.
<donV> Yeah, here’s hoping.
<nirvdrum> Maybe that's why this isn't as slow for them.
prasunanand has quit [Ping timeout: 246 seconds]
tenderlove has joined #jruby
<nirvdrum> enebo: I suppose this is complicated by coding allowing '=' as a delimiter, while frozen_string_literal must be ':'.
tenderl__ has joined #jruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlo_ has quit [Ping timeout: 240 seconds]
shellac has joined #jruby
<GitHub10> [jruby] enebo closed pull request #4553: support new JDK version string scheme (master...master) https://git.io/vSGIf
<GitHub168> [jruby] enebo pushed 2 new commits to master: https://git.io/vSZQw
<GitHub168> jruby/master e7bcde5 Thomas E Enebo: Merge pull request #4553 from iignatev/master...
<GitHub168> jruby/master fc06776 iignatyev: support new JDK version string scheme
prasunanand has joined #jruby
prasunanand has quit [Ping timeout: 246 seconds]
vtunka has quit [Quit: Leaving]
slash_nick has joined #jruby
prasunanand has joined #jruby
donValentin has joined #jruby
donValentin has quit [Client Quit]
lanceball is now known as lance|afk
tenderl__ has quit [Remote host closed the connection]
tenderlove has joined #jruby
prasunanand has quit [Ping timeout: 246 seconds]
tenderlove has quit [Ping timeout: 246 seconds]
bga57 has quit [Ping timeout: 246 seconds]
prasunanand has joined #jruby
tenderlove has joined #jruby
bga57 has joined #jruby
tenderlove has quit [Ping timeout: 240 seconds]
ankitr has joined #jruby
thedarkone2 has joined #jruby
shellac has quit [Quit: Computer has gone to sleep.]
tenderlove has joined #jruby
tenderlove has quit [Ping timeout: 260 seconds]
tenderlove has joined #jruby
tenderlove has quit [Ping timeout: 240 seconds]
ankitr has quit [Ping timeout: 258 seconds]
tenderlove has joined #jruby
lance|afk is now known as lanceball
tenderlove has quit [Ping timeout: 256 seconds]
shellac has joined #jruby
Scorchin_ has joined #jruby
rtyler_ has joined #jruby
eonwe_ has joined #jruby
andrewvc_ has joined #jruby
jhass has quit [Ping timeout: 276 seconds]
andrewvc has quit [Ping timeout: 276 seconds]
ragge has quit [Ping timeout: 276 seconds]
Scorchin has quit [Ping timeout: 276 seconds]
eonwe has quit [Ping timeout: 276 seconds]
rtyler has quit [Ping timeout: 276 seconds]
andrewvc_ is now known as andrewvc
jhass has joined #jruby
Scorchin_ is now known as Scorchin
prasunanand has quit [Ping timeout: 246 seconds]
oneiros has joined #jruby
<donV> oneiros: Hi!
<oneiros> donV: hi
<donV> oneiros: Testing your fork now. Got an application crash. Investigating.
<oneiros> donV: crash is good :D
<oneiros> donV: but this might very well be due to ruboto code. i think i documented all my changes to the generated app in #737 but i might have missed something.
<donV> OK, I’m getting the “Failed resolution of: Ljava/lang/ClassValue”. I saw you mentioned that.
<donV> oneiros: I am on the wrong branch?
<donV> Building with the android9k branch now.
<oneiros> donV: ok. fwiw, i think there are always quite a lot of those messages. i think dalvik complains whenever it sees an unknown class in a message signature, but will not throw an exception unless this is actually called somewhere.
shellac has quit [Quit: Computer has gone to sleep.]
<donV> Yeah
<donV> oneiros: But this time is failed when trying to access it. Not important since I was on the wrong branch.
tenderlove has joined #jruby
tenderlo_ has joined #jruby
<donV> oneiros: trying again now with a new gem from the right branch
<donV> oneiros: building apk…
tenderlove has quit [Ping timeout: 260 seconds]
<donV> oneiros: Hmm, same error. Maybe I did not cleanup after previous run…
tenderlo_ has quit [Quit: Leaving...]
tcrawley is now known as tcrawley-away
<donV> oneiros: OK, ran from a clean workspace and have som enew results: compilation error
<donV> lib/DexClient.java:60: error: method translate in class CfTranslator cannot be applied to given types;
<donV> clazz = CfTranslator.translate(name, bytes, cfOptions, dexOptions);
<donV> ^
<donV> required: DirectClassFile,byte[],CfOptions,DexOptions,DexFile
<donV> found: String,byte[],CfOptions,DexOptions
<donV> reason: actual and formal argument lists differ in length
<donV> 1 error
subbu is now known as subbu|lunch
<oneiros> donV: did you remove dx.jar from your apps libs/ directory?
<oneiros> donV: and what are you trying to compile, jruby or the app?
<donV> oneiros: no…
<donV> oneiros: the app
<oneiros> donV: dexclient is part of jruby in my branch, so you need to remove dx.jar
<donV> OK, will do
oneiros has quit [Ping timeout: 258 seconds]
oneiros has joined #jruby
<donV> oneiros: So, removed DexClient.java and dx.jar
<donV> oneiros: Where in your repo are these files?
prasunanand has joined #jruby
<oneiros> donV: dexmaker is simply a dependency in core/pom.rb. i cannot remember where i get dexclient from. let me have a look.
<donV> oneiros: OK, new result: java.lang.ClassNotFoundException: Didn't find class "jnr.ffi.mapper.FunctionMapper"
<oneiros> donV: re dexclient: i am not 100% sure, but i think i took a more recent version from here https://github.com/headius/dexclient/blob/master/src/DexClient.java
<donV> oneiros: OK, that is my fault. Ruboto tooling removes that package.
<donV> oneiros: OK, once more: java.lang.RuntimeException: Could not load platform constants for OpenFlags
<donV> oneiros: Did you get that, or am I stripping something I should not.
<oneiros> donV: i have seen this before. see https://github.com/jruby/jruby/issues/4006
<oneiros> donV: i downgraded jnr-constants which fixed the problem for me
<donV> oneiros: in your repo pom.rb has jnr-constants:0.9.6
subbu|lunch is now known as subbu
<oneiros> donV: that is strange. here is the commit with the downgrade https://github.com/oneiros/jruby/commit/7e2fbbb588992031f2350ceb03b4ce343e688897
<oneiros> donV: remember to look in the android9k branch
<donV> oneiros: Yes! My mistake. jnr-constants:0.9.1 Will try again.
<donV> oneiros: OK, one step further: java.lang.ClassNotFoundException: org.ruboto.DalvikProxyClassFactory
<donV> oneiros: That is not part of your build, right?
ragge has joined #jruby
<oneiros> donV: nope. this is something ruboto somehow adds to jruby.jar
<donV> Yes, a dynamic class compiler :)
<oneiros> donV: to not have to fiddle with the jar every time, i simply put the source file in src/org/ruboto in my app.
<donV> It uses DexClient and I need to compile it.
<oneiros> donV: sorry, this is really messy. i was concentrating on the jruby side and put a lot of quick and dirty hacks in my ruboto app.
<donV> Hey, anything to get a proof of concept working :)
<donV> We can make it pretty later :)
<donV> oneiros: I am having trouble finding the DexClient class.
<oneiros> donV: me too :)
<oneiros> donV: i have a DexClient.class file lying around and i cannot for the life of me remember where i got this from.
<oneiros> donV: i think i might have just extracted this from a 1.7.26 jruby.jar and manually put this in my version of the jar.
<oneiros> donV: yup, same md5.
<donV> Is DexClient present in regular jruby.jar ?
<oneiros> donV: not if you build jruby. it gets injected into it once you install jruby into a ruboto app though.
<oneiros> at least iirc
<donV> oneiros: Yes, that is what I am doing here now :)
<donV> oneiros: There is some version mismatch. Can’t find `DexFormat`.
<donV> oneiros: OK, back to basics: Where do you include dx.jar?
<oneiros> donV: it is a dependeny of jruby now and ends up in jruby.jar.
<donV> Thanks, you said that and I already forgot :) I’ll check the version.
<oneiros> donV: looks like package names have changed a little. it seems to be com.android.dex.DexFormat now. but that should not matter if you do not try to recompile dexclient.
<oneiros> of course, the compiled dexclient.class i used will not work, but i never got to the point that it was actually called.
<donV> oneiros: I am at the point where I need to load the dynamic class compiler which need DexClient.
<donV> So I need to compile it.
<donV> oneiros: The package is from linkedin, not google?
<oneiros> donV: i am confused. do you get a compile-time error or a runtime exception?
<oneiros> donV: yes, looked like it was the latest stuff.
<donV> oneiros: Maybe that is a linkedin package with dependency to a google/android package?
<oneiros> donV: no, it is a more currently maintained fork of the google stuff.
<donV> oneiros: OK. Need to adjust the DexClient a bit, I think.
hoodow has quit [Ping timeout: 240 seconds]
<oneiros> donV: yup, probably better than my series of hacks.
<oneiros> donV: sorry but i got to go now. please let me know if it worked out.
<donV> oneiros: Will do. Go to sleep soon myself.
<oneiros> good night then :)
oneiros has left #jruby [#jruby]
hoodow has joined #jruby
hoodow has joined #jruby
hoodow has quit [Changing host]
erikhatcher has quit [Quit: erikhatcher]
shellac has joined #jruby
kegster has quit [Read error: Connection reset by peer]
donV has quit [Quit: donV]
prasunanand has quit [Ping timeout: 246 seconds]
rtyler_ is now known as rtyler