00:00
mistym has quit [Remote host closed the connection]
00:00
bfreeman has quit [Read error: Connection reset by peer]
00:00
bfreeman has joined #ruby-lang
00:02
<
akahn >
what is the array method that returns an array containing the shortest unambiguous strings contained in the receiver? I'm having a hard time describing this
00:03
Jessykinz has joined #ruby-lang
00:03
<
akahn >
like how you can gem p returns an error with 'unambiguous matches' but gem pr executes gem pristine
00:04
Averna has joined #ruby-lang
00:04
<
darix >
akahn: a tree structure might be better for this. but a simple solution could be
00:04
<
akahn >
I swear I've seen a built in method for this
00:05
voker57 has joined #ruby-lang
00:05
<
darix >
matches = cmd_array.select {|e| e =~ needle_regexp }
00:06
tenderlove has quit [Remote host closed the connection]
00:06
wyhaines has quit [Remote host closed the connection]
00:06
karasawa has joined #ruby-lang
00:06
tenderlove has joined #ruby-lang
00:06
ilyam has joined #ruby-lang
00:07
zhul_mechanos has quit [Quit: zhul_mechanos]
00:08
tenderlove has quit [Read error: Connection reset by peer]
00:08
tenderlo_ has joined #ruby-lang
00:10
<
postmodern >
stupid question, can you send a body with Net::HTTP::Get?
00:10
karasawa has quit [Ping timeout: 276 seconds]
00:11
toertore has joined #ruby-lang
00:12
outoftime has quit [Quit: Leaving]
00:13
tenderlo_ has quit [Ping timeout: 264 seconds]
00:14
toretore has quit [Ping timeout: 252 seconds]
00:17
<
postmodern >
lianj, awesome! thank you
00:19
bfreeman_ has joined #ruby-lang
00:19
ivanoats has quit [Remote host closed the connection]
00:22
bfreeman has quit [Ping timeout: 240 seconds]
00:23
tenderlove has joined #ruby-lang
00:23
tenderlove has quit [Read error: Connection reset by peer]
00:26
znz_v has quit [Quit: kill -QUIT $$]
00:27
znz_v has joined #ruby-lang
00:27
davidbalbert is now known as davidbalber|away
00:27
Hakon has joined #ruby-lang
00:28
davidbalber|away is now known as davidbalbert
00:28
ryez_ has quit [Ping timeout: 245 seconds]
00:29
kain has quit [Ping timeout: 240 seconds]
00:29
Rarrikins has quit [Ping timeout: 248 seconds]
00:29
justinram has quit [Remote host closed the connection]
00:29
hugobastien has joined #ruby-lang
00:30
hugobastien has quit [Remote host closed the connection]
00:31
Hakon has quit [Ping timeout: 252 seconds]
00:31
mistym has joined #ruby-lang
00:31
mistym has quit [Changing host]
00:31
mistym has joined #ruby-lang
00:32
Rarrikins has joined #ruby-lang
00:33
kain has joined #ruby-lang
00:34
ryanv-raptor has joined #ruby-lang
00:43
anjen has joined #ruby-lang
00:49
justinseiter has quit [Ping timeout: 248 seconds]
00:50
Guest9041 has quit [Read error: Connection reset by peer]
00:51
yxhuvud2 has joined #ruby-lang
00:52
anjen has quit [Quit: anjen]
00:53
Guest9041 has joined #ruby-lang
00:55
yxhuvud has quit [Ping timeout: 276 seconds]
00:55
GarethAdams has quit [Quit: Leaving...]
00:57
<
darix >
postmodern: how much sense does it make?
00:57
<
darix >
a server should reject get with request body anyway no?
00:57
<
postmodern >
darix, apparently it is allowed
00:58
<
postmodern >
darix, Net::HTTPRequest#request_body_permitted? exists though
00:58
<
postmodern >
darix, im sure not all web-servers allow a body with GET
00:58
<
postmodern >
darix, http spec does not disallow it though
00:58
<
darix >
why not use post/put where a body is expected?
00:59
<
postmodern >
darix, it's for the Rails RCE exploit
00:59
<
darix >
lighty e.g. rejects ith with 400
00:59
Rarrikins_u has joined #ruby-lang
01:00
<
darix >
postmodern: so you try to exploit things?
01:00
Rarrikins has quit [Ping timeout: 246 seconds]
01:00
<
postmodern >
darix, not trying, doing :)
01:01
jimlek22` has joined #ruby-lang
01:02
GarethAdams has joined #ruby-lang
01:02
GarethAdams has quit [Changing host]
01:02
GarethAdams has joined #ruby-lang
01:03
<
darix >
so yet another script kiddie
01:03
<
postmodern >
darix, let alone exploit frameworks
01:04
blahwoop has quit [Ping timeout: 260 seconds]
01:04
benanne has quit [Quit: kbai]
01:04
jimlek22 has quit [Ping timeout: 255 seconds]
01:05
<
blazes816 >
yeah but then you use the scripts. so script kiddie. ;)
01:05
<
postmodern >
blazes816, using a script i wrote, doesn't imply im a kiddie
01:06
<
postmodern >
blazes816, nor kid nor kitten
01:06
<
blazes816 >
postmodern: yeah it was a joke
01:06
sabfer has left #ruby-lang [#ruby-lang]
01:06
<
postmodern >
blazes816, i guess if script kiddies write entire frameworks for their scripts
01:07
<
postmodern >
blazes816, would that make them astronaut engineer kiddies?
01:08
<
postmodern >
blazes816, *astronaut kiddie?
01:09
justinseiter has joined #ruby-lang
01:10
<
blazes816 >
wrong kiddie to fuck with certianly
01:11
<
postmodern >
blazes816, they will totally pwn you, after they get done refactoring their code for code smells
01:11
<
blazes816 >
that's all I ask
01:11
<
Spaceghost|cloud >
Are we all being pedantic little pretentious twits? :D
01:12
ryanv-raptor has quit [Quit: Leaving.]
01:13
marr has quit [Ping timeout: 248 seconds]
01:13
zeisler has joined #ruby-lang
01:14
<
zenspider >
anyone here an algs wonk? I need a code review on a stable hash function impl
01:18
GarethAdams has quit [Quit: Leaving...]
01:20
yfeldblum has quit [Ping timeout: 260 seconds]
01:20
Rarrikins_u has quit [Ping timeout: 246 seconds]
01:22
<
Spaceghost|cloud >
zenspider: I'm not pro by any means.
01:23
ilyam has quit [Quit: ilyam]
01:28
cardoni has quit [Quit: cardoni]
01:28
Rarrikins has joined #ruby-lang
01:32
cardoni has joined #ruby-lang
01:34
AFlyingMonkey has quit [Ping timeout: 252 seconds]
01:35
Rarrikins has quit [Ping timeout: 252 seconds]
01:35
robbyoconnor has joined #ruby-lang
01:36
Rarrikins has joined #ruby-lang
01:39
tenderlove has joined #ruby-lang
01:39
tenderlove has quit [Read error: Connection reset by peer]
01:39
asaaki has quit [Ping timeout: 252 seconds]
01:41
zeisler has quit [Quit: zeisler]
01:42
dustint_ has quit [Ping timeout: 255 seconds]
01:42
ViPi has quit [Ping timeout: 255 seconds]
01:43
bfreeman_ has quit [Quit: bfreeman_]
01:43
kogent has quit [Quit: kogent]
01:43
mjio has joined #ruby-lang
01:45
guns has joined #ruby-lang
01:46
itsmeduncan has quit [Quit: itsmeduncan]
01:47
itsmeduncan has joined #ruby-lang
01:49
dyfrgi has quit [Quit: Lost terminal]
01:49
asaaki has joined #ruby-lang
01:49
dyfrgi has joined #ruby-lang
01:50
dankest is now known as dankest|away
01:50
dankest|away has quit [Quit: Leaving...]
01:51
dankest has joined #ruby-lang
01:51
yxhuvud has joined #ruby-lang
01:52
ilyam has joined #ruby-lang
01:53
yxhuvud2 has quit [Ping timeout: 264 seconds]
01:53
dhsmith has joined #ruby-lang
01:54
rsl has quit [Quit: Computer has gone to sleep.]
01:54
guns has quit [Quit: guns]
01:56
ivanoats has joined #ruby-lang
01:56
ivanoats has quit [Changing host]
01:56
ivanoats has joined #ruby-lang
01:57
TheRealRickAstle has joined #ruby-lang
02:00
gregmoreno has quit [Remote host closed the connection]
02:00
havenn has quit [Remote host closed the connection]
02:00
MyMilkShake has joined #ruby-lang
02:00
wyhaines has joined #ruby-lang
02:00
dustint_ has joined #ruby-lang
02:01
K3xenn has left #ruby-lang [#ruby-lang]
02:01
blahwoop has joined #ruby-lang
02:01
davidbalbert is now known as davidbalber|away
02:03
TheRealRickAstle has quit [Ping timeout: 260 seconds]
02:05
hahuang65 has quit [Quit: Computer has gone to sleep.]
02:08
blahwoop has quit [Ping timeout: 255 seconds]
02:09
dankest is now known as dankest|away
02:09
havenn has joined #ruby-lang
02:12
KA_ has quit [Quit: KA_]
02:12
ivanoats has quit [Remote host closed the connection]
02:13
wyhaines_ has joined #ruby-lang
02:13
zeisler has joined #ruby-lang
02:15
bosie has quit [Ping timeout: 256 seconds]
02:16
wyhaines has quit [Ping timeout: 252 seconds]
02:16
wyhaines_ has quit [Read error: Connection reset by peer]
02:16
wyhaines has joined #ruby-lang
02:18
ivanoats has joined #ruby-lang
02:18
ivanoats has quit [Changing host]
02:18
ivanoats has joined #ruby-lang
02:20
ivanoats has quit [Remote host closed the connection]
02:22
Banistergalaxy has joined #ruby-lang
02:24
hahuang65 has joined #ruby-lang
02:25
wyhaines_ has joined #ruby-lang
02:26
bosie has joined #ruby-lang
02:27
wyhaines has quit [Ping timeout: 264 seconds]
02:27
KA_ has joined #ruby-lang
02:28
MyMilkShake has quit [Ping timeout: 264 seconds]
02:29
sn0wb1rd has quit [Quit: sn0wb1rd]
02:32
bosie has quit [Ping timeout: 276 seconds]
02:34
rcvalle has quit [Ping timeout: 244 seconds]
02:35
io_syl has quit [Ping timeout: 256 seconds]
02:36
DEac- has quit [Read error: No route to host]
02:36
DEac- has joined #ruby-lang
02:38
Rarrikins has quit [Ping timeout: 252 seconds]
02:41
xalei has joined #ruby-lang
02:41
larrylv has joined #ruby-lang
02:42
itsmeduncan has quit [Quit: itsmeduncan]
02:42
rcvalle has joined #ruby-lang
02:45
Rarrikins has joined #ruby-lang
02:46
karasawa has joined #ruby-lang
02:46
krz has joined #ruby-lang
02:47
krzkrz has joined #ruby-lang
02:47
sn0wb1rd has joined #ruby-lang
02:48
larrylv has quit [Remote host closed the connection]
02:49
dhsmith_ has joined #ruby-lang
02:50
KA_ has quit [Quit: KA_]
02:51
yxhuvud2 has joined #ruby-lang
02:52
dhsmith has quit [Ping timeout: 260 seconds]
02:52
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
02:53
yxhuvud has quit [Ping timeout: 248 seconds]
03:01
bfreeman has joined #ruby-lang
03:01
yfeldblum has joined #ruby-lang
03:02
Stormpath has quit [Quit: Stormpath]
03:02
jimlek22` has quit [Ping timeout: 252 seconds]
03:02
xalei has quit [Remote host closed the connection]
03:07
hahuang65 has quit [Quit: Computer has gone to sleep.]
03:09
slyphon has quit [Quit: slyphon]
03:09
Rarrikins_f has joined #ruby-lang
03:10
Rarrikins has quit [Ping timeout: 260 seconds]
03:11
brianpWins has quit [Quit: brianpWins]
03:11
AFlyingMonkey has joined #ruby-lang
03:12
macmartine has joined #ruby-lang
03:13
dustint_ has quit [Quit: Leaving]
03:15
zeisler has quit [Quit: zeisler]
03:17
dyfrgi has quit [Quit: brb]
03:17
dyfrgi has joined #ruby-lang
03:19
Guest9041 has quit [Ping timeout: 276 seconds]
03:20
Guest9041 has joined #ruby-lang
03:21
AFlyingMonkey has quit [Read error: Connection reset by peer]
03:22
AFlyingMonkey has joined #ruby-lang
03:22
macmartine has quit [Quit: Computer has gone to sleep.]
03:25
lsegal has joined #ruby-lang
03:26
hugobastien has joined #ruby-lang
03:26
AFlyingMonkey has quit [Read error: Connection reset by peer]
03:29
breakingthings has joined #ruby-lang
03:30
Guest9041 has quit [Ping timeout: 240 seconds]
03:30
m3nd3s has quit [Remote host closed the connection]
03:32
Rarrikins has joined #ruby-lang
03:33
imajes has quit [Excess Flood]
03:35
imajes has joined #ruby-lang
03:36
Rarrikins_f has quit [Ping timeout: 276 seconds]
03:40
Weems has quit [Ping timeout: 244 seconds]
03:43
ilyam has quit [Quit: ilyam]
03:43
wyhaines_ has quit [Remote host closed the connection]
03:48
havenn has quit [Remote host closed the connection]
03:51
serhart has quit [Quit: Leaving.]
03:51
yxhuvud has joined #ruby-lang
03:54
guns has joined #ruby-lang
03:54
yxhuvud2 has quit [Ping timeout: 255 seconds]
03:57
srbaker has joined #ruby-lang
03:58
dhsmith_ has quit [Remote host closed the connection]
04:02
Guest9041 has joined #ruby-lang
04:05
dankest|away has quit [Quit: Leaving...]
04:05
tenderlove has joined #ruby-lang
04:05
banisterfiend has quit [Ping timeout: 252 seconds]
04:07
dankest has joined #ruby-lang
04:11
blahwoop has joined #ruby-lang
04:12
io_syl has joined #ruby-lang
04:15
cored has quit [Ping timeout: 256 seconds]
04:16
hugobastien has quit [Remote host closed the connection]
04:16
rcvalle has quit [Ping timeout: 248 seconds]
04:17
hahuang65 has joined #ruby-lang
04:21
ddd has joined #ruby-lang
04:22
serhart has joined #ruby-lang
04:22
panpainter has quit [Quit: panpainter]
04:24
Tref has joined #ruby-lang
04:27
bosie has joined #ruby-lang
04:28
blahwoop has quit [Ping timeout: 248 seconds]
04:28
panpainter has joined #ruby-lang
04:32
bosie has quit [Ping timeout: 240 seconds]
04:37
gsav has quit [Read error: Connection reset by peer]
04:41
seoaqua has joined #ruby-lang
04:41
macmartine has joined #ruby-lang
04:41
srbaker has quit [Quit: Computer has gone to sleep.]
04:44
gsav has joined #ruby-lang
04:46
kogent has joined #ruby-lang
04:47
jxie has quit [Ping timeout: 246 seconds]
04:47
gsav has quit [Read error: Connection reset by peer]
04:48
kogent has quit [Read error: Connection reset by peer]
04:49
jxie has joined #ruby-lang
04:49
havenn has joined #ruby-lang
04:49
kogent has joined #ruby-lang
04:50
havenn has quit [Read error: Connection reset by peer]
04:51
yxhuvud2 has joined #ruby-lang
04:54
yxhuvud has quit [Ping timeout: 246 seconds]
04:54
karasawa has quit [Ping timeout: 276 seconds]
05:00
Tref has quit [Quit: Tref]
05:05
sn0wb1rd has quit [Quit: sn0wb1rd]
05:05
gregmore_ has joined #ruby-lang
05:06
gregmore_ has quit [Remote host closed the connection]
05:06
klebervirgilio has quit [Ping timeout: 244 seconds]
05:08
ryanf has quit [Ping timeout: 252 seconds]
05:09
klebervirgilio has joined #ruby-lang
05:09
seoaqua has quit [Quit: 离开]
05:09
gregmore_ has joined #ruby-lang
05:10
imajes has quit [Excess Flood]
05:11
imajes has joined #ruby-lang
05:11
Rarrikins_g has joined #ruby-lang
05:12
Rarrikins has quit [Ping timeout: 252 seconds]
05:13
cableray has joined #ruby-lang
05:13
sn0wb1rd has joined #ruby-lang
05:15
gregmore_ has quit [Remote host closed the connection]
05:15
gregmoreno has joined #ruby-lang
05:15
Rarrikins_g_u has joined #ruby-lang
05:16
Rarrikins_g has quit [Ping timeout: 252 seconds]
05:21
Rarrikins_g_u_l has joined #ruby-lang
05:22
Rarrikins_g_u has quit [Ping timeout: 240 seconds]
05:26
ryez has joined #ruby-lang
05:26
io_syl has quit [Quit: Computer has gone to sleep.]
05:28
karasawa has joined #ruby-lang
05:30
davidbalber|away is now known as davidbalbert
05:31
macmartine has quit [Quit: Computer has gone to sleep.]
05:35
ryanf has joined #ruby-lang
05:37
dankest is now known as dankest|away
05:38
rippa has joined #ruby-lang
05:38
dhruvasagar has joined #ruby-lang
05:40
breakingthings has quit []
05:42
seoaqua has joined #ruby-lang
05:42
dankest|away has quit [Quit: Leaving...]
05:43
blazes816 has quit [Quit: blazes816]
05:44
shtirlic has joined #ruby-lang
05:45
JohnBat26 has joined #ruby-lang
05:47
mistym has quit [Remote host closed the connection]
05:49
vlad_starkov has joined #ruby-lang
05:49
shtirlic has quit [Ping timeout: 255 seconds]
05:51
yxhuvud has joined #ruby-lang
05:51
vlad_starkov has quit [Remote host closed the connection]
05:53
yxhuvud2 has quit [Ping timeout: 252 seconds]
05:58
mjio has joined #ruby-lang
06:02
mjio has quit [Client Quit]
06:02
mpan has quit [Ping timeout: 244 seconds]
06:03
bluepojo has quit [Ping timeout: 240 seconds]
06:04
panpainter has quit [Quit: panpainter]
06:10
gnufied has joined #ruby-lang
06:11
kogent has quit [Quit: kogent]
06:13
dankest has joined #ruby-lang
06:21
ebouchut has joined #ruby-lang
06:21
<
manveru >
akahn: xi ~ % ruby -rabbrev -e 'p %w[foo bar foobar duh bee].abbrev'
06:21
<
manveru >
{"ba"=>"bar", "fooba"=>"foobar", "foob"=>"foobar", "foo"=>"foo", "du"=>"duh", "d"=>"duh", "be"=>"bee", "bar"=>"bar", "foobar"=>"foobar", "duh"=>"duh", "bee"=>"bee"}
06:22
kiddorails has joined #ruby-lang
06:23
kogent has joined #ruby-lang
06:27
decal has joined #ruby-lang
06:28
bosie has joined #ruby-lang
06:32
bosie has quit [Ping timeout: 246 seconds]
06:33
cableray has quit [Quit: cableray]
06:37
io_syl has joined #ruby-lang
06:38
ebouchut has quit [Quit: This computer has gone to sleep]
06:42
rippa has quit [Ping timeout: 260 seconds]
06:43
apeiros has quit [Remote host closed the connection]
06:43
apeiros_ has joined #ruby-lang
06:44
cableray has joined #ruby-lang
06:44
Rarrikins_g_u_l has quit [Ping timeout: 276 seconds]
06:47
Rarrikins has joined #ruby-lang
06:47
davidbalbert is now known as davidbalber|away
06:48
sspiff has quit [Remote host closed the connection]
06:50
Rarrikins_z has joined #ruby-lang
06:51
Rarrikins has quit [Ping timeout: 256 seconds]
06:51
yxhuvud2 has joined #ruby-lang
06:52
kith has quit [Read error: Connection reset by peer]
06:53
kith has joined #ruby-lang
06:54
yxhuvud has quit [Ping timeout: 255 seconds]
06:55
Rarrikins_z has quit [Ping timeout: 248 seconds]
06:55
Rarrikins has joined #ruby-lang
06:57
apeiros_ has quit [Remote host closed the connection]
06:57
wyhaines has joined #ruby-lang
06:59
rippa has joined #ruby-lang
07:02
Rarrikins has quit [Ping timeout: 244 seconds]
07:02
dhsmith has joined #ruby-lang
07:02
vlad_starkov has joined #ruby-lang
07:02
Rarrikins has joined #ruby-lang
07:05
Rarrikins_t has joined #ruby-lang
07:07
Rarrikins has quit [Ping timeout: 240 seconds]
07:07
vlad_starkov has quit [Ping timeout: 240 seconds]
07:09
seoaqua has quit [Quit: 离开]
07:10
Rarrikins_t has quit [Ping timeout: 256 seconds]
07:11
Rarrikins has joined #ruby-lang
07:13
TvL2386 has joined #ruby-lang
07:15
Rarrikins_z has joined #ruby-lang
07:16
Rarrikins has quit [Ping timeout: 260 seconds]
07:16
rippa has quit [Ping timeout: 260 seconds]
07:19
kiddorails1 has joined #ruby-lang
07:19
Rarrikins_z has quit [Ping timeout: 248 seconds]
07:20
drollwit has joined #ruby-lang
07:22
gregmoreno has quit [Remote host closed the connection]
07:22
kiddorails has quit [Ping timeout: 260 seconds]
07:34
KA_ has joined #ruby-lang
07:34
dr_bob has joined #ruby-lang
07:34
Rarrikins has joined #ruby-lang
07:35
gnufied has quit [Quit: Leaving.]
07:35
Rarrikins_f has joined #ruby-lang
07:39
Rarrikins has quit [Ping timeout: 252 seconds]
07:39
gnufied2 has joined #ruby-lang
07:39
Rarrikins_f_x has joined #ruby-lang
07:40
Rarrikins_f has quit [Ping timeout: 256 seconds]
07:40
workmad3 has joined #ruby-lang
07:43
Rarrikins_f_x_e has joined #ruby-lang
07:44
Mon_Ouie has joined #ruby-lang
07:44
Rarrikins_f_x has quit [Ping timeout: 252 seconds]
07:44
solars has quit [Ping timeout: 248 seconds]
07:46
drollwit has quit [Remote host closed the connection]
07:50
Rarrikins_f_x_e has quit [Ping timeout: 256 seconds]
07:51
Rarrikins has joined #ruby-lang
07:52
yxhuvud has joined #ruby-lang
07:53
serhart has quit [Quit: Leaving.]
07:53
tenderlove has quit [Remote host closed the connection]
07:54
Rarrikins_j has joined #ruby-lang
07:54
tenderlove has joined #ruby-lang
07:55
yxhuvud2 has quit [Ping timeout: 255 seconds]
07:55
Rarrikins has quit [Ping timeout: 252 seconds]
07:58
Rarrikins_j_x has joined #ruby-lang
07:58
tenderlove has quit [Ping timeout: 244 seconds]
07:58
solars has joined #ruby-lang
07:58
Rarrikins_j has quit [Ping timeout: 255 seconds]
08:02
facest has quit [Ping timeout: 260 seconds]
08:03
Rarrikins_j_x has quit [Ping timeout: 276 seconds]
08:04
Rarrikins has joined #ruby-lang
08:04
faces has joined #ruby-lang
08:05
cableray has quit [Quit: cableray]
08:08
Rarrikins has quit [Ping timeout: 260 seconds]
08:08
cableray has joined #ruby-lang
08:10
Rarrikins has joined #ruby-lang
08:11
apeiros_ has joined #ruby-lang
08:14
christeraustad has joined #ruby-lang
08:14
klebervirgilio has quit [Remote host closed the connection]
08:14
Rarrikins has quit [Ping timeout: 264 seconds]
08:14
Rarrikins_j has joined #ruby-lang
08:15
zmack has joined #ruby-lang
08:15
workmad3 has quit [Ping timeout: 252 seconds]
08:15
masterx has joined #ruby-lang
08:16
JohnBat26 has quit [Read error: No route to host]
08:16
swav_ has quit [Remote host closed the connection]
08:16
JohnBat26 has joined #ruby-lang
08:16
dankest has quit [Quit: Leaving...]
08:16
jxie has quit [Quit: leaving]
08:19
JohnBat26 has quit [Client Quit]
08:19
JohnBat26 has joined #ruby-lang
08:20
KA_ has quit [Quit: KA_]
08:21
Rarrikins_j_p has joined #ruby-lang
08:22
Rarrikins_j has quit [Ping timeout: 265 seconds]
08:22
stardiviner has joined #ruby-lang
08:24
tenderlove has joined #ruby-lang
08:25
dankest has joined #ruby-lang
08:25
Rarrikins_j_p_y has joined #ruby-lang
08:26
Rarrikins_j_p has quit [Ping timeout: 256 seconds]
08:27
andrewhl has quit [Remote host closed the connection]
08:29
<
yorickpeterse >
Morning
08:31
Rarrikins_j_p_y_ has joined #ruby-lang
08:31
Rarrikins_j_p_y has quit [Ping timeout: 255 seconds]
08:33
Weems has joined #ruby-lang
08:34
kiddorails1 has quit [Ping timeout: 276 seconds]
08:35
Rarrikins_j_p_y_ has quit [Ping timeout: 248 seconds]
08:35
cableray has quit [Quit: cableray]
08:36
Rarrikins_j_p_y_ has joined #ruby-lang
08:38
wyhaines has quit [Remote host closed the connection]
08:39
Rarrikins has joined #ruby-lang
08:40
Rarrikins_j_p_y_ has quit [Ping timeout: 252 seconds]
08:42
Rarrikins_w has joined #ruby-lang
08:43
xalei has joined #ruby-lang
08:43
Rarrikins has quit [Ping timeout: 265 seconds]
08:46
gnufied2 has quit [Quit: Leaving.]
08:47
Rarrikins_w has quit [Ping timeout: 276 seconds]
08:47
gnufied has joined #ruby-lang
08:47
swav has joined #ruby-lang
08:47
xalei has quit [Remote host closed the connection]
08:49
guns has quit [Ping timeout: 256 seconds]
08:49
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
08:52
yxhuvud2 has joined #ruby-lang
08:53
Rarrikins has joined #ruby-lang
08:54
yxhuvud has quit [Ping timeout: 260 seconds]
08:56
swav has quit [Remote host closed the connection]
08:57
cableray has joined #ruby-lang
08:57
Rarrikins has quit [Ping timeout: 265 seconds]
08:58
Rarrikins has joined #ruby-lang
08:59
blacktulip has joined #ruby-lang
09:00
masterx has left #ruby-lang [#ruby-lang]
09:01
Rarrikins_r has joined #ruby-lang
09:02
Rarrikins has quit [Ping timeout: 248 seconds]
09:03
flexd has quit [Ping timeout: 260 seconds]
09:04
ryanf has quit [Ping timeout: 264 seconds]
09:07
Rarrikins has joined #ruby-lang
09:08
Rarrikins_r has quit [Ping timeout: 260 seconds]
09:10
robotmay has joined #ruby-lang
09:12
megha has quit [Ping timeout: 264 seconds]
09:12
jashank has quit [Changing host]
09:12
jashank has joined #ruby-lang
09:12
flexd has joined #ruby-lang
09:13
Rarrikins has quit [Ping timeout: 276 seconds]
09:14
Rarrikins has joined #ruby-lang
09:17
Rarrikins_t has joined #ruby-lang
09:17
ghr has joined #ruby-lang
09:18
Rarrikins has quit [Ping timeout: 256 seconds]
09:19
<
yorickpeterse >
durrr Chronic
09:19
<
yorickpeterse >
Chronic.parse('01-09-2012').month # => 1
09:19
<
yorickpeterse >
y u use US format
09:20
Rarrikins_t_l has joined #ruby-lang
09:20
<
apeiros_ >
especially when recognizable as iso
09:20
<
apeiros_ >
authors region bias
09:21
shtirlic has joined #ruby-lang
09:22
Rarrikins_t has quit [Ping timeout: 276 seconds]
09:23
<
yorickpeterse >
lol ,in 0.9.0 it just returns `nil` for that date
09:23
<
yorickpeterse >
Time.strptime it is then
09:23
kiddorails has joined #ruby-lang
09:24
<
yorickpeterse >
durrr, Time.parse does get it right
09:24
Rarrikins has joined #ruby-lang
09:24
Rarrikins_t_l has quit [Ping timeout: 255 seconds]
09:25
<
apeiros_ >
oh wait, I was wrong, that's not ISO
09:25
<
apeiros_ >
ISO would be reversed
09:25
dankest has quit [Quit: Leaving...]
09:25
shtirlic has quit [Ping timeout: 248 seconds]
09:25
Guest9041 has quit [Remote host closed the connection]
09:26
<
yorickpeterse >
plot twist: that particular date format is part of some ISO standard
09:26
<
yorickpeterse >
Can't remember the exact code though
09:26
glebm has quit [Quit: Computer has gone to sleep.]
09:27
megha has joined #ruby-lang
09:29
vmoravec has quit [Ping timeout: 276 seconds]
09:29
Rarrikins has quit [Ping timeout: 276 seconds]
09:29
klebervirgilio has joined #ruby-lang
09:30
Rarrikins has joined #ruby-lang
09:30
kiddorails has quit [Ping timeout: 252 seconds]
09:32
swav has joined #ruby-lang
09:35
Rarrikins has quit [Ping timeout: 276 seconds]
09:35
marr has joined #ruby-lang
09:36
klebervirgilio has quit [Ping timeout: 240 seconds]
09:36
Rarrikins has joined #ruby-lang
09:37
Rarrikins_n has joined #ruby-lang
09:40
vmoravec has joined #ruby-lang
09:40
Rarrikins has quit [Ping timeout: 246 seconds]
09:40
barmston has joined #ruby-lang
09:41
Rarrikins_n has quit [Ping timeout: 240 seconds]
09:42
barmston has left #ruby-lang [#ruby-lang]
09:43
kiddorails has joined #ruby-lang
09:46
cableray has quit [Quit: cableray]
09:46
Rarrikins has joined #ruby-lang
09:48
barmston has joined #ruby-lang
09:51
Rarrikins has quit [Ping timeout: 265 seconds]
09:52
yxhuvud has joined #ruby-lang
09:54
yxhuvud2 has quit [Ping timeout: 265 seconds]
09:57
glebm has joined #ruby-lang
09:59
kiddorails1 has joined #ruby-lang
10:00
workmad3 has joined #ruby-lang
10:00
kiddorails has quit [Ping timeout: 252 seconds]
10:02
christeraustad_ has joined #ruby-lang
10:03
Rarrikins has joined #ruby-lang
10:05
christeraustad has quit [Ping timeout: 255 seconds]
10:06
<
reactormonk >
apeiros_, just use points instead of slashes, and it's non-america ;-)
10:06
Rarrikins_r has joined #ruby-lang
10:08
Rarrikins has quit [Ping timeout: 256 seconds]
10:08
rue|w has joined #ruby-lang
10:08
18VAANK2W has quit [Read error: Operation timed out]
10:11
Averna has quit [Quit: Leaving.]
10:12
francisfish has joined #ruby-lang
10:13
Rarrikins_r has quit [Ping timeout: 256 seconds]
10:14
jds_ has joined #ruby-lang
10:14
tbuehlmann has joined #ruby-lang
10:15
Rarrikins_h has joined #ruby-lang
10:15
nkr has joined #ruby-lang
10:15
fsvehla has quit [Quit: fsvehla]
10:17
ssspiff has joined #ruby-lang
10:17
ssspiff has quit [Changing host]
10:17
ssspiff has joined #ruby-lang
10:18
csgui has joined #ruby-lang
10:19
Rarrikins_h has quit [Ping timeout: 248 seconds]
10:21
Rarrikins has joined #ruby-lang
10:21
klebervirgilio has joined #ruby-lang
10:21
adambeynon has joined #ruby-lang
10:23
klebervirgilio has quit [Read error: Connection reset by peer]
10:25
csgui has quit [Quit: csgui]
10:26
Rarrikins has quit [Ping timeout: 276 seconds]
10:27
<
apeiros_ >
yorickpeterse: curious to know. it's not part of iso8601, which is
*the* date standard
10:29
<
yorickpeterse >
Correct, but I recall there being a different one describing it
10:29
<
yorickpeterse >
Also, what happened to Tk in stdlib?
10:29
<
yorickpeterse >
I can't seem to load it :<
10:29
bosie has joined #ruby-lang
10:29
klebervirgilio has joined #ruby-lang
10:30
<
yorickpeterse >
Ah, tk wasn't installed so it probably didn't compile with it
10:30
<
yorickpeterse >
hrmpf
10:30
<
yorickpeterse >
and qtbindings doesn't compile either, that only leaves me with the GTK libs
10:31
Rarrikins has joined #ruby-lang
10:32
dwu1 has quit [Quit: Leaving.]
10:33
blacktulip has quit [Remote host closed the connection]
10:33
bosie has quit [Ping timeout: 255 seconds]
10:33
blacktulip has joined #ruby-lang
10:34
atmosx has joined #ruby-lang
10:34
csgui has joined #ruby-lang
10:35
GarethAdams has joined #ruby-lang
10:40
wallerdev has quit [Quit: wallerdev]
10:40
<
manveru >
always use Time.strptime
10:42
charliesome_ has joined #ruby-lang
10:43
<
manveru >
also there is always ffi-tk
10:43
carloslopes has joined #ruby-lang
10:44
<
yorickpeterse >
My particular use case would be a campfire client. The only working one is "Pyfire" and it looks like an abortion
10:44
<
yorickpeterse >
it doesn't work very well either
10:45
<
yorickpeterse >
Problem: the GTK2 lib is meh (though it works), I couldn't get the GTK3 FFI binding to work and qtbindings doesn't compile
10:46
<
manveru >
ok, isn't campfire a web app?
10:46
<
yorickpeterse >
Yes, but the web UI is meh
10:46
<
chris2 >
arent there campfire <-> irc gateways?
10:46
<
manveru >
i thought 37signals never makes native clients
10:46
<
yorickpeterse >
chris2: that's what I use right now
10:46
klebervirgilio has quit [Remote host closed the connection]
10:46
<
yorickpeterse >
It's dodgy though
10:46
<
yorickpeterse >
It randomly breaks and results in messages being sent 20 times (to me)(
10:46
<
manveru >
except for mac maybe, they always get the shiny new stuff
10:47
<
injekt >
there's clients which embed a web view
10:47
<
injekt >
like propane and flint
10:47
<
yorickpeterse >
I went as far as looking into C++/Vala
10:47
<
yorickpeterse >
But the latter doesn't have anything related to HTTP requests as far as I can find
10:50
<
chris2 >
their api is pretty nuts too
10:50
<
chris2 >
uses polling...
10:50
<
yorickpeterse >
polling is webscale
10:52
yxhuvud2 has joined #ruby-lang
10:52
RubyHead has joined #ruby-lang
10:53
RubyHead has quit [Remote host closed the connection]
10:54
RubyHead has joined #ruby-lang
10:54
yxhuvud has quit [Ping timeout: 264 seconds]
10:54
ezkl has joined #ruby-lang
10:55
ezkl has quit [Changing host]
10:55
ezkl has joined #ruby-lang
10:57
zz_chrismcg is now known as chrismcg
10:57
cultureulterior_ has joined #ruby-lang
11:07
kgrz has joined #ruby-lang
11:18
barmston has quit [Ping timeout: 248 seconds]
11:22
justinseiter has quit [Ping timeout: 248 seconds]
11:24
rcvalle has joined #ruby-lang
11:26
ezkl has joined #ruby-lang
11:29
charliesome has quit [Disconnected by services]
11:29
charliesome_ is now known as charliesome
11:31
atmosx has quit [Quit: And so the story goes…]
11:31
barmston has joined #ruby-lang
11:34
bosie has joined #ruby-lang
11:35
<
yorickpeterse >
hahahaa, how to improve an APIs performance: remove a call to Draper
11:35
<
yorickpeterse >
and it goes from 2 seconds to around 800 ms
11:36
kiddorails1 has quit [Quit: Leaving.]
11:36
kiddorails has joined #ruby-lang
11:36
<
yorickpeterse >
Eh, 300 ms actually
11:36
<
yorickpeterse >
even better
11:37
barmston has quit [Ping timeout: 248 seconds]
11:42
zmack has quit [Remote host closed the connection]
11:44
pbjorklu1d has quit [Ping timeout: 255 seconds]
11:44
zmack has joined #ruby-lang
11:45
kiddorails has quit [Ping timeout: 260 seconds]
11:48
pbjorklund has joined #ruby-lang
11:51
gareth_ has joined #ruby-lang
11:51
gareth_ has quit [Client Quit]
11:52
yxhuvud has joined #ruby-lang
11:53
itsmeduncan has joined #ruby-lang
11:54
yxhuvud2 has quit [Ping timeout: 264 seconds]
11:57
m3nd3s has joined #ruby-lang
11:58
leopard_me has joined #ruby-lang
11:58
shtirlic has joined #ruby-lang
12:02
kiddorails has joined #ruby-lang
12:06
kgrz has quit [Quit: Computer has gone to sleep.]
12:07
krzkrz has quit [Quit: Leaving]
12:08
pbjorklund has quit [Ping timeout: 276 seconds]
12:08
kiddorails has quit [Read error: Connection reset by peer]
12:08
kiddorails1 has joined #ruby-lang
12:10
sabfer has joined #ruby-lang
12:10
shtirlic has quit [Read error: Connection reset by peer]
12:10
pbjorklund has joined #ruby-lang
12:10
shtirlic has joined #ruby-lang
12:10
ryez_ has joined #ruby-lang
12:10
<
injekt >
yorickpeterse: wow wtf seriously?
12:11
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
12:14
kiddorails has joined #ruby-lang
12:15
diegoviola has joined #ruby-lang
12:16
robbyoconnor has quit [Read error: Connection reset by peer]
12:16
kiddorails1 has quit [Ping timeout: 244 seconds]
12:17
itsmeduncan has quit [Quit: itsmeduncan]
12:17
jonahR has joined #ruby-lang
12:19
madish has joined #ruby-lang
12:21
<
RubyHead >
2s to 300ms? that's incredible.
12:21
<
injekt >
yeah that cant be just because of draper
12:22
<
yorickpeterse >
before: EntryDecorator.decorate(entries.where(...)), after: entries.where()
12:22
<
yorickpeterse >
that really is the only difference
12:23
jonahR has quit [Quit: jonahR]
12:24
<
injekt >
yorickpeterse: file a bug
12:24
<
injekt >
that's retarded in so many ways
12:25
<
yorickpeterse >
I don't care enough about Draper to spend 2 hours debugging the cause
12:25
<
yorickpeterse >
I think the whole implementation of Draper (and decorators in general) is retarded
12:25
<
rue|w >
You’re a bad person
12:25
<
injekt >
you open a bug so you dont have to debug it :)
12:26
<
yorickpeterse >
I don't like opening bugs without at least having looked at what's going on. Might as well open one with the text "I use the Lunix, it doesn't work."
12:26
<
injekt >
why would you use draper in an api anyway? am i missing something?
12:26
<
yorickpeterse >
I didn't chose it
12:26
<
yorickpeterse >
* choose
12:27
<
yorickpeterse >
It's used to extract specific attributes from a model and display them as JSON (mainly)
12:27
<
injekt >
no im just curious as to why anyone would, assuming an api is just doing serialized stuff
12:27
<
yorickpeterse >
Personally I'd just define SomeModel#public_attributes or something like that but apparently that is a bad thing these days
12:28
<
diegoviola >
i'm pulling files via http and storing them in my local fs, i'd like to have a separate script watch the dir and find out when new files are dled/craeted, do i need inotify for this?
12:28
<
yorickpeterse >
diegoviola: If you want it to be reliable and fast, yes
12:28
serhart has joined #ruby-lang
12:29
<
diegoviola >
yeah i'll go with inotify
12:29
<
injekt >
yorickpeterse: what about something like rabl?
12:29
<
yorickpeterse >
Never used it
12:29
<
yorickpeterse >
I found one file for it but haven't looked at it any further
12:29
<
injekt >
heh, i dont really like using views for apis but meh
12:29
<
diegoviola >
but is there a way to do this with ruby? without touching inotify?
12:29
<
diegoviola >
just curious
12:29
<
injekt >
diegoviola: yes
12:30
<
yorickpeterse >
diegoviola: polling
12:30
<
diegoviola >
how please?
12:30
<
yorickpeterse >
injekt: Hm, rabl doesn't look that weird
12:31
<
injekt >
yorickpeterse: yeah it's ok, i just dont like using views for apis is all
12:31
<
injekt >
yorickpeterse: I have written an api with it though, and it was nice
12:31
<
yorickpeterse >
Not sure if I'd ever use it though, I'd like to keep the overhead of APIs as small as possible
12:31
<
yorickpeterse >
and you can't exactly beat the speed of {...}.to_json
12:32
<
injekt >
I have an API I built in sinatra serving around 3 million hits a day returning json, and it's had almost 9 months full uptime
12:32
<
injekt >
i dont maintain it anymore though
12:32
kiddorails has quit [Ping timeout: 244 seconds]
12:33
<
yorickpeterse >
heh
12:34
<
injekt >
moved away from ruby for the new work api
12:38
christeraustad_ has quit [Quit: christeraustad_]
12:39
sepp2k has joined #ruby-lang
12:43
scottschecter has quit [Quit: WeeChat 0.3.9.2]
12:44
csgui has quit [Quit: csgui]
12:44
kurko__ has joined #ruby-lang
12:46
scottschecter has joined #ruby-lang
12:47
rsl has joined #ruby-lang
12:48
kiddorails has joined #ruby-lang
12:50
srbaker has joined #ruby-lang
12:52
yxhuvud2 has joined #ruby-lang
12:52
kiddorails has quit [Ping timeout: 265 seconds]
12:55
yxhuvud has quit [Ping timeout: 256 seconds]
12:57
glebm has quit [Quit: Computer has gone to sleep.]
12:58
glebm has joined #ruby-lang
13:00
bosie has quit [Ping timeout: 248 seconds]
13:03
imperator has joined #ruby-lang
13:06
kgrz has joined #ruby-lang
13:06
vlad_starkov has joined #ruby-lang
13:06
bosie has joined #ruby-lang
13:08
Nisstyre has quit [Ping timeout: 246 seconds]
13:10
yalue has joined #ruby-lang
13:14
csgui has joined #ruby-lang
13:15
RWN has joined #ruby-lang
13:15
cored has joined #ruby-lang
13:15
cored has quit [Changing host]
13:15
cored has joined #ruby-lang
13:17
ryez_ has quit [Quit: Page closed]
13:19
x0F has quit [Disconnected by services]
13:19
x0F_ has joined #ruby-lang
13:19
x0F_ is now known as x0F
13:22
Nisstyre has joined #ruby-lang
13:25
sailias has quit [Ping timeout: 248 seconds]
13:26
MaddinXx_ has joined #ruby-lang
13:29
wyhaines has joined #ruby-lang
13:30
judofyr has joined #ruby-lang
13:30
wyhaines has quit [Remote host closed the connection]
13:30
nyuszika7h has quit [Quit: Reconnecting]
13:30
<
judofyr >
HEY FOLKS
13:30
<
judofyr >
HOW ARE WE TODAY?
13:30
<
matti >
WE ARE FINE.
13:30
<
matti >
HOW ARE YOU?
13:31
<
judofyr >
I'M DOING FINE
13:31
<
matti >
AMAING. GOOD TO KNOW.
13:32
nyuszika7h has joined #ruby-lang
13:32
nyuszika7h has quit [Client Quit]
13:32
<
rue|w >
SPEAK UP, SONNY
13:32
<
matti >
Now, the social protol states that we should invite you to join use for a cup of tea and biscuits.
13:32
* matti
invites judofyr for tea and snacks.
13:32
nyuszika7h has joined #ruby-lang
13:32
* yorickpeterse
was about to make tea
13:32
<
judofyr >
oooo, tea!
13:32
<
matti >
yalue: Good, I will bring biscuits.
13:32
<
matti >
yorickpeterse:
13:33
<
imperator >
where are the crumpets?
13:33
<
matti >
We can all seat and have a chat about life, universe and everything.
13:33
cjs226 has joined #ruby-lang
13:33
<
matti >
And watch vides of funny cats on YouTube.
13:33
<
injekt >
hey i make the best tea around here
13:34
* rue|w
brings American biscuits
13:34
* matti
will bring English digestives.
13:34
<
imperator >
random question, any other netrunner fans here?
13:35
<
matti >
Random answer: no idea :)
13:38
<
yorickpeterse >
Ok, here's a thought I just had: Ruby devs spend more time tweaking the GC instead of writing performant code. DISCUSS!
13:38
<
yorickpeterse >
well, maybe I should say rails devs
13:38
<
matti >
yorickpeterse: I am yet to see Ruby developer who tweaks GC.
13:38
<
yorickpeterse >
I currently have a API call that takes 12 seconds due to the lovely 1+N problem
13:39
<
matti >
yorickpeterse: Most of them, especially form the Rails shop, have no idea how computer works ;]
13:39
<
matti >
yorickpeterse: Yet fiddle with GC.
13:39
<
yorickpeterse >
For every row it slaps Mongo in the face with a Diesel query, twice
13:39
<
yorickpeterse >
it does that around 800 times
13:39
banisterfiend has joined #ruby-lang
13:39
<
matti >
yorickpeterse: Fix it!
13:40
<
matti >
yorickpeterse: ;D
13:40
<
gnufied >
tenderlove: ping?
13:40
<
yorickpeterse >
matti: I am
13:40
<
matti >
yorickpeterse: Try harder!
13:40
<
yorickpeterse >
Though I'm not sure how to tackle the Mongo/Diesel problem since I'm not very familiar with it (yet)
13:41
<
matti >
yorickpeterse: Excues, excuses...
13:41
serhart has quit [Quit: Leaving.]
13:43
mistym has joined #ruby-lang
13:43
mistym has quit [Changing host]
13:43
mistym has joined #ruby-lang
13:45
gustavnils has joined #ruby-lang
13:47
mistym has quit [Remote host closed the connection]
13:48
<
ericwood >
zenspider: whoa, just stumbled across Wilson on github
13:48
<
ericwood >
you're evil
13:48
<
ericwood >
apparently it's 4 years old, but just made it to hacker news this morning
13:48
<
judofyr >
ericwood: it's pretty awesome
13:48
<
ericwood >
I need this in my rails apps, should speed things up a bit
13:48
rippa has joined #ruby-lang
13:49
<
judofyr >
ericwood: ehm…… :P
13:49
<
ericwood >
although I'm doing JRuby, so I need a version that does straight up JVM bytecode
13:49
<
judofyr >
ericwood: ByteScript
13:50
<
ericwood >
BiteScript?
13:50
<
ericwood >
oh goodness
13:50
<
ericwood >
that's pretty awesome, actually
13:50
<
ericwood >
JVM bytecode is pretty straightforward
13:50
<
judofyr >
ah, yes, bitescript
13:51
xalei has joined #ruby-lang
13:51
<
ericwood >
for school at one point I had to write a haskell program that read in JVM bytecode and spit out modified code which printed stuff whenever functions were called
13:51
<
ericwood >
needless to say, doing bit operations in Haskell and converting between types is a nightmare...
13:52
<
ericwood >
would've been easy in C :P
13:52
yxhuvud has joined #ruby-lang
13:52
<
judofyr >
I know pretty much nothing about the JVM bytecode :)
13:54
leopard_me has quit [Quit: Computer has gone to sleep.]
13:55
<
ericwood >
judofyr: probably for the best
13:55
yxhuvud2 has quit [Ping timeout: 265 seconds]
13:56
<
judofyr >
ericwood: but I would imagine that Haskell would handle the modifications of the instructions themselves pretty good? with ADT and pattern matching?
13:57
vlad_starkov has quit [Read error: Connection reset by peer]
13:57
<
ericwood >
judofyr: most likely; I was short on time so I did a pretty hack job of it...the actual reading of the bytecode and converting it to useable data was really tricky
13:58
<
ericwood >
Haskell and IO are like oil and water :P
13:58
<
ericwood >
Speaking of haskell and ruby, apparently you can do _ for "don't care" things
13:59
<
injekt >
zzak: lol did you see nobus reply regarding irb history?
13:59
vlad_starkov has joined #ruby-lang
14:02
<
judofyr >
dude, we need documentation for IRB. or at least .irbrc
14:03
<
yorickpeterse >
And not have people change its default behaviour without proper notice
14:04
<
ericwood >
there's practically nothing out there on .irbrc stuff
14:04
<
injekt >
well technically yhere is
14:04
<
injekt >
all the IRC.conf stuff is documented in lib/irc.rb
14:06
breakingthings has joined #ruby-lang
14:07
scottschecter has quit [Quit: WeeChat 0.3.9.2]
14:07
sailias has joined #ruby-lang
14:09
scottschecter has joined #ruby-lang
14:10
serhart has joined #ruby-lang
14:14
mistym has joined #ruby-lang
14:18
nignaztic has quit [Read error: Connection reset by peer]
14:19
postmodern has quit [Quit: Leaving]
14:19
<
injekt >
little people know you can invoke new sessions with the context of other objects
14:19
<
injekt >
`irb "foo"; reverse #=> "oof"`
14:20
<
banisterfiend >
injekt: doesnt work on immediates though for some reason
14:20
<
injekt >
banisterfiend: on immediates?
14:20
<
banisterfiend >
injekt: irb 5
14:20
<
banisterfiend >
or irb :hello
14:20
dustint has joined #ruby-lang
14:21
<
ericwood >
is there a REPL bot in here like there is in #ruby?
14:21
<
ericwood >
>> puts "hello"
14:21
<
injekt >
ericwood: no
14:21
<
injekt >
because people would spam the crap out of the channel with it
14:21
<
banisterfiend >
ericwood: #ruby-lang is a pretty conservative channel ;)
14:21
<
ericwood >
idk, #ruby is more mainstream I think and they don't have a problem with it
14:21
nazty has joined #ruby-lang
14:22
<
injekt >
more mainstream?
14:22
<
lianj >
== more drama?
14:22
<
judofyr >
injekt: they would?
14:23
<
injekt >
judofyr: i dunno, but it's a possibility
14:23
<
judofyr >
maybe I should join #ruby for a few days
14:23
<
judofyr >
see how it is on the "other side"
14:23
<
injekt >
zenspider said he wouldn't have one anyway
14:23
<
ericwood >
they're well-behaved I think
14:24
nazty has joined #ruby-lang
14:24
<
lianj >
eval.in and ideone.com are great for pasting and running ruby code
14:24
kurko__ is now known as kurko_
14:25
<
lianj >
although they all fail at require and IO, like most irc repls, so they become less useful for most pastes
14:29
<
dominikh >
injekt: why am I not surprised
14:29
<
injekt >
about what?
14:30
mistym_ has joined #ruby-lang
14:30
<
dominikh >
that ill-chosen method name :P
14:30
mistym has quit [Read error: Connection reset by peer]
14:32
TvL2386 has quit [Quit: Ex-Chat]
14:33
hugobastien has joined #ruby-lang
14:36
vlad_starkov has quit [Remote host closed the connection]
14:39
vlad_starkov has joined #ruby-lang
14:41
lordnaz has joined #ruby-lang
14:44
anannie has joined #ruby-lang
14:50
kiddorails has joined #ruby-lang
14:50
srbaker has quit [Quit: Computer has gone to sleep.]
14:51
glebm has quit [Quit: Computer has gone to sleep.]
14:52
mistym_ has quit [Remote host closed the connection]
14:52
yxhuvud2 has joined #ruby-lang
14:54
ryanv-raptor has joined #ruby-lang
14:54
rsl has joined #ruby-lang
14:55
yxhuvud has quit [Ping timeout: 265 seconds]
14:56
jondot` has joined #ruby-lang
14:58
Uranio has joined #ruby-lang
15:00
leopard_me has joined #ruby-lang
15:02
srbaker has joined #ruby-lang
15:05
RubyHead has quit [Remote host closed the connection]
15:06
rsl has joined #ruby-lang
15:07
imajes has quit [Excess Flood]
15:07
atmosx has joined #ruby-lang
15:09
imajes has joined #ruby-lang
15:09
mistym has joined #ruby-lang
15:10
glebm has joined #ruby-lang
15:11
rins has joined #ruby-lang
15:17
yalue has quit [Quit: Leaving]
15:21
RubyHead has joined #ruby-lang
15:21
glebm has quit [Ping timeout: 248 seconds]
15:21
RubyHead has quit [Remote host closed the connection]
15:21
RubyHead has joined #ruby-lang
15:22
xalei has quit [Remote host closed the connection]
15:23
davidbalber|away is now known as davidbalbert
15:24
MaddinXx_ has quit [Remote host closed the connection]
15:24
glebm has joined #ruby-lang
15:25
wyhaines has joined #ruby-lang
15:25
jds__ has joined #ruby-lang
15:27
methods has joined #ruby-lang
15:28
jds_ has quit [Ping timeout: 244 seconds]
15:29
methods has left #ruby-lang [#ruby-lang]
15:30
kiddorails1 has joined #ruby-lang
15:31
<
banisterfiend >
chris2: ping
15:31
kiddorails has quit [Ping timeout: 240 seconds]
15:32
<
banisterfiend >
or anyone who knows about bacon
15:32
<
banisterfiend >
how do i assert on an exception error message?
15:32
<
banisterfiend >
lamba { blah }.should.raise_with_message =~ / / ??
15:34
<
banisterfiend >
should.raise(IndexError).message.should.match(/out of array/)
15:34
<
banisterfiend >
oh found it: ^
15:34
KA_ has joined #ruby-lang
15:34
<
banisterfiend >
that's pretty slick
15:37
kiddorails1 has quit [Ping timeout: 248 seconds]
15:37
christeraustad has joined #ruby-lang
15:38
Banistergalaxy has quit [Ping timeout: 252 seconds]
15:38
gnufied has quit [Quit: Leaving.]
15:39
Banistergalaxy has joined #ruby-lang
15:42
imperator has quit [Quit: This computer has gone to sleep]
15:42
davidbalbert is now known as davidbalber|away
15:44
davidbalber|away is now known as davidbalbert
15:46
robbyoconnor has joined #ruby-lang
15:47
Uranio has quit [Quit: WeeChat 0.3.8]
15:48
methods has joined #ruby-lang
15:48
megha is now known as firewall
15:49
rue|w has quit [Remote host closed the connection]
15:52
imajes has quit [Excess Flood]
15:52
stevechiagozie has joined #ruby-lang
15:53
yxhuvud has joined #ruby-lang
15:53
Uranio has joined #ruby-lang
15:53
imajes has joined #ruby-lang
15:54
yxhuvud2 has quit [Ping timeout: 240 seconds]
15:55
imajes has quit [Excess Flood]
15:57
imajes has joined #ruby-lang
15:58
imperator has joined #ruby-lang
15:59
judofyr has quit [Remote host closed the connection]
15:59
judofyr has joined #ruby-lang
16:00
methods has left #ruby-lang [#ruby-lang]
16:01
leopard_me has quit [Quit: Computer has gone to sleep.]
16:02
apeiros_ has quit [Remote host closed the connection]
16:04
judofyr has quit [Ping timeout: 264 seconds]
16:05
MaddinXx has joined #ruby-lang
16:08
jondot` has quit [Ping timeout: 276 seconds]
16:09
leopard_me has joined #ruby-lang
16:09
zhul_mechanos has joined #ruby-lang
16:11
bosie has quit [Ping timeout: 252 seconds]
16:11
imajes has quit [Excess Flood]
16:13
imajes has joined #ruby-lang
16:14
neocoin has quit [Remote host closed the connection]
16:14
neocoin has joined #ruby-lang
16:15
bosie has joined #ruby-lang
16:15
bobkauffman has joined #ruby-lang
16:19
GrahamThorsen has joined #ruby-lang
16:21
GrahamThorsen has left #ruby-lang [#ruby-lang]
16:21
_knitetemplar has joined #ruby-lang
16:23
banisterfiend has quit [Remote host closed the connection]
16:24
davidbalbert is now known as davidbalber|away
16:24
larrylv has joined #ruby-lang
16:25
davidbalber|away is now known as davidbalbert
16:27
Stormpath has joined #ruby-lang
16:27
larrylv has quit [Remote host closed the connection]
16:27
srbaker has quit [Quit: Computer has gone to sleep.]
16:28
jxie has joined #ruby-lang
16:28
larrylv has joined #ruby-lang
16:30
anannie has quit [Remote host closed the connection]
16:30
zmack has quit [Remote host closed the connection]
16:32
srbaker has joined #ruby-lang
16:32
stevechiagozie has quit [Quit: Computer has gone to sleep.]
16:35
alvaro_o has joined #ruby-lang
16:35
jtoy has joined #ruby-lang
16:35
gnufied has joined #ruby-lang
16:37
leopard_me has quit [Quit: Computer has gone to sleep.]
16:38
m3nd3s has quit [Remote host closed the connection]
16:39
havenn has joined #ruby-lang
16:43
leopard_me has joined #ruby-lang
16:44
kgrz has quit [Quit: Computer has gone to sleep.]
16:47
blazes816 has joined #ruby-lang
16:51
<
zzak >
injekt: different nobu, but yah. i was about to reply
16:51
apeiros_ has joined #ruby-lang
16:51
<
zzak >
theres a bunch of new docs for IRB in 2.0
16:52
<
zzak >
i need to add this stuff about completion and history tho
16:53
yxhuvud2 has joined #ruby-lang
16:54
<
injekt >
zzak: ah ok
16:54
karasawa has quit [Ping timeout: 248 seconds]
16:55
yxhuvud has quit [Ping timeout: 246 seconds]
16:57
tbuehlmann has quit [Remote host closed the connection]
16:58
diegoviola has quit [Ping timeout: 244 seconds]
16:58
solars has quit [Ping timeout: 252 seconds]
17:02
gaveen has joined #ruby-lang
17:02
gaveen has quit [Changing host]
17:02
gaveen has joined #ruby-lang
17:02
<
chris2 >
Banistergalaxy: pong
17:02
gregmoreno has joined #ruby-lang
17:07
ilyam has joined #ruby-lang
17:07
GarethAdams has quit [Quit: Leaving...]
17:07
m3nd3s has joined #ruby-lang
17:07
outoftime has joined #ruby-lang
17:10
Uranio has quit [Quit: WeeChat 0.4.0-rc2]
17:11
davidbalbert is now known as davidbalber|away
17:13
Uranio has joined #ruby-lang
17:14
brianpWins has joined #ruby-lang
17:14
chrismcg is now known as zz_chrismcg
17:14
sn0wb1rd has quit [Quit: sn0wb1rd]
17:16
Rarrikins has quit [Ping timeout: 260 seconds]
17:17
bobkauffman has quit [Ping timeout: 248 seconds]
17:17
retro|cz has quit [Ping timeout: 248 seconds]
17:19
apeiros_ has quit [Remote host closed the connection]
17:21
bfreeman has quit [Quit: bfreeman]
17:22
andrewhl has joined #ruby-lang
17:23
davidbalber|away is now known as davidbalbert
17:25
jtoy has quit [Quit: jtoy]
17:25
shtirlic has quit [Remote host closed the connection]
17:26
tenderlove has quit [Remote host closed the connection]
17:26
tenderlove has joined #ruby-lang
17:29
Mon_Ouie has quit [Ping timeout: 248 seconds]
17:34
ilyam has quit [Quit: ilyam]
17:36
dr_bob has left #ruby-lang [#ruby-lang]
17:36
imperator has quit [Ping timeout: 252 seconds]
17:37
ghr has quit [Quit: ghr]
17:38
bosie has quit [Ping timeout: 264 seconds]
17:38
__butch__ has joined #ruby-lang
17:41
breakingthings has quit []
17:47
vlad_starkov has quit [Remote host closed the connection]
17:49
imperator has joined #ruby-lang
17:50
__butch__ has quit [Quit: Leaving.]
17:51
runeb has joined #ruby-lang
17:53
yxhuvud has joined #ruby-lang
17:53
__butch__ has joined #ruby-lang
17:54
bosie has joined #ruby-lang
17:54
nazty has quit [Quit: plz die k thx]
17:54
lordnaz has quit [Remote host closed the connection]
17:55
yxhuvud2 has quit [Ping timeout: 264 seconds]
17:55
runeb has quit [Ping timeout: 255 seconds]
17:59
cultureulterior_ has quit [Quit: cultureulterior_]
17:59
jondot` has joined #ruby-lang
18:00
yfeldblum has quit [Ping timeout: 248 seconds]
18:00
stardiviner has joined #ruby-lang
18:01
cultureulterior_ has joined #ruby-lang
18:05
bobkauffman has joined #ruby-lang
18:05
swav has quit [Remote host closed the connection]
18:07
swav has joined #ruby-lang
18:07
workmad3 has quit [Ping timeout: 256 seconds]
18:07
justinram has joined #ruby-lang
18:08
sn0wb1rd has joined #ruby-lang
18:08
KA_ has quit [Quit: KA_]
18:11
atmosx has quit [Quit: And so the story goes…]
18:13
atmosx has joined #ruby-lang
18:13
mrsolo has joined #ruby-lang
18:14
stevechiagozie has joined #ruby-lang
18:14
wallerdev has joined #ruby-lang
18:18
cultureulterior_ has quit [Quit: cultureulterior_]
18:18
swav has quit [Remote host closed the connection]
18:19
adambeynon has quit [Quit: Computer has gone to sleep.]
18:19
jtoy has joined #ruby-lang
18:20
ilyam has joined #ruby-lang
18:24
s1n4 has joined #ruby-lang
18:24
sabfer has quit [Quit: sabfer]
18:25
imperator has quit [Quit: Leaving]
18:25
gnufied has quit [Quit: Leaving.]
18:29
apeiros_ has joined #ruby-lang
18:29
kiddorails has joined #ruby-lang
18:30
hahuang65_ has joined #ruby-lang
18:32
gearaholic has joined #ruby-lang
18:32
imperator has joined #ruby-lang
18:33
davidbalbert is now known as davidbalber|away
18:34
apeiros_ has quit [Ping timeout: 264 seconds]
18:37
neocoin has quit [Remote host closed the connection]
18:37
larrylv has quit [Read error: Connection reset by peer]
18:38
bfreeman has joined #ruby-lang
18:40
mrsolo has quit [Quit: Leaving]
18:40
srbaker has quit [Ping timeout: 252 seconds]
18:40
outoftime has quit [Quit: Leaving]
18:42
Banistergalaxy has quit [Ping timeout: 252 seconds]
18:43
vlad_starkov has joined #ruby-lang
18:43
Banistergalaxy has joined #ruby-lang
18:43
davidbalber|away is now known as davidbalbert
18:45
<
andrewvos >
Why are people whining about that order dependent method in minitest only now? It has been there a while!
18:47
banisterfiend has joined #ruby-lang
18:53
yxhuvud2 has joined #ruby-lang
18:53
vlad_starkov has quit [Remote host closed the connection]
18:55
srbaker has joined #ruby-lang
18:55
yxhuvud has quit [Ping timeout: 276 seconds]
18:55
<
injekt >
who's whining?
18:58
Uranio has quit [Quit: while you reading this, a kitty dies]
18:59
shtirlic has joined #ruby-lang
19:00
cultureulterior_ has joined #ruby-lang
19:00
stonerfish has joined #ruby-lang
19:01
csgui has quit [Quit: csgui]
19:02
christeraustad has quit [Quit: christeraustad]
19:02
Mon_Ouie has joined #ruby-lang
19:02
jbsan_ has joined #ruby-lang
19:03
jbsan has quit [Ping timeout: 246 seconds]
19:03
jbsan_ is now known as jbsan
19:05
bosie has quit [Quit: leaving]
19:06
cultureulterior_ has quit [Quit: cultureulterior_]
19:11
bluepojo has joined #ruby-lang
19:13
Froedy has joined #ruby-lang
19:15
Froedy has left #ruby-lang [#ruby-lang]
19:15
sandbags has joined #ruby-lang
19:16
breakingthings has joined #ruby-lang
19:20
marr has quit [Ping timeout: 276 seconds]
19:24
vlad_starkov has joined #ruby-lang
19:24
jonahR has joined #ruby-lang
19:31
christeraustad has joined #ruby-lang
19:33
jtoy has quit [Quit: jtoy]
19:33
vlad_starkov has quit [Ping timeout: 248 seconds]
19:35
bobkauffman has quit [Ping timeout: 244 seconds]
19:38
vlad_starkov has joined #ruby-lang
19:38
KA_ has joined #ruby-lang
19:44
mrsolo has joined #ruby-lang
19:46
rolfb has joined #ruby-lang
19:47
<
andrewvos >
injekt: Just noticed on twitter
19:51
yfeldblum has joined #ruby-lang
19:52
wyhaines has quit [Ping timeout: 252 seconds]
19:53
yxhuvud has joined #ruby-lang
19:54
banisterfiend has quit [Remote host closed the connection]
19:55
yxhuvud2 has quit [Ping timeout: 276 seconds]
19:56
vlad_starkov has quit [Remote host closed the connection]
19:57
bobkauffman has joined #ruby-lang
19:59
wyhaines has joined #ruby-lang
19:59
jonahR has quit [Quit: jonahR]
20:01
jonahR has joined #ruby-lang
20:02
jonahR has quit [Client Quit]
20:02
apeiros_ has joined #ruby-lang
20:02
nazty has joined #ruby-lang
20:03
rippa has quit [Ping timeout: 260 seconds]
20:04
blacktulip has quit [Remote host closed the connection]
20:04
blacktulip has joined #ruby-lang
20:09
Stormpath has quit [Quit: Stormpath]
20:12
matled has joined #ruby-lang
20:12
bobkauffman has quit [Quit: Leaving]
20:13
wallerdev has quit [Quit: wallerdev]
20:13
wallerdev has joined #ruby-lang
20:15
jonahR has joined #ruby-lang
20:17
vlad_starkov has joined #ruby-lang
20:19
tenderlove has quit [Remote host closed the connection]
20:21
apeiros_ has quit [Remote host closed the connection]
20:21
postmodern has joined #ruby-lang
20:24
ebouchut has joined #ruby-lang
20:26
justinseiter has joined #ruby-lang
20:28
Rarrikins has joined #ruby-lang
20:31
workmad3 has joined #ruby-lang
20:36
apeiros_ has joined #ruby-lang
20:38
toertore has quit [Quit: Leaving]
20:39
gearaholic has quit [Remote host closed the connection]
20:40
m3nd3s has quit [Remote host closed the connection]
20:41
<
rking >
What's the nice way to say something like: h = {x:1,y:2}; h2 = h.dup; h2.delete :x; h2
20:43
carloslopes has quit [Remote host closed the connection]
20:43
<
ryanv-raptor >
h2 = h[:y]
20:43
<
ryanv-raptor >
or perhaps i'm missing the point
20:43
<
ryanv-raptor >
(no pun intended)
20:44
<
rking >
h = {x:1, …}
20:44
jtoy has joined #ruby-lang
20:44
<
ryanv-raptor >
ah, didn't think it would be /that/ easy
20:45
<
rking >
What I want is the opposite of .merge
20:45
<
ryanv-raptor >
well, you could simplify it a little
20:45
<
ryanv-raptor >
h2 = h.dup().delete(:x)
20:45
<
ryanv-raptor >
maybe?
20:45
<
ryanv-raptor >
it's still not all functional and pretty though
20:45
<
rking >
That returns the thing deleted.
20:46
<
rking >
Which is often handy, but not this time.
20:46
<
ryanv-raptor >
oh damn
20:46
apeiros_ has quit [Remote host closed the connection]
20:46
<
rking >
h = {x:1,y:2}; h.dup.tap{|h|h.delete :x} # also works, but I'm not sure if it's even an improvement.
20:50
<
ryanv-raptor >
h2 = h.reject {|k,v| k == :x}
20:50
<
ryanv-raptor >
maybe
20:51
<
ryanv-raptor >
unfortunately the more descriptive "keep_if" only operates on the hash itself
20:51
macmartine has joined #ruby-lang
20:52
wyhaines has quit [Remote host closed the connection]
20:53
marr has joined #ruby-lang
20:53
wyhaines has joined #ruby-lang
20:53
yxhuvud2 has joined #ruby-lang
20:53
marr has quit [Client Quit]
20:54
swav has joined #ruby-lang
20:55
yxhuvud has quit [Ping timeout: 248 seconds]
20:55
rolfb has quit [Quit: Leaving...]
20:57
cableray has joined #ruby-lang
20:58
Stormpath has joined #ruby-lang
21:00
<
rking >
ryanv-raptor: Ahh, yep. #reject is better.
21:01
kiddorails1 has joined #ruby-lang
21:02
christeraustad has quit [Read error: Operation timed out]
21:02
christeraustad has joined #ruby-lang
21:03
kiddorails has quit [Ping timeout: 260 seconds]
21:04
ilyam_ has joined #ruby-lang
21:07
cirenyc has joined #ruby-lang
21:07
ilyam has quit [Ping timeout: 276 seconds]
21:07
ilyam_ is now known as ilyam
21:08
wallerdev has quit [Quit: wallerdev]
21:09
rolfb has joined #ruby-lang
21:10
<
cirenyc >
If I have to dates, say "today" and "yesterday", what is the best way to create a new date range or start/end dates that include both?
21:10
<
cirenyc >
Take the 4 dates as an array, sort, then take the first/last value?
21:11
<
rking >
cirenyc: That sounds like a not-bad way to do it.
21:11
wallerdev has joined #ruby-lang
21:11
firewall has quit [Ping timeout: 248 seconds]
21:11
ebouchut has quit [Quit: This computer has gone to sleep]
21:12
<
cirenyc >
rking: Okay, thanks. I am thinking about avoiding multiple API calls for "today" and "yesterday" data sets.
21:12
<
cirenyc >
Hoping to say "give me everything that falls into either date range, then handling sorting them on my own.
21:13
sepp2k has quit [Ping timeout: 248 seconds]
21:13
sepp2k1 has joined #ruby-lang
21:13
<
rking >
dates = [ Date.today, Date.today-3, Date.today+2 ]; Range.new *dates.sort.values_at(1, -1)
21:15
<
rking >
cirenyc: You could define a method like class Array; def range_of_extremes; Range.new *sort.values_at(1, -1) end end
21:18
<
rking >
Range.new *dates.minmax
21:19
<
manveru >
defining methods for something that simple...
21:19
<
manveru >
minmax is nicer :)
21:19
<
rking >
I much prefer it to the "bag of snippets" approach.
21:19
<
rking >
That's the Perl way, what with the snippets.
21:19
<
cirenyc >
yeah, forgot about minmax
21:20
<
manveru >
defining methods everywhere is asking for trouble
21:20
<
rking >
What trouble, exactly?
21:20
<
rking >
That somebody
*else* defined Array#range_of_extremes, and made it mean something else?
21:21
<
rking >
Totally doubtful. But anyway: Refinements are coming, so we can finally put methods where they belong.
21:21
<
manveru >
also the kind of trouble AS causes
21:21
<
rking >
But s/trouble/niceness/ also
21:21
<
manveru >
people requiring AS just because they get used to a method or two
21:22
<
manveru >
refinements are still a long way away
21:22
<
manveru >
well, useful ones, anyway
21:22
<
rking >
Meh. I think it's a more interesting experiment to define methods on the places they really belong.
21:22
<
manveru >
Range::of_extremes maybe?
21:23
<
rking >
So like, Range.of_extremes [1,-1,2] ?
21:23
<
manveru >
no need to have an array for that
21:23
<
rking >
I'm Ok with that, because it's a sort of hybrid that does stuff with Arrays and with Range
21:24
alec has quit [Ping timeout: 256 seconds]
21:25
RWN has quit [Ping timeout: 255 seconds]
21:27
Guest29624 has joined #ruby-lang
21:28
brianpWins has quit [Quit: brianpWins]
21:29
tenderlove has joined #ruby-lang
21:30
m3nd3s has joined #ruby-lang
21:30
agile has quit [Remote host closed the connection]
21:31
dankest has joined #ruby-lang
21:33
agile has joined #ruby-lang
21:34
workmad3 has quit [Ping timeout: 264 seconds]
21:34
ryez has quit [Ping timeout: 245 seconds]
21:36
<
cirenyc >
will need to do similarly w/ weekly, monthly, and yearly time spans, but that basic idea
21:37
<
cirenyc >
Actually, wouldn't need the sort w/ minmax
21:43
<
rking >
See, this doesn't have enough weight for a class, to me.
21:43
<
rking >
But the names are not clear enough.
21:44
<
rking >
Hrm, maybe not re: names
21:45
<
cirenyc >
rking: Yeah, you might be right re: class.
21:45
<
rking >
Hard to say. It might be one of those things where I do this then revisit after sleeping on it.
21:47
<
cirenyc >
specifically re: class or the start/end values to include both date ranges?
21:48
<
cirenyc >
rking: My motivation for small simple classes, even w/o much weight, is for easier testing and single responsibility
21:51
<
rking >
cirenyc: Just whether I like the locations + names of classes + methods.
21:51
<
rking >
I get you re: single responsibility, but a class without even one 'self' call is just a namespace.
21:52
sn0wb1rd has quit [Quit: sn0wb1rd]
21:52
<
rking >
s/'self' call/instance method call/, I mean.
21:52
apeiros_ has joined #ruby-lang
21:53
yxhuvud has joined #ruby-lang
21:53
diegoviola has joined #ruby-lang
21:53
sn0wb1rd has joined #ruby-lang
21:54
sandbags has quit [Remote host closed the connection]
21:55
yxhuvud2 has quit [Ping timeout: 264 seconds]
21:57
<
cirenyc >
hrm, okay
21:57
<
cirenyc >
rking: I'll have to think about it some more.
21:58
blacktulip has quit [Remote host closed the connection]
22:02
Nisstyre has quit [Quit: Leaving]
22:02
dankest has quit [Quit: Leaving...]
22:02
hugobastien has quit [Remote host closed the connection]
22:04
dankest has joined #ruby-lang
22:05
_knitetemplar has quit [Remote host closed the connection]
22:06
sailias has quit [Quit: Leaving.]
22:06
esad has joined #ruby-lang
22:07
bfreeman has quit [Quit: bfreeman]
22:10
ryanf has joined #ruby-lang
22:12
dustint has quit [Remote host closed the connection]
22:13
s1n4 has quit [Quit: leaving]
22:17
glebm has quit [Quit: Computer has gone to sleep.]
22:19
itsmeduncan has joined #ruby-lang
22:21
jsaak has quit [Remote host closed the connection]
22:22
dustint has joined #ruby-lang
22:24
sush24 has joined #ruby-lang
22:25
<
sush24 >
hi.. Net::IMAP::Envelope has a methods .date it probably fetches the date string from the request. Is there a robust way to parse it to a date and time object? with proper timezones
22:27
<
rking >
sush24: Wellll, dates are messy almost without fail, but Date.parse the_str should give you a start.
22:29
<
sush24 >
rking, it only gives date
22:30
brianpWins has joined #ruby-lang
22:31
stevechiagozie has quit [Quit: Computer has gone to sleep.]
22:31
<
sush24 >
Date.parse("Sat, 11 Aug 2012 12:44:24 -0700")
22:31
<
sush24 >
this a sample request
22:31
<
rking >
DateTime.parse "Sat, 11 Aug 2012 12:44:24 -0700"
22:32
<
rking >
But no guarantees about formats. You'll have to examine the protocol (both the standard and the IRL deviances) to determine if you'll get something that DateTime will always .parse
22:32
<
sush24 >
rking, almost, timezone?
22:32
serhart has quit [Quit: Leaving.]
22:32
solars has joined #ruby-lang
22:32
m3nd3s has quit [Remote host closed the connection]
22:32
alec has joined #ruby-lang
22:33
<
rking >
sush24: It takes that into account.
22:33
<
sush24 >
irb(main):016:0> n = DateTime.parse "Sat, 11 Aug 2012 12:44:24 -0700"
22:33
<
sush24 >
=> #<DateTime: 2012-08-11T12:44:24-07:00 (982460529/400,-7/24,2299161)>
22:33
<
sush24 >
irb(main):017:0> n.strftime('%H:%M:%S')
22:33
<
sush24 >
=> "12:44:24"
22:33
m3nd3s has joined #ruby-lang
22:35
<
rking >
[14] pry(main)> str = "Sat, 11 Aug 2012 12:44:24 -0700"; d1 = DateTime.parse str; d2 = DateTime.parse str.sub '700', '800'; d2 - d1
22:35
<
rking >
You'll have to come up with a solution to timezone output, definitely.
22:36
<
sush24 >
rking, thanks
22:36
<
sush24 >
i'll see what sorts of sample string I have
22:38
<
sush24 >
Wed, 19 Dec 2012 00:02:17 -0600 (CST)
22:39
srbaker has quit [Quit: Computer has gone to sleep.]
22:39
<
rking >
Is equuivalent to the same with sub ' (CST)', ''
22:39
dustint has quit [Remote host closed the connection]
22:40
<
sush24 >
I guess need to use regex
22:40
esad has quit [Ping timeout: 248 seconds]
22:40
<
sush24 >
(GMT) (CST) etc etc
22:41
<
rking >
No, I mean the DateTime.parse ignores that
22:41
brianpWins has quit [Read error: Connection reset by peer]
22:41
<
rking >
It's redundant against the -0600
22:41
alec has left #ruby-lang [#ruby-lang]
22:41
<
rking >
I'm not sure what's supposed to happen if you say "-0600 (GMT)"
22:42
brianpWins has joined #ruby-lang
22:42
alec__ has joined #ruby-lang
22:42
alec__ is now known as alec
22:43
esad has joined #ruby-lang
22:43
<
apeiros_ >
tenderlove: ping - Kernel#y no longer being there - intentional or oversight?
22:43
<
zzak >
apeiros_: require 'psych/y'
22:44
<
apeiros_ >
zzak: aaaaw… 1.8 that came without additional require :-/
22:44
<
apeiros_ >
zzak: thanks!
22:45
<
apeiros_ >
zzak: um… require 'psych/y' # !> LoadError: cannot load such file -- psych/y
22:45
jsaak has joined #ruby-lang
22:45
<
apeiros_ >
neither 'yaml/y' or 'y'
22:46
<
zzak >
which version of psych / ruby?
22:47
<
zzak >
it was just recently added
22:49
imperator has quit [Quit: This computer has gone to sleep]
22:49
<
apeiros_ >
zzak: 1.9.3-p362
22:50
<
apeiros_ >
I've added it to my pryrc
22:50
<
apeiros_ >
it's not hard to write after all :)
22:50
<
zzak >
apeiros_: without latest psych gem, you need to just require 'psych'
22:51
Stormpath has quit [Quit: Stormpath]
22:51
v0lta has joined #ruby-lang
22:51
<
apeiros_ >
$ ruby -v -rpsych -e 'y "foo"'
22:51
<
apeiros_ >
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-darwin12.2.1]
22:51
<
apeiros_ >
-e:1:in `<main>': undefined method `y' for main:Object (NoMethodError)
22:51
kiddorails has joined #ruby-lang
22:52
sailias has joined #ruby-lang
22:52
kiddorails1 has quit [Quit: Leaving.]
22:52
Stormpath has joined #ruby-lang
22:52
<
zzak >
because ::IRB
22:53
breakingthings has quit []
22:53
<
tenderlove >
apeiros_: this is probably super lame
22:53
<
tenderlove >
but you could do (in pry)
22:53
<
tenderlove >
::IRB = true
22:53
<
tenderlove >
then load yaml
22:53
<
tenderlove >
(as a work around)
22:53
yxhuvud2 has joined #ruby-lang
22:53
<
apeiros_ >
lol? it detects IRB and only defines Kernel#y in irb?
22:53
kiddorails has quit [Read error: Connection reset by peer]
22:54
<
apeiros_ >
patently evil! :)
22:54
kiddorails has joined #ruby-lang
22:54
<
apeiros_ >
do we need a new universal global/constant? RUBY_REPL
22:54
srbaker has joined #ruby-lang
22:54
<
tenderlove >
apeiros_: ya. :(
22:55
<
tenderlove >
I didn't want to monkey patch y all the time
22:55
thone_ has joined #ruby-lang
22:55
<
tenderlove >
so it uses IRB to detect the repl
22:55
<
tenderlove >
(which was a mistake)
22:55
<
zzak >
ruby -v -e 'module IRB; end; require "psych"; y [1, 2, 3]'
22:55
yfeldblum has quit [Ping timeout: 264 seconds]
22:55
<
apeiros_ >
well, I understand the motivation
22:56
<
apeiros_ >
outside of repls, Kernel#y is probably not of much use
22:56
<
apeiros_ >
(though, I still rely on `p-debugging` far too much)
22:56
yxhuvud has quit [Ping timeout: 255 seconds]
22:58
<
cirenyc >
What is the best way to sort a group of objects based on 2 conditionals?
22:58
thone has quit [Ping timeout: 252 seconds]
22:59
<
cirenyc >
For instance, if I have a = [1, 2, 3, 4, 5, 6] and I want to apply an "even" rule and a "less than 4" rule to get two separate arrays.
22:59
pbjorklund has quit [Read error: Connection reset by peer]
22:59
pbjorklund has joined #ruby-lang
23:00
<
apeiros_ >
cirenyc: #partition
23:01
<
cirenyc >
apeiros_: the problem with partition is that each element could be true for both rules.
23:01
<
cirenyc >
any other way than to iterate over the array twice checking for each rule?
23:01
<
apeiros_ >
cirenyc: um, you do know boolean arithmetic, like 'and', yes?
23:02
macmartine has joined #ruby-lang
23:02
<
apeiros_ >
nothing stops you from testing 2 conditions in the partition block…
23:03
<
cirenyc >
right, understand that.
23:03
<
epitron >
he wants duplicates in both arrays
23:03
<
cirenyc >
but that still gives me two arrays, right, one with values that pass...ones that don't
23:03
<
cirenyc >
*one with values that don't, I mean
23:03
<
cirenyc >
epitron: yes
23:03
<
epitron >
partition makes mutually exclusive sets
23:04
<
apeiros_ >
cirenyc: aha, that wasn't clear (to me) from your description
23:04
<
epitron >
cirenyc: if you only wanna do one pass, you gotta use each and append to arrays
23:04
<
epitron >
if you want to do two passes, use select twice
23:04
<
apeiros_ >
I read it as "one set containing all even and <4 values, the other the rest"
23:04
<
cirenyc >
apeiros_: fair enough, sorry about that.
23:04
<
apeiros_ >
I don't think there's a readymade method for that
23:05
<
cirenyc >
okay, thanks.
23:05
<
epitron >
cirenyc: option 3: multiselect(*procs) :)
23:05
<
apeiros_ >
I'd probably partition twice and union the results
23:05
<
epitron >
which you'd have to implement on Enumerable
23:05
<
apeiros_ >
I think the result will be the same as with partition
23:06
<
epitron >
i wonder if you could have it return an array of enumerables...
23:06
<
apeiros_ >
duplicates
23:06
kain has quit [Quit: exit]
23:06
kain has joined #ruby-lang
23:06
<
epitron >
*enumerators
23:07
gaveen has quit [Ping timeout: 276 seconds]
23:07
<
epitron >
i don't think it's possible to return an array of (lazy) enumerators and have it do one-pass over the array
23:08
<
epitron >
that would require some tricky machinery
23:09
cjs226 has joined #ruby-lang
23:09
kiddorails1 has joined #ruby-lang
23:10
m3nd3s has quit [Remote host closed the connection]
23:10
gix has quit [Read error: Connection reset by peer]
23:11
gix has joined #ruby-lang
23:11
cirenyc has quit [Quit: Leaving...]
23:11
serhart has joined #ruby-lang
23:12
mistym has quit [Remote host closed the connection]
23:12
kiddorails has quit [Ping timeout: 276 seconds]
23:13
robotmay_ has joined #ruby-lang
23:13
robotmay has quit [Read error: Connection reset by peer]
23:15
vlad_starkov has quit [Remote host closed the connection]
23:15
<
apeiros_ >
tenderlove: btw., what's up with those ! in YAML emitted by psych? e.g. "---\nfoo: ! 'bar'"
23:15
<
tenderlove >
apeiros_: it's probably a bug
23:15
<
tenderlove >
but it's syntax to indicate a string literal
23:15
<
apeiros_ >
ok, I assumed that. but when/why do you use it?
23:16
MaddinXx has quit [Remote host closed the connection]
23:17
KA_ has quit [Quit: KA_]
23:19
christeraustad has quit [Quit: christeraustad]
23:19
zhul_mechanos has quit [Quit: zhul_mechanos]
23:19
gaveen has joined #ruby-lang
23:19
gaveen has quit [Changing host]
23:19
gaveen has joined #ruby-lang
23:22
rcvalle has quit [Quit: Leaving]
23:25
m3nd3s has joined #ruby-lang
23:26
bfreeman has joined #ruby-lang
23:26
ryanv-raptor has quit [Quit: Leaving.]
23:28
robotmay_ has quit [Remote host closed the connection]
23:30
robotmay has joined #ruby-lang
23:32
setamagiga has joined #ruby-lang
23:34
<
setamagiga >
Hi there :D can someone tell me the ruby equivalent to bytearray(length)? thx
23:34
<
setamagiga >
(its python btw)
23:34
Mon_Ouie has quit [Ping timeout: 264 seconds]
23:34
kiddorails1 has quit [Ping timeout: 248 seconds]
23:36
cableray has quit [Quit: cableray]
23:37
neocoin has joined #ruby-lang
23:38
m3nd3s has quit [Remote host closed the connection]
23:38
<
andrewvos >
Your name is python?
23:39
<
setamagiga >
yes for sure, what else would it be?
23:39
<
setamagiga >
but i think i got it already, i can just write the data byte for byte
23:40
setamagiga has quit [Quit: Leaving]
23:40
itsmeduncan has quit [Quit: itsmeduncan]
23:41
dankest has quit [Quit: Leaving...]
23:45
vlad_starkov has joined #ruby-lang
23:46
neocoin_ has joined #ruby-lang
23:46
solars has quit [Ping timeout: 256 seconds]
23:46
m3nd3s has joined #ruby-lang
23:49
neocoin has quit [Ping timeout: 248 seconds]
23:51
pythonsnake is now known as |_
23:52
pkrnj has joined #ruby-lang
23:53
yxhuvud has joined #ruby-lang
23:54
Banistergalaxy has quit [Ping timeout: 264 seconds]
23:54
m3nd3s has quit [Remote host closed the connection]
23:55
Banistergalaxy has joined #ruby-lang
23:55
davidbalbert is now known as davidbalber|away
23:55
vlad_starkov has quit [Ping timeout: 264 seconds]
23:55
itsmeduncan has joined #ruby-lang
23:55
yxhuvud2 has quit [Ping timeout: 248 seconds]
23:55
davidbalber|away is now known as davidbalbert
23:55
caemir has joined #ruby-lang
23:59
itsmeduncan has quit [Client Quit]