Camelia, the Perl 6 bug

IRC log for #bioruby, 2012-10-23

| Channels | #bioruby index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
17:57 shevy joined #bioruby
18:35 linnea today things aren't moving forwards
18:35 linnea I have problems with the two functions I'm trying to fix
18:41 shevy heya linnea
18:41 shevy are you lintsu??
18:41 shevy anyway, things are often like this
18:41 shevy there are good days and there are bad days :-)
18:41 shevy with experience one can work through the bad days much faster
18:41 shevy what is the problem you face?
18:47 linnea yeah I'm :P
18:48 linnea i'm trying to remove newlines from sequence name
18:48 linnea it is something trivial because I used gsub before and it worked
18:50 shevy for removing something from a string, make use of .gsub
18:50 shevy it is best
18:51 shevy "abc\ndef".gsub(/\n/,'') # => "abcdef"
18:51 shevy .delete would also work
18:51 linnea I have name = namedef.gsub(/\s/," ")
18:51 shevy "abc\ndef".delete "\n" # => "abcdef"
18:51 shevy but .gsub is much more useful
18:51 shevy well \s
18:51 shevy do you know rubular?
18:51 linnea yeah
18:52 shevy ok :)
18:52 shevy http://rubular.com/
18:52 linnea [\n\f] would also work
18:52 shevy \s means -> Any whitespace character
18:52 linnea if \f was windows
18:52 shevy so it would work for ' '
18:53 shevy but not for \n
18:55 linnea in other code \s removes also newlines
18:55 shevy I doubt that! :)
18:56 shevy but you can give me an example that works hehe
18:58 linnea just now removing \n doesnt wor
18:58 linnea work

| Channels | #bioruby index | Today | | Search | Google Search | Plain-Text | summary