00:01
jtoy has quit [Quit: jtoy]
00:02
tomzx_mac has joined #ruby-lang
00:02
mephux has quit [Excess Flood]
00:02
mephux has joined #ruby-lang
00:03
kentos has quit [Quit: Leaving]
00:04
outoftime has quit [Quit: Leaving]
00:09
esad has joined #ruby-lang
00:09
datanoise has joined #ruby-lang
00:12
spuk has quit [Changing host]
00:12
spuk has joined #ruby-lang
00:14
benanne has quit [Quit: kbai]
00:15
mephux has quit [Excess Flood]
00:15
mephux has joined #ruby-lang
00:15
mephux is now known as Guest30769
00:18
datanoise has quit [Ping timeout: 256 seconds]
00:19
Banistergalaxy has quit [Ping timeout: 256 seconds]
00:20
jxie has quit [Ping timeout: 246 seconds]
00:22
jxie has joined #ruby-lang
00:23
Banistergalaxy has joined #ruby-lang
00:31
Gekz has joined #ruby-lang
00:31
Gekz has joined #ruby-lang
00:34
carloslopes has joined #ruby-lang
00:35
idkazuma has quit [Remote host closed the connection]
00:35
Guest30769 has quit [Excess Flood]
00:36
mephux has joined #ruby-lang
00:42
blazes816 has quit [Quit: blazes816]
00:43
robotmay has quit [Remote host closed the connection]
00:43
carloslopes has quit [Read error: Connection reset by peer]
00:44
carloslopes has joined #ruby-lang
00:46
drbrain_ has joined #ruby-lang
00:47
snk has quit [Quit: I accidentally the whole program.]
00:48
carloslopes has quit [Remote host closed the connection]
00:49
snk has joined #ruby-lang
00:49
sepp2k has joined #ruby-lang
00:50
drbrain has quit [Ping timeout: 252 seconds]
00:50
tomzx_mac has quit [Quit: tomzx_mac]
00:50
mephux has quit [Excess Flood]
00:51
tomzx_mac has joined #ruby-lang
00:52
mephux has joined #ruby-lang
00:53
banisterfiend is now known as banister`sleep
00:56
jtoy has joined #ruby-lang
00:57
synthetix has joined #ruby-lang
00:58
snk has quit [Quit: brb]
00:58
snk has joined #ruby-lang
00:59
__butch__ has quit [Quit: Leaving.]
00:59
drbrain_ has quit [Remote host closed the connection]
00:59
mephux has quit [Excess Flood]
01:01
guns has quit [Quit: guns]
01:02
mephux has joined #ruby-lang
01:05
drbrain has joined #ruby-lang
01:09
megha has quit [Read error: Operation timed out]
01:12
marr has quit [Ping timeout: 255 seconds]
01:19
stonerfish has joined #ruby-lang
01:21
t_ has quit [Remote host closed the connection]
01:22
jtoy has quit [Quit: jtoy]
01:26
megha has joined #ruby-lang
01:27
stonerfish has quit [Quit: Leaving.]
01:28
snk has quit [Quit: I accidentally the whole program.]
01:28
samlt has quit [Ping timeout: 252 seconds]
01:30
snk has joined #ruby-lang
01:30
jtoy has joined #ruby-lang
01:33
ryanv-raptor has joined #ruby-lang
01:33
jacktrick has joined #ruby-lang
01:33
gregmoreno has quit [Remote host closed the connection]
01:34
mrsolo has quit [Quit: Leaving]
01:38
jacktrick has quit [Client Quit]
01:39
unlikely_monkey has joined #ruby-lang
01:42
nguerin_ has joined #ruby-lang
01:43
snk has quit [Quit: I accidentally the whole program.]
01:44
snk has joined #ruby-lang
01:45
nguerin has quit [Ping timeout: 256 seconds]
01:45
mjio has joined #ruby-lang
01:46
jtoy has quit [Quit: jtoy]
01:49
chimkan_ has joined #ruby-lang
01:50
drbrain has quit [Remote host closed the connection]
01:50
alvaro_o_ has quit [Quit: Ex-Chat]
01:51
chimkan has quit [Ping timeout: 255 seconds]
01:51
chimkan_ is now known as chimkan
01:54
nguerin_ has quit [Ping timeout: 256 seconds]
01:54
nguerin has joined #ruby-lang
01:54
madish has quit [Quit: ChatZilla 0.9.89 [Firefox 16.0.1/20121026125834]]
01:56
brianpWins has quit [Quit: brianpWins]
01:56
snk has quit [Quit: I accidentally the whole program.]
01:59
chendo_ is now known as chendo
02:00
nXqd has joined #ruby-lang
02:01
nguerin_ has joined #ruby-lang
02:02
nguerin has quit [Read error: Connection reset by peer]
02:04
snk has joined #ruby-lang
02:04
snk has quit [Client Quit]
02:08
snk has joined #ruby-lang
02:13
nguerin_ has quit [Read error: Connection reset by peer]
02:13
nguerin has joined #ruby-lang
02:15
krohrbaugh has quit [Quit: Leaving.]
02:17
nguerin has quit [Read error: Connection reset by peer]
02:17
nguerin_ has joined #ruby-lang
02:20
jtoy has joined #ruby-lang
02:20
mjio has joined #ruby-lang
02:22
blazes816 has joined #ruby-lang
02:26
nguerin_ has quit [Ping timeout: 256 seconds]
02:26
sandbags has quit [Remote host closed the connection]
02:26
nguerin has joined #ruby-lang
02:27
imajes has quit [Excess Flood]
02:29
imajes has joined #ruby-lang
02:33
havenwood has quit [Read error: Connection reset by peer]
02:33
havenwood has joined #ruby-lang
02:34
richardburton has quit [Quit: Leaving.]
02:34
sn0wb1rd has quit [Quit: I will be right back]
02:35
wallerdev has joined #ruby-lang
02:36
jtoy has quit [Quit: jtoy]
02:37
nguerin_ has joined #ruby-lang
02:38
nguerin has quit [Read error: Connection reset by peer]
02:38
nguerin_ has quit [Read error: Connection reset by peer]
02:38
shtirlic has joined #ruby-lang
02:38
nguerin has joined #ruby-lang
02:39
thufir_ has joined #ruby-lang
02:41
fiyarburst has joined #ruby-lang
02:41
Swimming_Bird has joined #ruby-lang
02:42
charliesome has joined #ruby-lang
02:42
<
fiyarburst >
is there a built in way to convert an integer to a 32-bit big endian?
02:43
shtirlic has quit [Ping timeout: 256 seconds]
02:43
<
fiyarburst >
i'm not sure if a [x].pack('N') is what i want for some e.g. x=4
02:44
gregmore_ has joined #ruby-lang
02:44
havenwood has quit [Remote host closed the connection]
02:47
nguerin has quit [Ping timeout: 256 seconds]
02:48
toretore has quit [Quit: Leaving]
02:48
gregmore_ has quit [Ping timeout: 252 seconds]
02:53
nguerin has joined #ruby-lang
02:55
Vektur has joined #ruby-lang
02:56
methods has joined #ruby-lang
02:58
krohrbaugh has joined #ruby-lang
02:59
bzalasky has joined #ruby-lang
03:03
towski has joined #ruby-lang
03:03
rsl has quit [Quit: Computer has gone to sleep.]
03:03
bzalasky has quit [Remote host closed the connection]
03:07
spuk has quit [Ping timeout: 245 seconds]
03:11
nguerin has quit [Ping timeout: 256 seconds]
03:12
nguerin has joined #ruby-lang
03:13
guns has joined #ruby-lang
03:14
spuk has joined #ruby-lang
03:15
havenwood has joined #ruby-lang
03:18
ryanv-raptor has quit [Quit: Leaving.]
03:22
nguerin has quit [Ping timeout: 256 seconds]
03:23
lsegal has joined #ruby-lang
03:23
havenwood has quit [Ping timeout: 244 seconds]
03:24
spuk has quit [Ping timeout: 276 seconds]
03:24
bluepojo1 has joined #ruby-lang
03:24
methods has quit [Ping timeout: 256 seconds]
03:24
bluepojo has quit [Read error: Connection reset by peer]
03:26
nguerin has joined #ruby-lang
03:26
havenwood has joined #ruby-lang
03:27
melter has quit [Ping timeout: 245 seconds]
03:28
Kallikanzarid has quit [Quit: Quitting]
03:32
imajes has quit [Excess Flood]
03:33
glebm has quit [Quit: Computer has gone to sleep.]
03:33
emocakes has quit [Quit: emocakes]
03:33
imajes has joined #ruby-lang
03:40
ryanv-raptor has joined #ruby-lang
03:40
Bearproof has joined #ruby-lang
03:44
Axsuul has quit [Ping timeout: 252 seconds]
03:45
Bearproof has quit [Ping timeout: 256 seconds]
03:51
datanoise has joined #ruby-lang
03:52
stonerfish has joined #ruby-lang
03:53
chimkan_ has joined #ruby-lang
03:54
ryanv-raptor has quit [Quit: Leaving.]
03:56
chimkan has quit [Ping timeout: 264 seconds]
03:56
chimkan_ is now known as chimkan
03:56
datanoise has quit [Ping timeout: 256 seconds]
04:00
nXqd has quit [Remote host closed the connection]
04:04
robbyoconnor has joined #ruby-lang
04:06
Rarrikins has joined #ruby-lang
04:06
dustint has joined #ruby-lang
04:06
chimkan_ has joined #ruby-lang
04:08
elfenars has joined #ruby-lang
04:09
itsmeduncan has joined #ruby-lang
04:09
chimkan has quit [Ping timeout: 255 seconds]
04:09
chimkan_ is now known as chimkan
04:11
itsmeduncan has quit [Client Quit]
04:16
dustint has quit [Remote host closed the connection]
04:18
chimkan_ has joined #ruby-lang
04:18
bzalasky has joined #ruby-lang
04:19
drbrain has joined #ruby-lang
04:19
elfenars has quit [Quit: elfenars]
04:20
chimkan has quit [Ping timeout: 255 seconds]
04:20
chimkan_ is now known as chimkan
04:21
bluepojo1 has quit [Quit: Leaving.]
04:24
dcwu has joined #ruby-lang
04:26
o0mds0o has joined #ruby-lang
04:28
mephux has quit [Excess Flood]
04:28
drbrain has quit [Remote host closed the connection]
04:30
mephux has joined #ruby-lang
04:33
mercwithamouth has joined #ruby-lang
04:33
bluepojo has joined #ruby-lang
04:36
spuk has joined #ruby-lang
04:37
bluepojo has quit [Client Quit]
04:39
Aria has joined #ruby-lang
04:44
peppyheppy has joined #ruby-lang
04:47
brianpWins has joined #ruby-lang
04:53
peppyheppy has quit [Quit: peppyheppy]
04:57
chimkan has quit [Quit: chimkan]
05:01
My_Hearing has quit [Ping timeout: 252 seconds]
05:01
My_Hearing has joined #ruby-lang
05:02
Bearproof has joined #ruby-lang
05:07
Bearproof has quit [Client Quit]
05:07
chimkan has joined #ruby-lang
05:08
Vektur has left #ruby-lang [#ruby-lang]
05:08
gregmore_ has joined #ruby-lang
05:08
Vektur has joined #ruby-lang
05:19
earthquake has quit [Quit: earthquake]
05:19
earthquake has joined #ruby-lang
05:20
tomzx_mac has quit [Ping timeout: 256 seconds]
05:20
jonahR has joined #ruby-lang
05:21
chimkan has quit [Read error: Connection reset by peer]
05:22
chimkan has joined #ruby-lang
05:23
gregmore_ has quit []
05:24
gregmoreno has joined #ruby-lang
05:32
vlad_starkov has joined #ruby-lang
05:32
rippa has joined #ruby-lang
05:36
vlad_starkov has quit [Remote host closed the connection]
05:37
drbrain has joined #ruby-lang
05:48
neocoin has quit [Remote host closed the connection]
05:51
dankest has joined #ruby-lang
05:58
andrewhl has quit [Remote host closed the connection]
06:03
stonerfish has quit [Ping timeout: 276 seconds]
06:05
b1rkh0ff has quit [Ping timeout: 276 seconds]
06:06
b1rkh0ff has joined #ruby-lang
06:09
ryanf has quit [Quit: leaving]
06:09
mistym has quit [Remote host closed the connection]
06:09
blacktulip has joined #ruby-lang
06:12
bzalasky has quit [Read error: Connection reset by peer]
06:13
bzalasky has joined #ruby-lang
06:13
imajes has quit [Excess Flood]
06:13
imajes has joined #ruby-lang
06:15
JohnBat26 has joined #ruby-lang
06:17
jonahR has quit [Quit: jonahR]
06:17
Gue______ has joined #ruby-lang
06:17
neocoin has joined #ruby-lang
06:18
Axsuul has joined #ruby-lang
06:18
peppyheppy has joined #ruby-lang
06:22
krz has joined #ruby-lang
06:24
andrewhl has joined #ruby-lang
06:24
Aria has quit [Remote host closed the connection]
06:25
_________ has joined #ruby-lang
06:29
mjio has joined #ruby-lang
06:29
dkannan has joined #ruby-lang
06:30
ryanf has joined #ruby-lang
06:32
unlikely_monkey has quit [Remote host closed the connection]
06:40
dankest has quit [Quit: Leaving...]
06:43
|Vargas| has joined #ruby-lang
06:43
|Vargas| has quit [Changing host]
06:43
|Vargas| has joined #ruby-lang
06:44
bg451 has joined #ruby-lang
06:45
xalei has joined #ruby-lang
06:47
vlad_starkov has joined #ruby-lang
06:50
bg451 has quit [Quit: bg451]
06:51
rippa has quit [Ping timeout: 240 seconds]
06:51
nXqd has joined #ruby-lang
06:52
techlife has quit [Ping timeout: 252 seconds]
06:52
vlad_starkov has quit [Ping timeout: 255 seconds]
06:54
techlife has joined #ruby-lang
06:59
mjio has joined #ruby-lang
06:59
Gue______ has quit [Quit: Computer has gone to sleep.]
06:59
_________ has quit [Quit: Computer has gone to sleep.]
06:59
dhruvasagar has joined #ruby-lang
07:01
nXqd has quit [Ping timeout: 255 seconds]
07:03
zmack has joined #ruby-lang
07:03
andrewhl has quit [Remote host closed the connection]
07:05
gregmoreno has quit [Remote host closed the connection]
07:06
peppyheppy has quit [Quit: peppyheppy]
07:07
nXqd has joined #ruby-lang
07:18
chimkan has quit [Quit: chimkan]
07:18
imajes has quit [Excess Flood]
07:19
imajes has joined #ruby-lang
07:19
ryanf has quit [Quit: leaving]
07:19
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
07:20
ryanf has joined #ruby-lang
07:21
towski has quit [Remote host closed the connection]
07:21
xalei has quit [Read error: Connection reset by peer]
07:22
peppyheppy has joined #ruby-lang
07:22
samlt has joined #ruby-lang
07:24
tonni has quit [Remote host closed the connection]
07:29
chimkan has joined #ruby-lang
07:29
megha has quit [Quit: WeeChat 0.4.0]
07:32
vlad_starkov has joined #ruby-lang
07:33
megha has joined #ruby-lang
07:36
megha has quit [Client Quit]
07:37
mjio has joined #ruby-lang
07:41
rue has quit [Remote host closed the connection]
07:41
megha has joined #ruby-lang
07:41
rue has joined #ruby-lang
07:41
Averna has quit [Quit: Leaving.]
07:42
faces has quit [Quit: Leaving]
07:42
tonni has joined #ruby-lang
07:42
faces has joined #ruby-lang
07:42
faces has quit [Client Quit]
07:44
chimkan has quit [Quit: chimkan]
07:44
faces has joined #ruby-lang
07:45
o0mds0o has quit [Remote host closed the connection]
07:49
srbaker has joined #ruby-lang
07:55
ryanf has quit [Quit: leaving]
08:00
o0mds0o has joined #ruby-lang
08:03
agile has quit [Read error: No route to host]
08:03
dc5ala has joined #ruby-lang
08:03
shtirlic has joined #ruby-lang
08:03
mercwithamouth has quit [Ping timeout: 255 seconds]
08:08
shtirlic has quit [Ping timeout: 256 seconds]
08:12
dr_bob has joined #ruby-lang
08:14
Guest__ has joined #ruby-lang
08:14
megha has quit [Ping timeout: 252 seconds]
08:15
nXqd_ has joined #ruby-lang
08:16
gregmoreno has joined #ruby-lang
08:16
nXqd has quit [Ping timeout: 255 seconds]
08:17
MaddinXx has joined #ruby-lang
08:18
megha has joined #ruby-lang
08:18
imajes has quit [Excess Flood]
08:19
imajes has joined #ruby-lang
08:21
gregmoreno has quit [Ping timeout: 276 seconds]
08:21
srbaker has quit [Ping timeout: 240 seconds]
08:25
srbaker has joined #ruby-lang
08:27
sandbags has joined #ruby-lang
08:27
sandbags has quit [Changing host]
08:27
sandbags has joined #ruby-lang
08:28
agile has joined #ruby-lang
08:30
glebm has joined #ruby-lang
08:30
glebm has quit [Client Quit]
08:31
vlad_starkov has quit [Remote host closed the connection]
08:31
chekcmate has joined #ruby-lang
08:31
<
chekcmate >
moinseeen
08:31
o0mds0o has quit [Remote host closed the connection]
08:32
rsl has joined #ruby-lang
08:32
srbaker has quit [Quit: Computer has gone to sleep.]
08:33
* chekcmate
loves LAN-cached updates :)
08:36
vlad_starkov has joined #ruby-lang
08:36
jxie has quit [Quit: leaving]
08:36
peppyheppy has quit [Quit: peppyheppy]
08:38
gnufied has joined #ruby-lang
08:38
Guest__ has quit [Quit: Computer has gone to sleep.]
08:42
solars has joined #ruby-lang
08:47
judofyr has joined #ruby-lang
08:49
Guest__ has joined #ruby-lang
08:50
setmeaway has quit [Ping timeout: 260 seconds]
08:52
wallerdev has quit [Quit: wallerdev]
08:54
io_syl has quit [Ping timeout: 264 seconds]
08:57
io_syl has joined #ruby-lang
08:57
marr has joined #ruby-lang
08:58
richardburton has joined #ruby-lang
08:59
bg451 has joined #ruby-lang
09:01
tbuehlmann has joined #ruby-lang
09:02
workmad3 has joined #ruby-lang
09:02
ottbot has quit [Quit: WeeChat 0.3.9.2]
09:02
o0mds0o has joined #ruby-lang
09:03
<
chekcmate >
judofyr: may I annoy you for a sec?
09:03
<
judofyr >
chekcmate: sure
09:03
<
chekcmate >
how can I logically connect open() and write()? Because write() never shows on which file it's operating
09:04
<
chekcmate >
maybe you haz an idea?
09:04
<
judofyr >
chekcmate: the first parameter to write() is the file descriptor
09:04
<
judofyr >
which open() returns
09:05
<
chekcmate >
do you think it will always be looking that clearly? at the moment every open() follows a write(), so it's not hard to determine
09:05
<
judofyr >
so I would assume that open("test_file") = 3 means that the file is opened as file descriptor 3
09:06
<
chekcmate >
but I'm afraid to lose overview when it comes to my 28k files again heh
09:06
<
chekcmate >
yes, that's correct
09:06
<
chekcmate >
it's always the file descriptor # there
09:06
<
chekcmate >
so using this as a connection seems logically, aight?
09:06
<
chekcmate >
alright, thanks :)
09:07
tonni has quit [Remote host closed the connection]
09:08
thufir_ has quit [Quit: Leaving.]
09:10
setmeaway has joined #ruby-lang
09:11
o0mds0o has quit [Ping timeout: 252 seconds]
09:11
<
chekcmate >
judofyr: damn, now it happened what I feared
09:12
<
chekcmate >
1359450300.314392 write(1, "axi-cache is /usr/bin/axi-cache\n", 32) = 32 <0.000067> <== there is no file descriptor anywhere with "= 1"
09:13
gnufied has quit [Quit: Leaving.]
09:13
<
judofyr >
chekcmate: 1 = STDOUT
09:14
<
judofyr >
chekcmate: 2 = STDERR. 0 = STDIN
09:14
<
chekcmate >
so the "others" start at 3?
09:14
* chekcmate
will google this...
09:14
dc5ala has quit [Quit: Ex-Chat]
09:14
<
judofyr >
chekcmate: yup
09:15
<
chekcmate >
thought -1 was error
09:15
<
yorickpeterse >
Morning
09:15
<
chekcmate >
he yorick
09:15
<
judofyr >
chekcmate: or, I don't think it's guaranteed by spec. if you e.g. fork, then you can inherit file descriptors and new fds won't start at 3
09:15
gnufied has joined #ruby-lang
09:15
<
judofyr >
morning 'peterse
09:15
<
chekcmate >
yea, I do so
09:17
<
chekcmate >
judofyr: alright, now it makes a lot more sense.. thanks again
09:19
imajes has quit [Excess Flood]
09:19
bzb has joined #ruby-lang
09:20
imajes has joined #ruby-lang
09:21
SubSpawn has quit [Ping timeout: 252 seconds]
09:22
retro|cz has quit [Ping timeout: 246 seconds]
09:26
robotmay has joined #ruby-lang
09:27
io_syl has quit [Quit: Computer has gone to sleep.]
09:28
Axsuul has quit [Ping timeout: 255 seconds]
09:28
emocakes has joined #ruby-lang
09:29
brianpWins has quit [Quit: brianpWins]
09:30
tonni has joined #ruby-lang
09:35
<
gnufied >
morning guys
09:36
<
chekcmate >
moin gnufied
09:38
o0mds0o has joined #ruby-lang
09:38
<
rue >
judofyr: chekcmate: Right, new ones aren’t guaranteed to start with a certain int, so you’ll want to ensure you have the right one
09:39
bzalasky has quit [Remote host closed the connection]
09:39
<
chekcmate >
rue: I'm still thinking on how to do this...
09:40
judofyr_ has joined #ruby-lang
09:42
<
rue >
I’m not sure what the issue is that you have? You get an fd (or an IO) when you open, and then you use that fd for operations on that IO :)
09:42
o0mds0o has quit [Ping timeout: 256 seconds]
09:43
kain has quit [Quit: exit]
09:43
kain has joined #ruby-lang
09:43
judofyr has quit [Ping timeout: 255 seconds]
09:43
<
chekcmate >
rue: yea, you can look at it by hand too... it gets annoying when doing this with 28k files
09:44
richardburton has quit [Quit: Leaving.]
09:45
sora_h has quit [Excess Flood]
09:45
sora_h has joined #ruby-lang
09:47
<
chekcmate >
that's a very easy example, I wish it'd stay that way ^^
09:50
MaddinXx has quit [Remote host closed the connection]
09:54
sora_h has quit [Excess Flood]
09:55
sora_h has joined #ruby-lang
09:55
richardburton has joined #ruby-lang
09:56
dcwu has quit [Quit: Leaving.]
09:57
havenwood has quit [Remote host closed the connection]
09:58
vlad_starkov has quit [Remote host closed the connection]
10:02
Guest__ has quit [Ping timeout: 256 seconds]
10:03
Nisstyre has quit [Ping timeout: 245 seconds]
10:04
charliesome_ has joined #ruby-lang
10:04
Guest__ has joined #ruby-lang
10:05
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
10:07
GarethAdams has joined #ruby-lang
10:08
jxie has joined #ruby-lang
10:09
sora_h has quit [Excess Flood]
10:10
sora_h has joined #ruby-lang
10:11
judofyr_ has quit [Remote host closed the connection]
10:12
judofyr has joined #ruby-lang
10:15
retro|cz has joined #ruby-lang
10:18
<
rue >
That doesn’t really say anything about the relationship between the two. Do you write the same thing to all? Do you need a queue of fds?
10:19
imajes has quit [Excess Flood]
10:19
ddd has quit [Ping timeout: 245 seconds]
10:21
imajes has joined #ruby-lang
10:24
nkr has joined #ruby-lang
10:26
bzb has quit [Quit: Leaving]
10:29
maxmanders has joined #ruby-lang
10:29
<
chekcmate >
how do I do this: line.include?("write(>=3") ?
10:29
security has joined #ruby-lang
10:30
megha has quit [Ping timeout: 264 seconds]
10:30
<
judofyr >
chekcmate: do what?
10:30
<
chekcmate >
include write(3; write(4; write(5; ...<= kinda like that?
10:30
<
judofyr >
line =~ /write\((\d+)/; $1.to_i >= 3
10:30
<
judofyr >
chekcmate: ^
10:31
<
chekcmate >
ah great thanks :)
10:32
rippa has joined #ruby-lang
10:32
<
judofyr >
chekcmate: :D
10:32
security has quit [Quit: WeeChat 0.4.0]
10:32
<
chekcmate >
manly tears have been shed for that guy!
10:34
shtirlic has joined #ruby-lang
10:36
xcombelle has joined #ruby-lang
10:43
sepp2k has quit [Remote host closed the connection]
10:49
maxmanders has quit [Ping timeout: 252 seconds]
10:54
vlad_starkov has joined #ruby-lang
10:54
<
chekcmate >
judofyr: tbh, I don't really get how to implement the second part you told me :/
10:54
<
judofyr >
chekcmate: hm? just do: if line =~ /write\((\d+)/ && $1.to_i >= 3
10:55
<
chekcmate >
$1 = d?
10:55
<
chekcmate >
haven't come across that one yet
10:55
cultureulterior_ has joined #ruby-lang
10:56
<
judofyr >
chekcmate: after you do a regexp match, $1, $2, $3, … will contain the capture groups
10:56
<
chekcmate >
ooooooh
10:56
<
chekcmate >
so that's how you can talk to them
10:56
<
judofyr >
chekcmate: e.g: if "hello 123 world" =~ /hello (\d+) (w.+)$/; $1 == "123"; $2 == "world"
10:56
<
chekcmate >
I only used ,1] until now e.g.
10:57
<
judofyr >
yeah, there's several ways to use them
10:57
<
chekcmate >
that's great!
10:57
<
chekcmate >
thanks a lot!
10:57
<
judofyr >
chekcmate: well, actually. in this case, you could also do: line[/write\(\d+)/, 1].to_i >= 3
10:58
<
chekcmate >
so the .to_i is refering only to \d
10:58
<
judofyr >
oops: line[/write\((\d+)/, 1].to_i >= 3
10:58
dzhulk has joined #ruby-lang
10:58
<
judofyr >
because String#[Regexp, Integer] will fallback to "nil" if it doesn't match, and nil.to_i returns 0
10:58
<
chekcmate >
no, it refers to the first match
10:58
<
judofyr >
1 refers to the first capture group
10:59
dzhulk has left #ruby-lang [#ruby-lang]
10:59
<
judofyr >
line[/write\((\d+)/, 1] => "3"
10:59
maxmanders has joined #ruby-lang
10:59
<
chekcmate >
if it's write(3...
10:59
Mon_Ouie has joined #ruby-lang
11:00
<
chekcmate >
erm.. if the input is write(3...) and you use your solution, the output is 3 - that's what you mean, yes?
11:00
<
judofyr >
that is correct
11:01
<
chekcmate >
okay, just making sure I understood it :)
11:07
banister`sleep has quit [Read error: Connection reset by peer]
11:09
o0mds0o has joined #ruby-lang
11:13
o0mds0o has quit [Ping timeout: 245 seconds]
11:16
bg451 has quit [Quit: bg451]
11:16
idkazuma has joined #ruby-lang
11:19
imajes has quit [Excess Flood]
11:20
imajes has joined #ruby-lang
11:21
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
11:25
idkazuma has quit [Remote host closed the connection]
11:30
maxmanders has quit [Quit: Computer has gone to sleep.]
11:35
madish has joined #ruby-lang
11:36
rsl has quit [Quit: Computer has gone to sleep.]
11:39
o0mds0o has joined #ruby-lang
11:44
o0mds0o has quit [Ping timeout: 256 seconds]
11:48
maxmanders has joined #ruby-lang
11:53
nguerin has quit [Remote host closed the connection]
11:55
kennyvb has joined #ruby-lang
11:56
<
judofyr >
injekt: why no electricity? :(
11:56
robbyoconnor has quit [Ping timeout: 276 seconds]
11:58
rsl has joined #ruby-lang
11:59
adambeynon has joined #ruby-lang
12:00
maxmanders has quit [Quit: Computer has gone to sleep.]
12:03
maxmanders has joined #ruby-lang
12:07
s1n4 has joined #ruby-lang
12:08
richardburton has quit [Quit: Leaving.]
12:08
havenwood has joined #ruby-lang
12:10
o0mds0o has joined #ruby-lang
12:10
nirix has quit [Ping timeout: 248 seconds]
12:11
nirix has joined #ruby-lang
12:11
krz has quit [Quit: krz]
12:13
sush24 has joined #ruby-lang
12:14
o0mds0o has quit [Ping timeout: 245 seconds]
12:19
toretore has joined #ruby-lang
12:20
imajes has quit [Excess Flood]
12:20
havenwood has quit [Remote host closed the connection]
12:21
imajes has joined #ruby-lang
12:22
<
chekcmate >
does anyone know why I get a lot of "write(8, "\1\0\0\0\0\0\0\0", 8) = 8" but can't find the file descriptor for this one (8) on any open()? (open("/root/.cache/dconf/user", O_RDWR|O_CREAT, 0600) = 9 (like here's #9)
12:23
<
chekcmate >
oh wait, forget it... forgot to look in a file...
12:24
<
judofyr >
chekcmate: what are you trying to do btw?
12:24
<
chekcmate >
umm... you weren't there when I told the guys about the 28k trace files I have to process?
12:25
<
shachaf >
chekcmate: Maybe it came from some other system call?
12:25
<
shachaf >
Lots of system calls can open fds.
12:25
<
shachaf >
I'd search for any line that ends in = 8
12:25
<
chekcmate >
shachaf: I found it already, it was in my RDONLY file...
12:25
<
chekcmate >
thanks though :)
12:25
<
shachaf >
May your monoids be easy.
12:26
<
chekcmate >
judofyr: it's basically trying to get a list of files which are written by the system (mail order system), but never read again (obsolete files more or less)
12:26
<
chekcmate >
shachaf: hehh ^^
12:27
Glass_saga has joined #ruby-lang
12:27
Glass_saga has quit [Remote host closed the connection]
12:27
<
chekcmate >
though it's more for me to learn than anything else, as far as I understood my boss :)
12:27
AndChat| has joined #ruby-lang
12:30
Banistergalaxy has quit [Ping timeout: 256 seconds]
12:30
<
chekcmate >
what's "\1\0\0\0\0\0\0\0" anyways?
12:30
o0mds0o has joined #ruby-lang
12:30
Glass_saga has joined #ruby-lang
12:30
Glass_saga has quit [Remote host closed the connection]
12:30
<
shachaf >
Eight bytes, the first of which is a 1 and the rest of which are 0s?
12:30
<
chekcmate >
yea, but what for?
12:30
<
shachaf >
Possibly a 64-bit little-endian 1.
12:31
glebm has joined #ruby-lang
12:31
<
shachaf >
It could be for ltos of things.
12:31
Glass_saga has joined #ruby-lang
12:31
Glass_saga has quit [Remote host closed the connection]
12:32
<
judofyr >
chekcmate: who knows? it's just a binary format
12:32
nguerin has joined #ruby-lang
12:32
<
chekcmate >
just wondering, there are a lot of these lines when I trace gedit, heh
12:32
Glass_saga has joined #ruby-lang
12:32
Glass_saga has quit [Remote host closed the connection]
12:33
Glass_saga has joined #ruby-lang
12:33
Glass_saga has quit [Remote host closed the connection]
12:34
maxmanders has quit [Quit: Computer has gone to sleep.]
12:34
samlt has quit [Ping timeout: 252 seconds]
12:36
Mon_Ouie has quit [Ping timeout: 252 seconds]
12:39
maxmanders has joined #ruby-lang
12:40
samlt has joined #ruby-lang
12:41
idkazuma has joined #ruby-lang
12:42
maxmanders has quit [Client Quit]
12:43
elfenars has joined #ruby-lang
12:44
elfenars is now known as mrbloo
12:46
s1n4 has quit [Quit: leaving]
12:48
madish has quit [Remote host closed the connection]
12:50
nguerin has quit [Read error: Connection reset by peer]
12:50
nguerin has joined #ruby-lang
12:51
xalei has joined #ruby-lang
12:53
postmodern has quit [Quit: Leaving]
12:54
maxmanders has joined #ruby-lang
12:57
mjolk has joined #ruby-lang
13:01
megha has joined #ruby-lang
13:06
vlad_starkov has quit [Remote host closed the connection]
13:06
nguerin_ has joined #ruby-lang
13:07
nguerin has quit [Read error: Connection reset by peer]
13:07
vlad_starkov has joined #ruby-lang
13:08
richardburton has joined #ruby-lang
13:09
fsvehla has quit [Quit: fsvehla]
13:10
o0mds0o has quit [Remote host closed the connection]
13:13
richardburton has quit [Ping timeout: 255 seconds]
13:14
dhruvasagar has quit [Ping timeout: 256 seconds]
13:16
jrafanie has joined #ruby-lang
13:20
rsl has joined #ruby-lang
13:20
jxie has quit [Quit: leaving]
13:21
havenwood has joined #ruby-lang
13:21
imajes has quit [Excess Flood]
13:21
<
darix >
chekcmate: if you just want file operations
13:21
<
darix >
strace -e trace=file
13:21
<
chekcmate >
I know, I had that before
13:21
<
chekcmate >
it would actually be cool to combine file and open + write only
13:22
<
chekcmate >
darix: got that atm: strace -D -ff -ttt -o #{tpath}/trace -e trace=open,write,unlink #{prog}
13:22
samlt has quit [Ping timeout: 240 seconds]
13:22
imajes has joined #ruby-lang
13:23
samlt has joined #ruby-lang
13:24
jtoy has joined #ruby-lang
13:24
<
chekcmate >
but that won't work... when doing trace=file, you automatically get open,write,exec,...
13:24
<
chekcmate >
but you won't get write() if not explicitly added to trace=file,write
13:25
<
chekcmate >
but but in my butt!
13:25
x0F has quit [Disconnected by services]
13:25
x0F_ has joined #ruby-lang
13:25
jtoy_ has joined #ruby-lang
13:25
samlt has quit [Client Quit]
13:25
x0F_ is now known as x0F
13:25
havenwood has quit [Ping timeout: 252 seconds]
13:25
jtoy has quit [Read error: Connection reset by peer]
13:25
jtoy_ is now known as jtoy
13:27
rsl has joined #ruby-lang
13:27
imperator has joined #ruby-lang
13:28
Stilo has joined #ruby-lang
13:30
<
chekcmate >
darix: maybe you can answer me a question
13:31
dustint has joined #ruby-lang
13:31
gjaldon has joined #ruby-lang
13:31
<
chekcmate >
1359466079.465803 open("test_file", O_RDWR|O_CREAT|O_APPEND, 0666) = 3 <== you can not determine clearly, which of the operations is done, right? (rdwr, creat, append)
13:32
<
chekcmate >
and in that open() command, no data is actually written, yes?
13:32
<
chekcmate >
in the following write(), using the same file descriptor #, data is written, correct?
13:32
<
judofyr >
chekcmate: correct
13:33
<
judofyr >
chekcmate: | means that all of the operations are used
13:33
<
chekcmate >
so I usually have like 10 billion open() commands, but only very few write()
13:33
<
chekcmate >
is this a 1 <-> 1 connection?
13:33
<
chekcmate >
open()<->write() ?
13:33
<
judofyr >
chekcmate: see `man 2 open` for the possible flags
13:34
<
judofyr >
chekcmate: well, you can open a file just to read it too
13:34
<
darix >
chekcmate: well you need to track the file descriptors returned and check to which file descriptors the write goes.
13:34
<
darix >
also yeah ... you need to track read too
13:34
<
judofyr >
chekcmate: but no. you can have multiple writes to the same file descriptor
13:34
<
darix >
maybe also mmap
13:34
ddd has joined #ruby-lang
13:34
<
chekcmate >
multiple writes to one open is fine, the other way around would worry me though
13:35
maxmanders has quit [Quit: Computer has gone to sleep.]
13:35
<
chekcmate >
darix: yup, that's what I'm trying to do ^^
13:35
<
judofyr >
chekcmate: if you're seeing many opens with a write, I would assume the file is only read, not written
13:35
<
darix >
there are more than just read,write you can do to a file descriptor
13:35
<
chekcmate >
I know, a ton of other things
13:36
<
darix >
chekcmate: what is the problem behind this that you are trying to solve?
13:36
<
chekcmate >
but I concentrate on open-write for now
13:36
<
chekcmate >
finding obsolete files made by a very old system
13:36
<
judofyr >
chekcmate: in that case, I would't worry about the "lonely" open that is never written to. well, unless they have O_CREAT
13:37
<
chekcmate >
hm... I filter for O_RDONLY, so that should get me all the files not written to, when I first match that list with my write_files-list?
13:38
banister`sleep has joined #ruby-lang
13:38
<
judofyr >
chekcmate: files with O_RDWR can also be read
13:38
<
judofyr >
and they can be written to
13:38
gix has quit [Ping timeout: 256 seconds]
13:38
<
chekcmate >
but only with WRITE, right?
13:38
synthetix has quit [Ping timeout: 245 seconds]
13:38
<
chekcmate >
that's the point
13:39
vlad_starkov has quit [Ping timeout: 256 seconds]
13:39
<
chekcmate >
open("judo.file", O_RDWR|O_CREAT|O_APPEND, 0666) = 3 <--- this does not write
13:39
* chekcmate
hopes he's right, hah
13:39
<
judofyr >
chekcmate: but it does create a file
13:39
<
chekcmate >
so there can be no write() on a file which does not exist basically?
13:39
<
judofyr >
"O_CREAT create file if it does not exist"
13:40
<
judofyr >
chekcmate: yes.
13:40
<
judofyr >
chekcmate: writes can only be done on file descriptors. and open() fails if the file doesn't exist
13:40
<
chekcmate >
1359466079.464227 open("test_file", O_RDWR|O_CREAT|O_APPEND, 0666) = 3 1359466079.464340 write(3, "HI, THIS IS A TEST!", 19) = 19
13:41
<
chekcmate >
open("test_file", O_RDWR|O_CREAT|O_APPEND, 0666) = 3
13:41
<
chekcmate >
write(3, "HI, THIS IS A TEST!", 19) = 19
13:41
<
chekcmate >
those are 2 typical lines I get when testing it with a simple writer
13:41
<
chekcmate >
and it's all logical n stuff, totally understandable
13:42
<
chekcmate >
that's only a simple writer were I can look at all files without getting eye-cancer
13:42
<
chekcmate >
I'm worried I don't get the open() <-> write() connection together
13:43
<
chekcmate >
may I show you one more thing?
13:43
<
judofyr >
chekcmate: also: you need to track close()
13:43
<
chekcmate >
ok, will do
13:44
mistym has joined #ruby-lang
13:44
gix has joined #ruby-lang
13:44
maxmanders has joined #ruby-lang
13:44
<
chekcmate >
these are two example lists I get, tracing "gnome-terminal" and exiting with "exit" (as you can see below)
13:44
<
chekcmate >
when I now match my write()-only file descr. with that O_RDWR list, many items on RDWR won't have a file descr.
13:45
<
judofyr >
probably because it only reads
13:45
<
chekcmate >
and that's the point: "probably"
13:46
<
chekcmate >
I think so too and I don't have any other explanation either, but that's a pretty daring statement...
13:47
<
judofyr >
there can be many reasons: they could use it to check if the file exists (remember, open() will fail if the file doesn't exists)
13:47
<
chekcmate >
perhaps filtering for O_RDWR is bad... maybe O_APPEND or something makes more sense
13:47
<
judofyr >
maybe they only open the files in case, but in this example they don't need to use them ´
13:47
<
chekcmate >
ah, so this can also be a method on monitoring if files exist
13:48
<
chekcmate >
judofyr: alright; I don't wanna bother you anymore, took too much of your time today already!
13:49
<
chekcmate >
thanks again ^^
13:50
mistym has quit [Remote host closed the connection]
13:50
<
judofyr >
chekcmate: any time ;)
13:51
tomzx_mac has joined #ruby-lang
13:52
fsvehla has joined #ruby-lang
13:53
vlad_starkov has joined #ruby-lang
13:54
__BigO__ has joined #ruby-lang
13:55
vesan has quit [Read error: Connection reset by peer]
13:55
vesan has joined #ruby-lang
13:58
jrafanie has quit [Quit: jrafanie]
14:00
Bearproof has joined #ruby-lang
14:01
Bearproof has left #ruby-lang [#ruby-lang]
14:02
fsvehla has quit [Read error: Connection reset by peer]
14:02
outoftime has joined #ruby-lang
14:06
fsvehla has joined #ruby-lang
14:07
mistym has joined #ruby-lang
14:07
mistym has quit [Changing host]
14:07
mistym has joined #ruby-lang
14:10
sailias has joined #ruby-lang
14:11
dkannan has quit [Ping timeout: 256 seconds]
14:11
o0mds0o has joined #ruby-lang
14:13
jtoy has quit [Quit: jtoy]
14:15
james_penguin has joined #ruby-lang
14:16
o0mds0o has quit [Ping timeout: 252 seconds]
14:19
james_penguin has left #ruby-lang [#ruby-lang]
14:21
imajes has quit [Excess Flood]
14:22
thisirs has joined #ruby-lang
14:23
imajes has joined #ruby-lang
14:23
Bearproof has joined #ruby-lang
14:26
melter has joined #ruby-lang
14:28
<
zzak >
guten morgen
14:28
<
chekcmate >
juten tach
14:29
fsvehla has quit [Quit: fsvehla]
14:29
tomzx_mac has quit [Read error: Operation timed out]
14:31
fsvehla has joined #ruby-lang
14:31
dhruvasagar has joined #ruby-lang
14:32
havenwood has joined #ruby-lang
14:32
Bearproof has left #ruby-lang [#ruby-lang]
14:32
<
judofyr >
morgen zzak
14:35
<
imperator >
bonjour
14:36
<
zzak >
new debugger api
14:36
<
zzak >
its still experimental
14:37
<
zzak >
check out the tests tho
14:38
jrafanie has joined #ruby-lang
14:39
carloslopes has joined #ruby-lang
14:39
unlikely_monkey has joined #ruby-lang
14:40
synthetix has joined #ruby-lang
14:41
guns has quit [Ping timeout: 252 seconds]
14:42
o0mds0o has joined #ruby-lang
14:42
banister`sleep has left #ruby-lang [#ruby-lang]
14:42
banisterfiend has joined #ruby-lang
14:42
<
banisterfiend >
zzak: looks more like a fix to the previous one which was segv-city
14:43
Guest__ has quit [Quit: Computer has gone to sleep.]
14:43
havenwood has quit [Remote host closed the connection]
14:43
jstemmer has joined #ruby-lang
14:44
sepp2k has joined #ruby-lang
14:45
banisterfiend has quit [Remote host closed the connection]
14:46
<
zzak >
theres a public api now
14:46
<
zzak >
see ext/-test-/debug
14:46
jtoy has joined #ruby-lang
14:47
o0mds0o has quit [Ping timeout: 276 seconds]
14:48
jxie has joined #ruby-lang
14:50
unlikely_monkey has quit [Remote host closed the connection]
14:51
tonni has quit [Remote host closed the connection]
14:51
mistym has quit [Remote host closed the connection]
14:52
banisterfiend has joined #ruby-lang
14:52
mistym has joined #ruby-lang
14:52
mistym has quit [Changing host]
14:52
mistym has joined #ruby-lang
14:55
chimkan has joined #ruby-lang
14:55
forrest has joined #ruby-lang
14:56
mistym has quit [Remote host closed the connection]
14:58
jrafanie has quit [Quit: jrafanie]
14:58
megha has quit [Ping timeout: 255 seconds]
14:59
heftig has quit [Ping timeout: 245 seconds]
14:59
maxmanders has quit [Ping timeout: 252 seconds]
14:59
<
banisterfiend >
zzak: i wonder if that's only there for the tests rather than for general access
14:59
<
banisterfiend >
looks like it could just be for tests
15:00
<
banisterfiend >
anyway, just a matter of copy/pasting that code into a C ext and sticking it in a gem
15:00
xalei has quit [Remote host closed the connection]
15:00
<
zzak >
he already wrote a small C ext
15:01
<
zzak >
require '-test-/debug'
15:02
<
judofyr >
zzak: seems like an internal test
15:03
<
zzak >
judofyr: banisterfiend: its definitely just for testing / experiment, but im still excited to see it in ruby
15:04
dhruvasagar has quit [Ping timeout: 255 seconds]
15:04
<
zzak >
it gives us something to toy with
15:05
chimkan has quit [Ping timeout: 252 seconds]
15:05
<
banisterfiend >
zzak: well, u could have been playing with binding_of_caller already, which is pretty much the same thing ;)
15:06
dhruvasagar has joined #ruby-lang
15:06
jtoy has quit [Quit: jtoy]
15:08
mistym has joined #ruby-lang
15:08
mistym has joined #ruby-lang
15:08
mistym has quit [Changing host]
15:08
chimkan has joined #ruby-lang
15:09
<
injekt >
judofyr: some guys killed the line in our neighbourhood :(
15:09
<
judofyr >
injekt: good job
15:09
fsvehla has quit [Read error: Connection reset by peer]
15:09
richardburton has joined #ruby-lang
15:10
<
zzak >
banisterfiend: nice! im glad there's so many options
15:10
<
zzak >
it will be nice to have a good debugger in MRI, even if it's only an API for gem
15:11
imperator has left #ruby-lang ["Leaving"]
15:13
o0mds0o has joined #ruby-lang
15:13
chimkan has quit [Read error: Connection reset by peer]
15:13
<
banisterfiend >
so DebugInspector isn't an alternative to binding_of_caller, it's the successor, and hopefully a tiny bit more stable ;)
15:13
<
banisterfiend >
though that hasn't been the case up till now, but it looks like he may have ironed out the segfaults in his last commit
15:13
faces has quit [Ping timeout: 244 seconds]
15:13
fsvehla has joined #ruby-lang
15:14
richardburton has quit [Ping timeout: 240 seconds]
15:14
gnufied has quit [Quit: Leaving.]
15:14
chimkan has joined #ruby-lang
15:16
mephux has quit [Excess Flood]
15:16
<
zzak >
we have to help test it and find any more issues
15:17
andrewhl has joined #ruby-lang
15:17
o0mds0o has quit [Ping timeout: 252 seconds]
15:17
faces has joined #ruby-lang
15:18
jtoy has joined #ruby-lang
15:18
gustavnils has joined #ruby-lang
15:18
ryanv-raptor has joined #ruby-lang
15:18
mephux has joined #ruby-lang
15:20
tonni has joined #ruby-lang
15:22
gnufied has joined #ruby-lang
15:22
havenwood has joined #ruby-lang
15:23
maxmanders has joined #ruby-lang
15:23
g0bl1n has joined #ruby-lang
15:28
earthquake has quit [Read error: Connection reset by peer]
15:28
jtoy has quit [Quit: jtoy]
15:28
earthquake has joined #ruby-lang
15:31
<
injekt >
zzak: are you east coast?
15:31
<
zzak >
injekt: yessir
15:32
drguell has joined #ruby-lang
15:32
<
injekt >
ah weird thought you were west coast
15:32
<
drguell >
son of beach
15:32
<
injekt >
have fun tomorrow and publish your slides online! :)
15:32
Swimming_Bird has joined #ruby-lang
15:32
<
drguell >
unsane people
15:33
<
drguell >
insane instead
15:33
<
zzak >
injekt: thank you! i am super nervous
15:33
<
gnufied >
zzak: what you are presenting on?
15:33
<
injekt >
zzak: you'll be fine, just have fun :)
15:34
drguell has quit [Client Quit]
15:34
jtoy has joined #ruby-lang
15:34
<
gnufied >
yeah. make fun. you will be fine
15:34
<
gnufied >
in order make fun of : PHP, Java and Rails
15:34
havenwood has quit [Remote host closed the connection]
15:34
<
zzak >
this is my first talk, and i didnt have as much time to prepare as i'd like
15:35
<
zzak >
gnufied: title is contributing to ruby
15:35
<
workmad3 >
gnufied: you missed making fun of windows in between java and rails :P
15:35
wallerdev has joined #ruby-lang
15:35
<
gnufied >
zzak: sounds awesome. post slides!
15:36
<
gnufied >
workmad3: :-)
15:36
esad has quit [Quit: Computer has gone to sleep.]
15:37
drguell has joined #ruby-lang
15:37
<
drguell >
you don't have mother
15:37
drguell has quit [Client Quit]
15:37
esad has joined #ruby-lang
15:37
bantic has joined #ruby-lang
15:38
banisterfiend has quit [Remote host closed the connection]
15:39
synthetix has quit [Ping timeout: 272 seconds]
15:39
<
manveru >
i.... don't!?
15:39
<
manveru >
omg, she lied to me all my life
15:39
<
chekcmate >
he just came to tell you this...
15:39
<
chekcmate >
sorry bro
15:41
<
andrewvos >
WHO WAS HE TALKING TO
15:42
<
andrewvos >
WE WILL NEVER KNOW
15:43
<
chekcmate >
whois 213.0.38.56 and you will somehow get your answer :)
15:43
wyhaines has joined #ruby-lang
15:43
o0mds0o has joined #ruby-lang
15:44
imajes has quit [Excess Flood]
15:45
xcombelle has quit [Ping timeout: 255 seconds]
15:45
scampbell has joined #ruby-lang
15:46
rogomon has joined #ruby-lang
15:47
imajes has joined #ruby-lang
15:47
o0mds0o has quit [Ping timeout: 244 seconds]
15:48
jonahR has joined #ruby-lang
15:48
<
injekt >
I have Date#advance but need an antonym that doesn't suck, it's used like date.advance(days: 3, months: 1); any ideas?
15:49
<
judofyr >
injekt: #retreat
15:49
vlad_starkov has quit [Remote host closed the connection]
15:50
<
chekcmate >
is yorickpeterse still here?
15:50
<
chekcmate >
ohi injekt
15:50
<
yorickpeterse >
yes
15:50
srbaker has joined #ruby-lang
15:50
<
chekcmate >
you posted a method yesterday, improving mine
15:51
<
chekcmate >
i modified it and wanted to ask if its still ok as it is
15:51
<
yorickpeterse >
sure
15:52
jtoy has quit [Quit: jtoy]
15:52
fsvehla has quit [Quit: fsvehla]
15:52
jtoy has joined #ruby-lang
15:52
<
injekt >
judofyr: better than anything I had
15:53
<
injekt >
chekcmate: ohai
15:53
<
yorickpeterse >
`Dir[File.join("#{Dir.pwd}/trace", '/trace.*')].each` should be without `.each`
15:53
<
yorickpeterse >
Dir[] already yields the block for you
15:53
<
judofyr >
injekt: still sounds a bit silly
15:53
<
injekt >
judofyr: mine was 'behind' :/
15:53
<
judofyr >
yorickpeterse: it does? I thought it only was Dir.glob that yielded
15:53
<
injekt >
yeah Dir::[] doesn't yield
15:53
agile has quit [Ping timeout: 252 seconds]
15:53
<
chekcmate >
yorickpeterse: no, I get unexpected kDO
15:54
<
injekt >
I believe that's a syntax error anyway
15:54
<
yorickpeterse >
judofyr: chekcmate eh might be
15:54
<
yorickpeterse >
I confuse them as well sometimes
15:54
<
yorickpeterse >
and `File.open(path, 'r').read.each` should be `File.open(path, 'r').each_line` probably
15:55
<
chekcmate >
heh, you replaced my Dir.glob - that's why I wanted to ask again ^^
15:55
fsvehla has joined #ruby-lang
15:55
<
injekt >
yeah [] methods can't accept blocks
15:55
* chekcmate
has to learn where to use each and each_line
15:55
<
judofyr >
chekcmate: even better: File.open(path, 'r') do |f| f.each_line do |line| end end
15:55
<
yorickpeterse >
Otherwise you'll probably end up iterating over the characters of the entire file
15:55
<
yorickpeterse >
instead of each line
15:55
<
judofyr >
chekcmate: that will automatically close the file properly too
15:55
<
whitequark >
String doesn't have #each
15:56
<
whitequark >
for precisely that reason: confusion
15:56
<
injekt >
each and each_line are synonyms
15:56
<
judofyr >
injekt: tfd.com ftw
15:56
<
injekt >
chekcmate: so dont worry about that
15:56
<
injekt >
judofyr: yeah seems much nicer
15:56
<
injekt >
judofyr: also til about Date._parse and it sucks :D
15:56
<
judofyr >
injekt: :D
15:56
<
injekt >
been going through the C code in date_core
15:57
<
injekt >
seeing what I can leverage
15:57
<
judofyr >
injekt: auto-parsing dates sucks anyway. I actually prefer Perl's explicit DateTime parsers
15:57
<
judofyr >
injekt: 95% of the time you know the format of what you're parsing
15:57
<
judofyr >
and the 5% rest, you want something smarter than Date.parse
15:57
<
chekcmate >
judofyr: tracefiles.each do |file|; File.open(file, "r").each_line do |line| <== that's what I had before yorick helped me
15:57
<
injekt >
yeah I agree, but turns out I'm creating that smarter thing :(
15:58
<
judofyr >
injekt: :)
15:58
<
injekt >
You should use a block with File.open chekcmate
15:58
<
injekt >
not sure if that'll leave a dangling descriptor or not
15:58
<
chekcmate >
injekt: so no Dir[File.join...]?
15:58
<
injekt >
(using a block will close the file when your block is done)
15:59
<
injekt >
chekcmate: no File.open(..) { |f| f.each_line { ... } }
15:59
<
chekcmate >
but I have several files...
15:59
|Vargas| has quit [Quit: ...]
15:59
<
injekt >
yeah I meant do that for each file
15:59
<
chekcmate >
ah ok, now I get it
15:59
<
chekcmate >
I have that :)
15:59
gnufied has quit [Quit: Leaving.]
15:59
<
injekt >
ah judofyr has already mentioned the block form of open
15:59
rogomon_ has joined #ruby-lang
15:59
<
chekcmate >
too many good answers here ^^
16:00
<
judofyr >
chekcmate: I'd say that Dir[…].each { } and Dir.glob { } are both acceptable choices. don't think the community prefers one style over the other.
16:00
enebo has joined #ruby-lang
16:00
<
injekt >
yeah, I probably see Dir[] more though
16:00
<
chekcmate >
like there are many ways to rome, aight?
16:00
<
judofyr >
chekcmate: I like Dir[…].each because it's easy to refactor into Dir[…].map later
16:00
<
injekt >
chekcmate: ruby creates many
16:01
<
judofyr >
sure, but nobody uses Dir.entries
16:01
<
injekt >
because it sucks
16:01
<
judofyr >
some ways are more popular than others ;)
16:01
<
injekt >
nobody cares about . and ..
16:01
<
judofyr >
chekcmate: so, [] and glob is fine. stay away from .entries ;)
16:01
<
judofyr >
that should lead you to rome in one piece
16:02
<
injekt >
then you have to fight caesar
16:03
rogomon has quit [Ping timeout: 272 seconds]
16:03
<
injekt >
judofyr: Date#recede
16:03
<
injekt >
"To move back or away from a limit, point, or mark"
16:03
spinagon has joined #ruby-lang
16:04
dhruvasagar has quit [Ping timeout: 255 seconds]
16:05
rippa has quit [Ping timeout: 240 seconds]
16:05
havenwood has joined #ruby-lang
16:05
wallerdev has quit [Quit: wallerdev]
16:06
dhruvasagar has joined #ruby-lang
16:07
* zzak
feels bad for . and ..
16:07
<
injekt >
do not pity them!
16:08
<
injekt >
ok I'm just gonna use ragel for this crap
16:08
<
judofyr >
injekt: ooo. cool.
16:08
adambeynon has quit [Ping timeout: 245 seconds]
16:08
<
judofyr >
injekt: Ragel 6 is coming btw
16:08
<
injekt >
I have a feeling it's going to hurt my head
16:09
<
injekt >
I've hardly any experience with it
16:09
<
chekcmate >
it could also hurt your butt, keep that in mind!
16:10
richardburton has joined #ruby-lang
16:10
<
injekt >
it looks like ruby parses all their date stuff with regexp
16:10
<
injekt >
home_run uses ragel
16:11
bg451 has joined #ruby-lang
16:11
<
injekt >
and regexp
16:12
<
injekt >
only about ~6k lines of c
16:12
<
injekt >
this should be a walk in the park
16:12
solars has quit [Ping timeout: 252 seconds]
16:13
mercwithamouth has joined #ruby-lang
16:14
<
chekcmate >
I need someone like injekt in my basement... >_>
16:14
o0mds0o has joined #ruby-lang
16:14
richardburton has quit [Ping timeout: 276 seconds]
16:15
jonahR has quit [Quit: jonahR]
16:17
chekcmate has quit [Quit: Page closed]
16:17
jrafanie has joined #ruby-lang
16:17
jrafanie has quit [Client Quit]
16:17
Bearproof has joined #ruby-lang
16:18
Bearproof has quit [Client Quit]
16:18
o0mds0o has quit [Ping timeout: 246 seconds]
16:18
<
injekt >
judofyr: wait version 6? im using v 6.7
16:19
<
judofyr >
injekt: hm. I think I mean Ragel 7
16:19
<
judofyr >
"I'm closing in on a reference code generator for Ragel 7. This major version of Ragel has a completely rewritten "condition" implementation."
16:20
zhul_mechanos has joined #ruby-lang
16:21
<
injekt >
wow that generated ruby is.. pretty
16:21
<
whitequark >
injekt: huh?
16:21
<
whitequark >
we're talking about ragel right?
16:22
sailias1 has joined #ruby-lang
16:22
<
whitequark >
ragel 6's ruby codegen is a piece of crap
16:22
<
injekt >
I forgot to press my sarcasm button, I guess it wasn't obvious
16:22
<
whitequark >
I thought that 7 has had significant improvements.
16:22
<
injekt >
I'm still using 6 too
16:24
sailias has quit [Ping timeout: 252 seconds]
16:24
wallerdev has joined #ruby-lang
16:25
gnufied has joined #ruby-lang
16:25
sailias1 has quit [Client Quit]
16:26
sailias has joined #ruby-lang
16:27
<
injekt >
well I planned on doing this for speed but I'm not sure it's going to make too much difference
16:27
<
whitequark >
injekt: "this" as in ?
16:28
<
judofyr >
whitequark: Date time parsing ´
16:28
adambeynon has joined #ruby-lang
16:28
<
whitequark >
expect the ragel parser be 2-3 times slower after some optimization
16:28
<
injekt >
I'm writing a replacement for Chronic, and have been for months, I have rewrites using different implementations
16:28
<
whitequark >
that's what I had after rewriting RP's lexer
16:29
<
whitequark >
I've also just got an idea of how to make it substantially faster
16:29
<
judofyr >
whitequark: you can always compile it to a C extension though
16:29
<
whitequark >
judofyr: not realistically
16:29
<
judofyr >
whitequark: huh? oh, you mean for your usecase?
16:29
alvaro_o has joined #ruby-lang
16:29
<
judofyr >
or generally?
16:30
<
whitequark >
judofyr: for RP. it'd require tons of stuff I'd rather not deal with
16:30
<
whitequark >
also, jruby.
16:30
<
judofyr >
anyway gotta go
16:30
judofyr has quit [Remote host closed the connection]
16:30
megha has joined #ruby-lang
16:31
bzalasky has joined #ruby-lang
16:32
sailias has quit [Read error: Connection reset by peer]
16:32
gix has quit [Ping timeout: 264 seconds]
16:32
tonni has quit [Remote host closed the connection]
16:32
sailias has joined #ruby-lang
16:32
banisterfiend has joined #ruby-lang
16:32
<
whitequark >
i wanna write an SQL RDBMS in ruby
16:33
jtoy has quit [Quit: jtoy]
16:33
jtoy has joined #ruby-lang
16:34
kentos has joined #ruby-lang
16:35
methods has joined #ruby-lang
16:35
methods has left #ruby-lang [#ruby-lang]
16:35
Mon_Ouie has joined #ruby-lang
16:36
RubyHead has joined #ruby-lang
16:36
flujan has joined #ruby-lang
16:36
<
flujan >
hello guys. Which is the difference between $stdin STDIN and @stdin?
16:37
gix has joined #ruby-lang
16:37
<
toretore >
the first two exist, the third doesn't
16:37
<
flujan >
toretore: lol… so between the two that exists? Any difference?
16:37
<
toretore >
$stdin.object_id == STDIN.object_id
16:38
Connecti0n has joined #ruby-lang
16:38
<
injekt >
you can reassign $stdin then assign it back to STDIN
16:39
Kallikanzarid has joined #ruby-lang
16:39
srbaker has quit [Ping timeout: 252 seconds]
16:39
<
injekt >
although you can just use reopen anyway so meh
16:39
Connecti0n has quit [Client Quit]
16:40
<
whitequark >
it is expected that $stdin will be used for temporary redirection of standard streams
16:40
<
whitequark >
like if you want to capture the output to StringIO
16:40
zmack has quit [Remote host closed the connection]
16:40
<
whitequark >
but STDIN shouldn't be changed (it's a constant after all), and could only be reopened
16:40
<
whitequark >
which means that 1) you can only hijack it with an OS file descriptor
16:40
<
whitequark >
2) the changes will be inherited by the process you spawn
16:43
JohnBat26 has joined #ruby-lang
16:45
o0mds0o has joined #ruby-lang
16:47
gouthamgandhi has left #ruby-lang [#ruby-lang]
16:48
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
16:48
fsvehla has quit [Quit: fsvehla]
16:49
gouthamgandhi has joined #ruby-lang
16:49
o0mds0o has quit [Ping timeout: 272 seconds]
16:50
Kuifje has joined #ruby-lang
16:50
esad has quit [Quit: Computer has gone to sleep.]
16:51
fsvehla has joined #ruby-lang
16:51
dhruvasagar has quit [Ping timeout: 245 seconds]
16:51
bzalasky has quit [Remote host closed the connection]
16:53
dhruvasagar has joined #ruby-lang
16:53
g0bl1n has quit [Quit: g0bl1n]
16:55
gnufied has quit [Quit: Leaving.]
16:58
jtoy has quit [Quit: jtoy]
16:59
datanoise has joined #ruby-lang
16:59
jonahR has joined #ruby-lang
17:01
alvaro_o has quit [Read error: Connection reset by peer]
17:01
alvaro_o has joined #ruby-lang
17:03
hakunin_ has quit [Ping timeout: 256 seconds]
17:04
bg451 has quit [Quit: bg451]
17:06
Rarrikins has quit [Ping timeout: 240 seconds]
17:09
sepp2k has quit [Remote host closed the connection]
17:10
richardburton has joined #ruby-lang
17:10
jrafanie has joined #ruby-lang
17:11
jrafanie has quit [Client Quit]
17:12
brianpWins has joined #ruby-lang
17:14
sailias has quit [Quit: Leaving.]
17:14
sailias1 has joined #ruby-lang
17:14
vlad_starkov has joined #ruby-lang
17:15
richardburton has quit [Ping timeout: 252 seconds]
17:15
o0mds0o has joined #ruby-lang
17:16
Swimming_Bird has joined #ruby-lang
17:17
gregmore_ has joined #ruby-lang
17:18
gregmore_ has quit [Client Quit]
17:18
gregmore_ has joined #ruby-lang
17:19
ryanv-raptor has quit [Quit: Leaving.]
17:20
bantic has quit [Ping timeout: 246 seconds]
17:20
o0mds0o has quit [Ping timeout: 255 seconds]
17:22
srbaker has joined #ruby-lang
17:26
fsvehla has quit [Quit: fsvehla]
17:26
vlad_starkov has quit [Ping timeout: 276 seconds]
17:27
vlad_starkov has joined #ruby-lang
17:27
ryanv-raptor has joined #ruby-lang
17:29
sailias1 has quit [Quit: Leaving.]
17:30
sailias has joined #ruby-lang
17:30
amateurhuman has joined #ruby-lang
17:31
sailias1 has joined #ruby-lang
17:33
megha has quit [Quit: WeeChat 0.4.0]
17:34
io_syl has joined #ruby-lang
17:35
sailias has quit [Ping timeout: 248 seconds]
17:36
__butch__ has joined #ruby-lang
17:36
bg451 has joined #ruby-lang
17:37
sulo has joined #ruby-lang
17:38
Rarrikins has joined #ruby-lang
17:38
peppyheppy has joined #ruby-lang
17:44
richardburton has joined #ruby-lang
17:45
jtoy has joined #ruby-lang
17:45
srbaker has quit [Quit: Computer has gone to sleep.]
17:46
enebo has quit [Quit: enebo]
17:46
flujan has quit [Quit: flujan]
17:46
o0mds0o has joined #ruby-lang
17:48
dr_bob has quit [Quit: Leaving.]
17:48
imajes has quit [Excess Flood]
17:50
imajes has joined #ruby-lang
17:51
o0mds0o has quit [Ping timeout: 276 seconds]
17:53
wallerdev has quit [Quit: wallerdev]
17:55
carloslopes has quit [Remote host closed the connection]
17:57
chimkan_ has joined #ruby-lang
17:57
hakunin has joined #ruby-lang
17:57
richardburton has quit [Quit: Leaving.]
17:58
__butch__ has quit [Quit: Leaving.]
17:58
richardburton has joined #ruby-lang
17:58
retro|cz has quit [Ping timeout: 256 seconds]
18:00
Uranio has joined #ruby-lang
18:01
chimkan has quit [Ping timeout: 272 seconds]
18:01
chimkan_ is now known as chimkan
18:01
sush24 has quit [Quit: This computer has gone to sleep]
18:02
cmyk has joined #ruby-lang
18:03
towski has joined #ruby-lang
18:04
cmyk has quit [Client Quit]
18:04
tdy has quit [Ping timeout: 245 seconds]
18:04
b1rkh0ff has quit [Ping timeout: 240 seconds]
18:05
bg451 has quit [Quit: bg451]
18:05
b1rkh0ff has joined #ruby-lang
18:05
nguerin_ has quit [Remote host closed the connection]
18:06
__butch__ has joined #ruby-lang
18:07
idkazuma has quit [Remote host closed the connection]
18:08
ruurd has joined #ruby-lang
18:09
ruurd has quit [Client Quit]
18:10
ruurd has joined #ruby-lang
18:11
ruurd has quit [Client Quit]
18:11
gregmore_ has quit []
18:11
gregmoreno has joined #ruby-lang
18:12
sn0wb1rd has joined #ruby-lang
18:13
esad has joined #ruby-lang
18:14
jrafanie has joined #ruby-lang
18:14
sulo has quit [Remote host closed the connection]
18:15
nguerin has joined #ruby-lang
18:16
tdy has joined #ruby-lang
18:17
o0mds0o has joined #ruby-lang
18:17
sush24 has joined #ruby-lang
18:19
nXqd_ has quit [Ping timeout: 244 seconds]
18:19
bg451 has joined #ruby-lang
18:21
o0mds0o has quit [Read error: Connection reset by peer]
18:21
o0mds0o_ has joined #ruby-lang
18:22
jrafanie has quit [Quit: jrafanie]
18:23
o0mds0o_ has quit [Remote host closed the connection]
18:23
sush24 has quit [Ping timeout: 256 seconds]
18:24
nXqd has joined #ruby-lang
18:27
Nisstyre-laptop has joined #ruby-lang
18:28
rogomon_ has quit [Remote host closed the connection]
18:28
jrafanie has joined #ruby-lang
18:29
dhruvasagar has quit [Ping timeout: 255 seconds]
18:32
Nisstyre-laptop has quit [Max SendQ exceeded]
18:33
fsvehla has joined #ruby-lang
18:35
s1n4 has joined #ruby-lang
18:36
s1n4 has quit [Client Quit]
18:36
Nisstyre-laptop has joined #ruby-lang
18:38
bantic has joined #ruby-lang
18:39
carloslopes has joined #ruby-lang
18:40
megha has joined #ruby-lang
18:40
o0mds0o has joined #ruby-lang
18:41
o0mds0o has quit [Remote host closed the connection]
18:42
MaddinXx has joined #ruby-lang
18:42
bantic has quit [Ping timeout: 252 seconds]
18:43
neocoin has quit [Remote host closed the connection]
18:44
maxmanders has quit [Quit: Computer has gone to sleep.]
18:44
xcombelle has joined #ruby-lang
18:44
sulo has joined #ruby-lang
18:46
Nisstyre-laptop has quit [Remote host closed the connection]
18:47
bantic has joined #ruby-lang
18:48
therod has joined #ruby-lang
18:49
cultureulterior_ has quit [Quit: cultureulterior_]
18:50
neocoin has joined #ruby-lang
18:51
workmad3 has quit [Ping timeout: 256 seconds]
18:53
Uranio has quit [Remote host closed the connection]
18:53
sulo has quit [Ping timeout: 245 seconds]
18:53
tdy has quit [Ping timeout: 255 seconds]
18:54
chimkan_ has joined #ruby-lang
18:57
chimkan has quit [Ping timeout: 272 seconds]
18:57
chimkan_ is now known as chimkan
18:58
rogomon has joined #ruby-lang
18:58
vlad_starkov has quit [Remote host closed the connection]
18:59
banisterfiend has quit [Read error: Connection reset by peer]
19:00
srbaker has joined #ruby-lang
19:00
__BigO__ has quit [Remote host closed the connection]
19:01
Bearproof has joined #ruby-lang
19:02
mrsolo has joined #ruby-lang
19:02
Bearproof has left #ruby-lang [#ruby-lang]
19:03
benanne has joined #ruby-lang
19:05
mistym_ has joined #ruby-lang
19:06
bantic has quit [Ping timeout: 272 seconds]
19:06
jtoy has quit [Quit: jtoy]
19:06
tdy has joined #ruby-lang
19:08
almost9 has joined #ruby-lang
19:09
banisterfiend has joined #ruby-lang
19:09
bg451 has quit [Quit: bg451]
19:13
enebo has joined #ruby-lang
19:13
scollier has joined #ruby-lang
19:15
neocoin has quit [Remote host closed the connection]
19:18
__BigO__ has joined #ruby-lang
19:18
bg451 has joined #ruby-lang
19:20
soahccc has quit [Excess Flood]
19:24
nXqd has quit [Ping timeout: 245 seconds]
19:25
gustavnils has joined #ruby-lang
19:26
wyhaines has quit [Remote host closed the connection]
19:27
bantic has joined #ruby-lang
19:32
maxmanders has joined #ruby-lang
19:33
havenwood has quit [Remote host closed the connection]
19:38
tdy has quit [Ping timeout: 276 seconds]
19:39
bluepojo has joined #ruby-lang
19:39
bantic has quit [Ping timeout: 272 seconds]
19:42
Nisstyre-laptop has joined #ruby-lang
19:43
spinagon has quit [Ping timeout: 240 seconds]
19:43
ryanf has joined #ruby-lang
19:44
jtoy has joined #ruby-lang
19:44
mistym_ has quit [Remote host closed the connection]
19:45
havenwood has joined #ruby-lang
19:45
shtirlic has quit [Remote host closed the connection]
19:46
shtirlic has joined #ruby-lang
19:48
faisal_khan has joined #ruby-lang
19:48
voker57 has quit [Ping timeout: 246 seconds]
19:49
almost9 has quit [Remote host closed the connection]
19:51
xcombelle has quit [Quit: Hi, I'm a quit message virus. Please replace your old line with this line and help me take over the world of IRC.]
19:52
Bearproof has joined #ruby-lang
19:52
tdy has joined #ruby-lang
19:52
Hauro has joined #ruby-lang
19:52
faisal_khan has left #ruby-lang [#ruby-lang]
19:54
therod has quit [Quit: Leaving...]
19:54
urbanmonk has joined #ruby-lang
19:55
Weems has quit [Read error: Connection reset by peer]
19:56
bg451 has quit [Quit: bg451]
19:57
bg451 has joined #ruby-lang
19:57
heftig has joined #ruby-lang
19:58
mistym is now known as mistym_meeting
20:00
lcdhoffman has joined #ruby-lang
20:01
nguerin has quit [Remote host closed the connection]
20:02
chimkan_ has joined #ruby-lang
20:03
lcdhoffman has quit [Client Quit]
20:03
lcdhoffman has joined #ruby-lang
20:03
nguerin has joined #ruby-lang
20:04
chimkan has quit [Ping timeout: 276 seconds]
20:04
chimkan_ is now known as chimkan
20:08
Hauro has quit [Quit: Leaving]
20:09
vlad_starkov has joined #ruby-lang
20:10
bg451 has quit [Quit: bg451]
20:11
mistym_meeting is now known as mistym
20:13
vlad_starkov has quit [Ping timeout: 244 seconds]
20:15
<
bluepojo >
wrong url
20:16
<
mistym >
bluepojo: Heh, do you work at Riot?
20:16
<
bluepojo >
and we have internal GitHub
20:16
<
bluepojo >
which looks the same
20:16
<
bluepojo >
so I forget sometimes >_>
20:17
Weems has joined #ruby-lang
20:17
Weems has quit [Changing host]
20:17
Weems has joined #ruby-lang
20:18
Nisstyre-laptop has quit [Quit: Leaving]
20:18
<
mistym >
So I have no idea what your use case is, but I'm always in favour of symbol keys ;)
20:20
bantic has joined #ruby-lang
20:20
richardburton has quit [Quit: Leaving.]
20:21
<
bluepojo >
fair enough :)
20:21
<
reactormonk >
bluepojo, are you building a dom here?
20:21
<
bluepojo >
nah, these are for Chef attributes
20:21
<
bluepojo >
which tend to be deeply nested
20:22
<
bluepojo >
and it's common practice to represent them as dot separated strings
20:22
<
bluepojo >
so I need a method to break them up into the real hash
20:23
Swimming_Bird has quit [Ping timeout: 240 seconds]
20:23
<
reactormonk >
bluepojo, well, what does chef take as keys? symbols or strings?
20:25
<
reactormonk >
bluepojo, nah, that api is too subtle. Choose one and return it in either case.
20:25
<
bluepojo >
fair enough
20:25
<
reactormonk >
bluepojo, I'd choose symbols.
20:26
Swimming_Bird has joined #ruby-lang
20:26
<
reactormonk >
and a string as input, since you operate on that one.
20:26
workmad3 has joined #ruby-lang
20:28
<
manveru >
[2] pry(main)> 'a.b.c'.split('.').inject(h = {}){|s,v| s[v] = {} }; h
20:28
<
manveru >
=> {"a"=>{"b"=>{"c"=>{}}}}
20:29
bg451 has joined #ruby-lang
20:30
<
whitequark >
manveru: each_with_object, dammit
20:30
<
whitequark >
inject = reduce.
20:30
<
manveru >
try it with each_with_object
20:30
<
manveru >
i know, and reduce is what you need for this
20:31
<
whitequark >
ooh right
20:31
<
manveru >
it doesn't reuse the same object, it goes deeper
20:31
<
whitequark >
sorry then
20:31
<
reactormonk >
optionally {}.tap{|h| 'a.b.c'.split('.').reduce(h){|s,v| s[v] = {} } }
20:31
<
whitequark >
but still it's not a good code IMO
20:31
kotp has joined #ruby-lang
20:31
<
whitequark >
because, as you've just seen, it is quite unclear what the actual purpose is.
20:31
<
whitequark >
whatever
20:31
nXqd has joined #ruby-lang
20:32
<
reactormonk >
whitequark, that's what comments are for
20:32
<
injekt >
tap makes me want to vomit
20:32
<
whitequark >
reactormonk: I find it that when I assume that people don't read comments, my code gets way better
20:32
<
whitequark >
and it's not that I'm that far from truth.
20:32
<
manveru >
[6] pry(main)> h = n = {}; 'a.b.c'.split('.').each{|s| n[s] = (n = {}) }; h
20:32
<
andrewvos >
whitequark: I am liking you more and more every day.
20:33
<
manveru >
=> {"a"=>{"b"=>{"c"=>{}}}}
20:33
<
manveru >
is that clearer? :P
20:34
<
whitequark >
manveru: the unusual constructs force you to pay attention. hence, in a certian way, yes.
20:34
<
whitequark >
I might've written that in any of these ways, to be sincere
20:34
mercwithamouth has quit [Ping timeout: 245 seconds]
20:35
tonni has joined #ruby-lang
20:35
<
whitequark >
andrewvos: me, today, earlier; < whitequark> I find it that every language designer should have his #0 mantra as follows: "People are lazy and ignorant."
20:36
<
mistym >
whitequark: Very true.
20:36
<
whitequark >
eg did you know that 1 << 32 // => 1 in C?
20:36
<
whitequark >
oh I forgot to say that it's only 1 on x86
20:36
<
whitequark >
and on powerpc it'd be 0.
20:36
<
pabs >
i think that's undefined in C
20:36
<
whitequark >
(assuming 32-bit int, of course.)
20:36
nXqd has quit [Ping timeout: 276 seconds]
20:36
<
whitequark >
pabs: indeed, and that's broken.
20:37
<
whitequark >
the #1 mantra is: "Correctness > Speed."
20:37
<
pabs >
as in, you may get 1 on a 32-bit architecture, but that's architecture, compiler, and optimization dependent
20:37
<
whitequark >
which isn't to say that there shouldn't be any fast, unsafe operations. it's just that they should not be the default ones.
20:37
voker57 has joined #ruby-lang
20:37
voker57 has joined #ruby-lang
20:37
voker57 has quit [Changing host]
20:38
<
manveru >
so things that nobody can safely use get optimized the best? :)
20:38
<
whitequark >
manveru: oh exactly
20:38
chrismcgh has left #ruby-lang [#ruby-lang]
20:39
<
whitequark >
abs(-2147483648) = -2147483648, etc.
20:39
havenwood has quit [Remote host closed the connection]
20:39
almost9 has joined #ruby-lang
20:39
<
manveru >
i get pissed at go because it doesn't have any way to know whether overflow/underflow happened
20:40
emocakes has quit [Quit: emocakes]
20:40
<
whitequark >
also: *((int*)NULL) is a no-op
20:40
<
manveru >
even though most cpus i know put that into a register
20:41
<
whitequark >
or, to be precise, no-op on -O3 and a trap on -O0, but you still can't rely on any of that
20:41
<
whitequark >
manveru: every single one does
20:41
therod has joined #ruby-lang
20:41
tbuehlmann has quit [Remote host closed the connection]
20:41
<
whitequark >
that's how you construct, err, higher-order arithmetics.
20:42
<
manveru >
so either i have to put crazy checks all over the place, or use silly bignum :|
20:42
<
whitequark >
null pointer dereference is not defined to access the memory, nor is it defined to not access it, in quite an orwellian manner
20:42
nickname000 has joined #ruby-lang
20:43
znake has joined #ruby-lang
20:43
<
whitequark >
also, if you have UB in your program somewhere, the behavior of the program is undefined not only
*after* the UB gets executed, but also the whole time
*before* it
20:44
almost9 has quit [Ping timeout: 252 seconds]
20:44
<
whitequark >
I find it that most, if not all C programs, can be compiled to int main() { return 0; } and the compiler will still be standards-compliant.
20:44
<
whitequark >
technically.
20:45
<
whitequark >
also: division by zero is undefined. it's not a trap on powerpc.
20:45
<
whitequark >
surprise!
20:45
<
whitequark >
(or ARM, or...)
20:46
tbuehlmann has joined #ruby-lang
20:46
<
whitequark >
also: signed integer underflow/overflow is undefined, for the sole reason of leaving the possibility to compile the program for non-2's-complement system
20:46
<
manveru >
can't say i even wanted to know that much about C
20:46
<
whitequark >
I understand why this could be in C89 (hardly, but understand). but C99 still has it. C11 still does.
20:46
<
whitequark >
why, people?! why?!
20:47
<
whitequark >
I mean, I don't think non-2's-complement system even exist anymore in the powered-up silicon
20:47
<
manveru >
wasn't there some project to make a subset of C provable?
20:48
<
manveru >
i think they wanted to build an OS on it
20:48
<
whitequark >
manveru: tons of it. CompCert I think, or Coq can be used in that way
20:48
<
manveru >
but nobody uses that?
20:49
<
whitequark >
manveru: the problem is, you cannot build an OS without primitives which are truly, inherently unsafe
20:49
<
whitequark >
even all performance stuff apart
20:49
<
whitequark >
there's a subset of Haskell for systems programming, called Habit
20:49
<
whitequark >
(memory monads flying spaghetti monster kill me now)
20:49
<
manveru >
well, yeah, hardware failure and cosmic rays and stuff
20:50
<
whitequark >
way simpler stuff like registers and DMA
20:50
bg451 has quit [Quit: bg451]
20:50
<
whitequark >
hardware failure cannot be reasoned about at all. just hardware can be reasoned about, but that effectively includes verilog models of all of your hardware in your system
20:51
<
whitequark >
I'm fairly sure that even if you can write a theorem prover which can reason about that, it will take literally years on a very big cluster to derive something sensible from it
20:51
havenwood has joined #ruby-lang
20:52
Rarrikins has quit [Ping timeout: 240 seconds]
20:54
jrafanie has quit [Quit: jrafanie]
20:54
carloslopes has quit [Remote host closed the connection]
20:54
intellitech has quit [Quit: intellitech]
20:56
kith has quit [Quit: kith]
20:57
MaddinXx has quit [Remote host closed the connection]
20:57
kith has joined #ruby-lang
20:57
Rarrikins has joined #ruby-lang
20:57
lsegal has joined #ruby-lang
20:58
<
yorickpeterse >
It's 2013 and benchmarking Rack apps (or Ruby apps in general) is still a cunt
20:59
<
yorickpeterse >
as in, benchmarking how long method X takes to do Y
20:59
mpan has joined #ruby-lang
20:59
<
lianj >
yorickpeterse: so bad?
20:59
<
yorickpeterse >
It's not bad but both ruby-prof and perftools give hard-to-grok output
21:00
<
yorickpeterse >
I also have no idea how to benchmark N iterations in ruby-prof, something perftools can do
21:00
<
yorickpeterse >
(instead of just 1)
21:00
<
whitequark >
yorickpeterse: I've yet to see a profiler with easy to grok output.
21:02
justincampbell has joined #ruby-lang
21:02
<
yorickpeterse >
well, it helps somewhat that ruby-prof supports cachegrind
21:03
s1n4 has joined #ruby-lang
21:03
<
whitequark >
perftools.rb too
21:03
<
yorickpeterse >
oh?
21:04
<
yorickpeterse >
either way, the output of perftools was more useless than what ruby-prof gave me
21:06
Rarrikins_c has joined #ruby-lang
21:07
voker57_ has joined #ruby-lang
21:08
voker57 has quit [Ping timeout: 255 seconds]
21:09
<
whitequark >
yorickpeterse: strange. I found that the opposite holds true.
21:10
chimkan_ has joined #ruby-lang
21:10
Rarrikins has quit [Ping timeout: 272 seconds]
21:12
chimkan has quit [Ping timeout: 244 seconds]
21:12
chimkan_ is now known as chimkan
21:12
Rarrikins has joined #ruby-lang
21:13
emocakes has joined #ruby-lang
21:13
<
yorickpeterse >
mind you I greatly prefer cachegrind output over the other stuff perftools/ruby-prof spit out
21:13
Rarrikins_c has quit [Ping timeout: 245 seconds]
21:13
<
yorickpeterse >
Function: <cycle_1>
21:13
<
yorickpeterse >
fucking GC
21:14
<
whitequark >
--callgrind, etc.
21:14
<
whitequark >
also --text is the most convenient for me
21:14
<
whitequark >
even better than kcachegrind
21:15
<
yorickpeterse >
I wonder if those garbage collector patches of ruby-prof work with 1.9.3
21:15
<
whitequark >
worked fine for me
21:15
sulo has joined #ruby-lang
21:16
sulo has quit [Read error: Connection reset by peer]
21:16
<
yorickpeterse >
Hm, don't feel like re-compiling Ruby tonight so that has to wait
21:16
sulo has joined #ruby-lang
21:16
<
yorickpeterse >
for now: op success. Code works again and is reasonably faster
21:16
<
whitequark >
yorickpeterse: is it roflscale yet?
21:16
<
yorickpeterse >
lol no
21:16
<
yorickpeterse >
You need node.js for that
21:17
<
whitequark >
then go rewrite
21:17
chimkan has quit [Quit: chimkan]
21:21
richardburton has joined #ruby-lang
21:22
chimkan has joined #ruby-lang
21:24
neocoin has joined #ruby-lang
21:26
richardburton has quit [Ping timeout: 276 seconds]
21:32
sailias1 has quit [Quit: Leaving.]
21:34
Rarrikins_r has joined #ruby-lang
21:34
tenderlove has joined #ruby-lang
21:34
shtirlic has quit [Remote host closed the connection]
21:34
<
tenderlove >
ged: you around?
21:35
<
tenderlove >
I'm trying to get the tests running for the pg gem, but it keeps failing
21:36
<
tenderlove >
creating template1 database in /Users/aaron/hg/ruby-pg/tmp_test_specs/data/base/1 ... FATAL: could not create shared memory segment: Cannot allocate memory
21:37
<
yorickpeterse >
clearly the solution is to get more RAM
21:37
mrbloo has quit [Quit: mrbloo]
21:37
Rarrikins has quit [Ping timeout: 256 seconds]
21:39
<
tenderlove >
got it
21:40
<
yorickpeterse >
huh? How much shared memory is it even using?
21:40
Rarrikins_r_c has joined #ruby-lang
21:40
fsvehla has quit [Quit: fsvehla]
21:42
soahccc_________ has joined #ruby-lang
21:42
soahccc_________ has quit [Excess Flood]
21:43
Rarrikins_r has quit [Ping timeout: 248 seconds]
21:44
mpan has quit [Ping timeout: 255 seconds]
21:44
soahccc_________ has joined #ruby-lang
21:46
fsvehla has joined #ruby-lang
21:47
urbanmonk has quit [Quit: Bye!]
21:47
voker57_ has quit [Read error: Connection reset by peer]
21:47
voker57 has joined #ruby-lang
21:47
voker57 has quit [Changing host]
21:47
voker57 has joined #ruby-lang
21:48
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
21:50
samsongz has joined #ruby-lang
21:52
Axsuul has joined #ruby-lang
21:54
scampbell has quit [Quit: Leaving]
21:56
fsvehla has quit [Quit: fsvehla]
21:56
thone_ has joined #ruby-lang
21:57
fsvehla has joined #ruby-lang
21:58
emocakes has quit [Quit: emocakes]
21:59
drbrain has quit [Remote host closed the connection]
21:59
nguerin has quit [Remote host closed the connection]
21:59
Rarrikins_r_c_q has joined #ruby-lang
21:59
thone has quit [Ping timeout: 244 seconds]
22:01
<
yorickpeterse >
There we go, bugs fixed, job well done
22:02
Rarrikins has joined #ruby-lang
22:03
Rarrikins_r_c has quit [Ping timeout: 252 seconds]
22:04
Rarrikins_r_c_q has quit [Ping timeout: 256 seconds]
22:10
gjaldon has quit [Remote host closed the connection]
22:11
thisirs has quit [Remote host closed the connection]
22:12
jrafanie has joined #ruby-lang
22:16
nguerin has joined #ruby-lang
22:17
jrafanie has quit [Quit: jrafanie]
22:18
Rarrikins_k has joined #ruby-lang
22:18
Nisstyre has joined #ruby-lang
22:20
Rarrikins has quit [Ping timeout: 276 seconds]
22:21
richardburton has joined #ruby-lang
22:23
Averna has joined #ruby-lang
22:24
workmad3 has quit [Read error: Operation timed out]
22:25
mistym has quit [Remote host closed the connection]
22:26
blacktulip has quit [Remote host closed the connection]
22:26
richardburton has quit [Ping timeout: 276 seconds]
22:27
idkazuma has joined #ruby-lang
22:30
Rarrikins has joined #ruby-lang
22:30
Rarrikins_k has quit [Ping timeout: 240 seconds]
22:31
Swimming_Bird has joined #ruby-lang
22:32
jtoy has quit [Quit: jtoy]
22:32
Vektur has joined #ruby-lang
22:35
sailias has joined #ruby-lang
22:39
havenwood has quit [Remote host closed the connection]
22:43
mistym has joined #ruby-lang
22:43
mistym has quit [Changing host]
22:43
mistym has joined #ruby-lang
22:45
<
zenspider >
anyone here know google visualization api well?
22:46
lunarjar has joined #ruby-lang
22:53
forrest has quit [Quit: Leaving]
23:00
sailias has quit [Quit: Leaving.]
23:01
richardburton has joined #ruby-lang
23:02
samsongz has quit [Remote host closed the connection]
23:03
ryanv-raptor has quit [Quit: Leaving.]
23:04
sandbags has quit [Remote host closed the connection]
23:04
spuk has joined #ruby-lang
23:05
outoftime has quit [Quit: Leaving]
23:06
outoftime has joined #ruby-lang
23:06
robbyoconnor has joined #ruby-lang
23:06
jonahR has quit [Quit: jonahR]
23:06
richardburton has quit [Ping timeout: 264 seconds]
23:06
mjolk has quit [Quit: This computer has gone to sleep]
23:06
benanne has quit [Quit: kbai]
23:07
__BigO__ has quit [Remote host closed the connection]
23:08
__BigO__ has joined #ruby-lang
23:08
fsvehla has quit [Quit: fsvehla]
23:08
Hauro has joined #ruby-lang
23:10
rogomon has quit [Remote host closed the connection]
23:11
Hauro has quit [Client Quit]
23:12
__BigO__ has quit [Ping timeout: 244 seconds]
23:13
jtoy has joined #ruby-lang
23:14
lunarjar has quit [Quit: Leaving]
23:15
gouthamgandhi has quit [Quit: Leaving.]
23:17
mjio has joined #ruby-lang
23:17
__butch__ has quit [Quit: Leaving.]
23:18
mjio has quit [Client Quit]
23:18
enebo has quit [Quit: enebo]
23:18
ddd has quit [Ping timeout: 245 seconds]
23:20
harper_ has joined #ruby-lang
23:21
andrewhl has quit [Remote host closed the connection]
23:21
mjio has joined #ruby-lang
23:24
harper_ has left #ruby-lang [#ruby-lang]
23:24
Kuifje has quit [Ping timeout: 276 seconds]
23:25
sulo has quit [Remote host closed the connection]
23:25
s1n4 has quit [Quit: leaving]
23:26
akahn has quit [Ping timeout: 240 seconds]
23:26
brianpWins has quit [Quit: brianpWins]
23:30
havenn has joined #ruby-lang
23:31
ruskie has quit [Read error: Connection reset by peer]
23:34
Rarrikins_i has joined #ruby-lang
23:34
Bosox20051 has joined #ruby-lang
23:35
Bearproof has quit [Quit: Leaving.]
23:36
dustint has quit [Remote host closed the connection]
23:36
Rarrikins has quit [Ping timeout: 256 seconds]
23:37
drbrain has joined #ruby-lang
23:37
drbrain has quit [Read error: Connection reset by peer]
23:37
drbrain has joined #ruby-lang
23:38
mephux has quit [Excess Flood]
23:39
Mon_Ouie has quit [Ping timeout: 272 seconds]
23:39
mephux has joined #ruby-lang
23:46
chimkan has quit [Quit: chimkan]
23:47
chimkan has joined #ruby-lang
23:49
maxmanders has quit [Quit: Computer has gone to sleep.]
23:51
tenderlove has quit [Remote host closed the connection]
23:52
havenn is now known as havenwood
23:53
toretore has quit [Quit: Leaving]
23:55
sulo has joined #ruby-lang
23:56
Rarrikins_i_v has joined #ruby-lang
23:57
therod has quit [Quit: Leaving...]
23:58
Rarrikins_i has quit [Ping timeout: 276 seconds]