<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'.
<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;
<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]