white_bear

Activity Graph

Page 1 of 1

2015-07-31

[08:01:05] white_bear: has joined #ruby
[16:10:57] white_bear: Quit: leaving

2015-07-29

[08:37:07] white_bear: has joined #ruby
[15:00:43] white_bear: Ping timeout: 244 seconds

2015-07-28

[08:31:18] white_bear: has joined #ruby
[16:28:06] white_bear: Quit: leaving

2015-07-27

[08:44:26] white_bear: has joined #ruby
[08:54:47] white_bear: Quit: leaving
[09:02:09] white_bear: has joined #ruby
[11:58:57] white_bear: Ping timeout: 244 seconds
[12:12:31] white_bear: has joined #ruby
[16:45:34] white_bear: Quit: leaving

2015-07-24

[08:16:48] white_bear: has joined #ruby
[17:11:22] white_bear: Quit: leaving

2015-07-23

[08:00:39] white_bear: has joined #ruby
[08:26:12] white_bear: Ping timeout: 240 seconds
[08:51:40] white_bear: has joined #ruby
[15:56:01] white_bear: Quit: leaving

2015-07-22

[08:09:45] white_bear: has joined #ruby
[17:07:40] white_bear: Quit: leaving

2015-07-21

[07:36:02] white_bear: has joined #ruby
[12:16:21] white_bear: SebastianThorn: rofl
[16:40:35] white_bear: Quit: leaving

2015-07-20

[08:01:39] white_bear: has joined #ruby
[15:07:52] white_bear: Quit: leaving

2015-07-17

[07:47:55] white_bear: has joined #ruby
[16:50:58] white_bear: Quit: leaving

2015-07-16

[07:59:26] white_bear: has joined #ruby
[15:33:28] white_bear: Quit: leaving

2015-07-15

[08:12:34] white_bear: has joined #ruby
[16:40:01] white_bear: Quit: leaving

2015-07-13

[07:55:14] white_bear: has joined #ruby
[15:22:13] white_bear: Quit: leaving

2015-07-10

[07:38:50] white_bear: has joined #ruby
[08:35:22] white_bear: Ping timeout: 256 seconds
[10:24:29] white_bear: has joined #ruby
[10:29:23] white_bear: Ping timeout: 244 seconds

2015-07-09

[08:00:40] white_bear: has joined #ruby
[17:09:06] white_bear: Quit: leaving

2015-07-08

[07:49:29] white_bear: has joined #ruby
[16:35:09] white_bear: Quit: leaving

2015-07-06

[07:49:30] white_bear: has joined #ruby
[12:47:39] white_bear: Quit: leaving
[12:48:05] white_bear: has joined #ruby
[17:09:47] white_bear: Quit: leaving

2015-07-03

[08:32:16] white_bear: has joined #ruby
[16:28:09] white_bear: Quit: leaving

2015-07-02

[08:24:51] white_bear: has joined #ruby
[16:19:13] white_bear: Quit: leaving

2015-07-01

[07:48:21] white_bear: has joined #ruby
[16:12:18] white_bear: Quit: leaving

2015-06-30

[08:14:28] white_bear: has joined #ruby
[13:34:48] white_bear: Quit: leaving
[13:35:15] white_bear: has joined #ruby
[17:55:58] white_bear: Quit: leaving

2015-06-29

[07:59:02] white_bear: has joined #ruby
[09:31:48] white_bear: Ping timeout: 244 seconds
[10:02:59] white_bear: has joined #ruby
[16:14:55] white_bear: Quit: leaving

2015-06-26

[07:32:01] white_bear: has joined #ruby
[16:37:25] white_bear: Quit: leaving

2015-06-25

[08:05:14] white_bear: has joined #ruby
[17:23:36] white_bear: Quit: leaving

2015-06-24

[07:41:23] white_bear: has joined #ruby
[11:18:51] white_bear: i guess there is no way to comment array items when using %w[] syntax, right?
[11:37:17] white_bear: [k-: i ask because it doesn't work :p
[11:39:21] white_bear: right, that's what i thought. will stick with [ 'foo' 'bar' ] then
[11:39:37] white_bear: can't use symbols because of "-" characters
[11:41:19] white_bear: i meant without quotes :p
[11:42:38] white_bear: the purpose of %w is not using quotes, so... :D
[11:49:01] white_bear: what's the difference between %I and %i (double-quotes vs single?)
[11:50:46] white_bear: that explains why adaedra's example outputs "" while using %i
[16:09:56] white_bear: Quit: leaving

2015-06-23

[07:46:20] white_bear: has joined #ruby
[16:55:54] white_bear: Quit: leaving

2015-06-22

[07:32:26] white_bear: has joined #ruby
[07:38:24] white_bear: Ping timeout: 272 seconds
[09:27:36] white_bear: has joined #ruby
[09:33:11] white_bear: Ping timeout: 265 seconds

2015-06-19

[14:01:15] white_bear: has joined #ruby
[14:02:30] white_bear: hi. is there a way to use string concatenation's alias using the ternary operator only? i.e., 'foo' (<< 'bar' if <cond>)
[14:06:40] white_bear: undeadaedra: cool, thanks!
[14:24:36] white_bear: undeadaedra: how would you do the same with a frozen string?
[14:25:10] white_bear: undeadaedra: that's what i thought :p
[14:25:18] white_bear: undeadaedra: alright
[14:32:07] white_bear: is it better to do x: "#{y}.#{z}" or x: y << z or x: y + z # ? i guess it's the right order, the former being the fastest
[14:33:53] white_bear: oh sorry i forgot the dot
[14:34:51] white_bear: the + operator makes a copy
[14:36:25] white_bear: right, so "#{x}.#{y}" is faster than x << '.' << y since there's no call to concat, right?
[14:37:27] white_bear: yes the result is the same, but << modifies x, alright
[14:41:45] white_bear: undeadaedra: got it
[14:44:26] white_bear: also, still about concatenation, is there a way to make something like: "#{x}.#{y}" with .#{y} appended on condition? e.g., "#{x}#{.#{y} if <cond>}"
[14:47:56] white_bear: yorickpeterse: nice one :D
[14:53:58] white_bear: undeadaedra: foo.include? ... ? ... : ... # the two "?" looks redundant, don't they?
[14:58:56] white_bear: i've got a warning about string literal in condition (used ternary operator), why that? i.e., foo = x.include? '.' ? x : "#{x}.#{y}"
[15:04:14] white_bear: fixed: foo = x.include?('.') ? x : "#{x}.#{y}"
[16:12:40] white_bear: what's the best way to retrieve a filename without its multiple extensions, e.g., foo.bar.baz => foo
[16:12:55] white_bear: File.basename('foo.bar.baz', '.*') returns 'foo.bar'
[16:13:45] white_bear: that's what i'm doing for the moment: File.basename(f).split('.').first
[16:14:04] white_bear: well the first token, tokens being delimited by "."
[16:15:15] white_bear: i find .* misleading, you'd think it'd match everyting after the first dot (including the dot), but nope
[16:17:09] white_bear: ljarvis: well it depends on the naming convention but yeah
[16:19:14] white_bear: ljarvis: in the shell you can do "${f%.*}" to get "foo.bar" and "${f%%.*}" to get "foo"
[16:19:22] white_bear: ljarvis: maybe there's an equivalent in ruby
[16:20:20] white_bear: ljarvis: i see your point
[16:26:21] white_bear: Quit: leaving