[12:18] *** lizmat left
[12:18] *** lizmat joined
[14:50] *** Geth left
[16:27] *** Geth joined
[17:12] <[Coke]> "rak thing dir" - no match. "rak thing dir/file" -path specification did not select any files. - but the file exists, and has this string in it.

[17:13] <[Coke]> is there a way to generate debug output so I can see why it's not finding it?

[17:55] <lizmat> --rak

[18:03] <[Coke]> Path specification did not select any files, paths: [".\\config\\my-file.json"], dir .\config\my-file.json - it's there.

[18:04] <[Coke]> might it think it's not a text file?

[18:06] <[Coke]> from the readme: just before it isi being called.

[18:06] <[Coke]> small typo

[18:07] <[Coke]> if I explicitly add "--extensions=json", it finds it. 

[18:07] <lizmat> is it a very small file ?

[18:08] <lizmat> also: is it readable?

[18:08] <[Coke]> 2960L, 103967B

[18:09] <[Coke]> "type path/to/file" works.

[18:09] <[Coke]> I can vi it

[18:09] <[Coke]> (this is windows)

[18:09] <[Coke]> rak can read it fine if I use --extensions=json

[18:13] <[Coke]> I don't have a .rak-config.json in my home dir on this windows box

[18:13] <lizmat> hmmm...   wonder if it is somehow Windows related...

[18:15] <[Coke]> any reason why the first run of 'rak thing dir' might be significantly slower than future calls?

[18:16] <[Coke]> Guessing it has to be the is-text= true default

[18:17] <[Coke]> yah, specifying "extensions" doesn't show is-text then in --rak

[18:18] <[Coke]> I also do not see that I opened this as an issue previously. You're using a module for the "is-text" check, I'm guessing?

[18:18] <lizmat> what does: use path-utils; say path-is-text("config/my-file.json")

[18:18] <lizmat> say?

[18:19] <[Coke]> 0

[18:19] <lizmat> ok, so it considers it to be binary

[18:20] <lizmat> assuming the path is correct

[18:20] <lizmat> maybe the file has a BOM?  and that triggers it ?

[18:20] <lizmat> also the test assumes it's UTF-8 or ASCII

[18:21] <lizmat> any 16bit encoding would probably also consider it binary

[18:21] <[Coke]> vi -b shows no BOM

[18:21] <[Coke]> it does show a ^M per line...

[18:22] <[Coke]> I'll figure out what in the algo is causing the fail

[18:26] <lizmat> it *is* open source...  :-)   a PR for path-utils would be brill

[18:29] <[Coke]> Having this all be in NQP makes debugging hard.

[18:36] <[Coke]> Oh. looking at just comments:

[18:36] <[Coke]>   # \r not followed by \n hints binary

[18:36] <[Coke]> ... that is not true for windows

[18:36] <lizmat> no?

[18:38] <[Coke]> ... ah, whoops, it's expected to be \r\n windows, \n linux. oops

[18:38] <lizmat> yeah, old pre-OSX macs only had \r only

[18:43] <[Coke]> got it. You are trimming the buffer *first*, then checking to see if the \r is followed by an \n.

[18:43] <[Coke]> ... and in this file, guess what the buffer ends on.

[18:44] <[Coke]> Just happens to be split at the magic 4096 mark.

[18:45] <[Coke]> if I change it to 4095, it says it's text

[18:45] <[Coke]> or, more importantly, 4097.

[18:47] <[Coke]> opened a ticket.

[18:47] <[Coke]> path-utils #3

[18:47] <lizmat> ah, cool. thanks!

[18:48] <[Coke]> \o/

[18:55] <lizmat> line 88 in path-utils:

[18:55] <lizmat> if you change that to:         my int $limit = nqp::elems($buf) -1;

[18:55] <lizmat> does it accept it then?   (I think it should)

[19:18] <[Coke]> af(that)k right now, will check later and report back

