News for hackers. Stuff that matters.
Re:Go Replace - simple and fast search and replace tool for ... by swah on Wednesday May 22, 2013 @07:28AM (#5750048)
This isn't working for me. I get:

    C:\Users\swah\docs>gr TEST
    panic: Given path should be anchored at /

    goroutine 1 [running]:
    main.NewIgnorer(0xc08005bcf0, 0x29, 0x0, 0x0, 0x140110, ...)
            /Users/piranha/dev/go/src/goreplace/ignore.go:32 +0xa4
    main.main()
            /Users/piranha/dev/go/src/goreplace/goreplace.go:62 +0x1b7

    goroutine 2 [runnable]:
[edit] New version is working!
Re:Go Replace - simple and fast search and replace tool for ... by piranha on Wednesday May 22, 2013 @07:31AM (#5750060)
Argh! I see, I think I can solve this. Give me a bit of time please. :)
Re:Go Replace - simple and fast search and replace tool for ... by piranha on Wednesday May 22, 2013 @07:43AM (#5750089)
Should be fixed, can you download new version please?
Re:Go Replace - simple and fast search and replace tool for ... by swah on Wednesday May 22, 2013 @07:46AM (#5750104)
Working! Do you use colors? They don't work the same in DOS, I believe. I'm seeing some escape sequences.

    ←[0;32;49mRS\terms.tex
    ←[0m←[1;39;49m←[0;33;49m25:←[0m   ←[0;39;43mOEM←[0m  &                                      \\ \hline
Re:Go Replace - simple and fast search and replace tool for ... by to3m on Wednesday May 22, 2013 @12:15PM (#5751844)
It's been a while but those look like ANSI escapes so I think if you add something like DEVICEHIGH=C:\DOS\ANSI.SYS to your CONFIG.SYS then you should find it starts to interpret them correctly. I think ANSI.SYS uses up less than 30K.
Re:Go Replace - simple and fast search and replace tool for ... by piranha on Wednesday May 22, 2013 @08:08AM (#5750181)
Eh, it's not very easy to fix that unfortunately. I opened an issue and will try to work on this a bit, but then in a meanwhile... Maybe I can strip colors for outputting things on windows.

Edit: argh, outputting colors on windows means making system calls. Which means cgo and good-bye cross-compiling. I'll probably just strip all colors...

Re:Go Replace - simple and fast search and replace tool for ... by swah on Wednesday May 22, 2013 @08:18AM (#5750221)
Hmm, yeah, actually codemod.py had the same issue and I changed it to use Python's colorama library.

https://pypi.python.org/pypi/colorama

Re:Go Replace - simple and fast search and replace tool for ... by piranha on Wednesday May 22, 2013 @07:50AM (#5750112)
Oh, it's the library I use has no idea about colors in DOS. :( I'll have to do some research on how to fix this... :\