00:00
GaelanAintAround is now known as Gaelan
00:02
nathanstitt has quit [Quit: I growing sleepy]
00:04
Guest70563 has quit [Quit: Leaving]
00:04
vlad_sta_ has quit [Remote host closed the connection]
00:04
hashkey has joined #ruby-lang
00:07
mame0 has quit [Ping timeout: 264 seconds]
00:08
tylersmith has joined #ruby-lang
00:10
mistym has quit [Remote host closed the connection]
00:12
brianpWins has quit [Quit: brianpWins]
00:12
jerrytgarcia has quit [Quit: WeeChat 0.4.1]
00:13
jerrytgarcia has joined #ruby-lang
00:15
anonymuse has quit [Remote host closed the connection]
00:15
CaryInVictoria has joined #ruby-lang
00:19
CaryInVictoria has quit [Ping timeout: 264 seconds]
00:20
tylersmith has quit [Remote host closed the connection]
00:20
tylersmith has joined #ruby-lang
00:22
havenwood has joined #ruby-lang
00:24
hashkey has quit [Quit: Leaving]
00:25
tylersmith has quit [Ping timeout: 268 seconds]
00:27
seanlerner has quit [Remote host closed the connection]
00:29
eugenejen has quit [Quit: eugenejen]
00:30
machuga|away is now known as machuga
00:32
<
oddmunds >
andrewvos: like "where's the 'J'?"?
00:35
vlad_starkov has joined #ruby-lang
00:37
ruby-lang147 has quit [Ping timeout: 250 seconds]
00:41
<
kith >
is it possible to skip one iteration in ary.each?
00:41
CaryInVictoria has joined #ruby-lang
00:42
<
kith >
kinda like ary.each { |i| begin something rescue error skip one end }
00:43
<
ryanf >
although actually
00:43
<
ryanf >
oh, wait, you want to skip the
*next* one after the one that errors out?
00:44
<
kith >
skip the one where the error occured
00:44
<
ryanf >
then why not just do "begin; something; rescue ExceptionClass; end"
00:44
<
kith >
i have rescue Timeout::Error
00:44
<
kith >
but my script hangs there
00:53
sebastian has joined #ruby-lang
01:00
nathanstitt has joined #ruby-lang
01:01
sebastian has quit [Read error: Connection reset by peer]
01:01
bastilian has joined #ruby-lang
01:02
benanne has quit [Quit: kbai]
01:03
DEac-_ has quit [Ping timeout: 268 seconds]
01:08
hashkey has joined #ruby-lang
01:10
DEac- has joined #ruby-lang
01:11
iliketurtles has quit [Quit: zzzzz…..]
01:13
mdedetrich has quit [Quit: Computer has gone to sleep.]
01:22
Gaelan is now known as GaelanAintAround
01:25
CaryInVictoria has quit [Remote host closed the connection]
01:25
GaelanAintAround is now known as Gaelan
01:25
imperator has quit [Quit: Valete!]
01:28
schaerli has joined #ruby-lang
01:30
apeiros has quit [Remote host closed the connection]
01:33
schaerli has quit [Ping timeout: 268 seconds]
01:34
sepp2k1 has quit [Read error: Connection reset by peer]
01:41
CaryInVictoria has joined #ruby-lang
01:44
vlad_sta_ has joined #ruby-lang
01:44
Coincidental has joined #ruby-lang
01:46
vlad_starkov has quit [Read error: Operation timed out]
01:49
thepumpkin has quit [Remote host closed the connection]
01:51
nisstyre has joined #ruby-lang
01:54
brianpWins has joined #ruby-lang
01:54
CaryInVictoria has quit [Remote host closed the connection]
01:57
tharindu has joined #ruby-lang
01:57
esad has quit [Quit: Computer has gone to sleep.]
01:58
CaryInVictoria has joined #ruby-lang
02:00
esad has joined #ruby-lang
02:02
TheMoonMaster has quit [Excess Flood]
02:02
TheMoonMaster has joined #ruby-lang
02:04
lsegal has joined #ruby-lang
02:07
Gaelan is now known as GaelanAintAround
02:07
ryez has joined #ruby-lang
02:08
kurko_ has quit [Quit: Computer has gone to sleep.]
02:12
hogeo has joined #ruby-lang
02:14
ryez has quit [Ping timeout: 250 seconds]
02:23
hogeo has quit [Remote host closed the connection]
02:26
GaelanAintAround is now known as Gaelan
02:28
CaryInVictoria has quit [Remote host closed the connection]
02:34
mdedetrich has joined #ruby-lang
02:40
apeiros has joined #ruby-lang
02:43
nathanstitt has quit [Quit: I growing sleepy]
02:45
vlad_starkov has joined #ruby-lang
02:45
apeiros has quit [Ping timeout: 264 seconds]
02:46
postmodern has quit [Quit: Leaving]
02:47
postmodern has joined #ruby-lang
02:48
vlad_sta_ has quit [Ping timeout: 248 seconds]
02:52
nathanstitt has joined #ruby-lang
02:55
melodic_odyssey has joined #ruby-lang
02:56
konr` has quit [Remote host closed the connection]
03:01
symm- has quit [Ping timeout: 248 seconds]
03:06
Forgetful_Lion has joined #ruby-lang
03:08
tharindu has quit [Remote host closed the connection]
03:11
tkuchiki has joined #ruby-lang
03:12
tharindu has joined #ruby-lang
03:12
symm- has joined #ruby-lang
03:12
gaurangagrawal has joined #ruby-lang
03:14
gauranga_ has joined #ruby-lang
03:14
mdedetrich has quit [Quit: Computer has gone to sleep.]
03:14
ledestin has joined #ruby-lang
03:15
symm-_ has joined #ruby-lang
03:16
symm- has quit [Read error: Connection reset by peer]
03:17
gaurangagrawal has quit [Ping timeout: 256 seconds]
03:20
rkowalick has joined #ruby-lang
03:20
rkowalick has quit [Client Quit]
03:22
hashkey has quit [Ping timeout: 240 seconds]
03:22
CaryInVictoria has joined #ruby-lang
03:22
tubbo has joined #ruby-lang
03:28
flip_digits has quit [Remote host closed the connection]
03:33
cored has joined #ruby-lang
03:34
choi0hun has joined #ruby-lang
03:39
sirupsen has joined #ruby-lang
03:40
nofxx has quit [Ping timeout: 240 seconds]
03:43
nisstyre has quit [Quit: Leaving]
03:43
knu has quit [Ping timeout: 248 seconds]
03:43
knu has joined #ruby-lang
03:45
vlad_sta_ has joined #ruby-lang
03:46
nofxx has joined #ruby-lang
03:48
vlad_starkov has quit [Ping timeout: 248 seconds]
03:50
fuhgeddaboudit has joined #ruby-lang
03:51
fosky has quit [Remote host closed the connection]
03:57
wizrad has joined #ruby-lang
03:58
Forgetful_Lion has quit [Remote host closed the connection]
04:01
fuhgeddaboudit has quit [Read error: No route to host]
04:03
Coincidental has quit [Remote host closed the connection]
04:08
Coincidental has joined #ruby-lang
04:09
Gaelan is now known as GaelanAintAround
04:10
wizrad has left #ruby-lang ["Leaving"]
04:10
tomzx_mac has quit [Read error: Connection reset by peer]
04:11
jaimef has quit [Ping timeout: 240 seconds]
04:11
tomzx_mac has joined #ruby-lang
04:11
CaryInVi_ has joined #ruby-lang
04:11
CaryInVictoria has quit [Ping timeout: 240 seconds]
04:15
hahuang65 has joined #ruby-lang
04:16
gauranga_ has quit [Remote host closed the connection]
04:17
tubbo has quit [Ping timeout: 276 seconds]
04:18
mistym has joined #ruby-lang
04:18
mj12albert has quit []
04:18
fuhgeddaboudit has joined #ruby-lang
04:18
nathanstitt has quit [Quit: I growing sleepy]
04:18
jaimef has joined #ruby-lang
04:21
choi0hun has quit [Remote host closed the connection]
04:29
mootpointer has joined #ruby-lang
04:29
mootpointer has quit [Client Quit]
04:30
CaryInVi_ has quit [Remote host closed the connection]
04:31
CaryInVictoria has joined #ruby-lang
04:31
cored has quit [Ping timeout: 260 seconds]
04:32
kurko_ has joined #ruby-lang
04:32
mootpointer has joined #ruby-lang
04:33
scottschecter has quit [Ping timeout: 256 seconds]
04:38
CaryInVictoria has quit [Remote host closed the connection]
04:41
mj12albert has joined #ruby-lang
04:43
cads has joined #ruby-lang
04:43
cads has quit [Read error: Connection reset by peer]
04:44
cads has joined #ruby-lang
04:46
vlad_starkov has joined #ruby-lang
04:46
vlad_sta_ has quit [Read error: Operation timed out]
04:48
charliesome has joined #ruby-lang
04:50
havenwood has quit [Remote host closed the connection]
04:51
havenwood has joined #ruby-lang
04:55
havenwood has quit [Ping timeout: 260 seconds]
04:56
mootpointer has quit [Ping timeout: 264 seconds]
04:57
sirupsen has quit []
04:57
jonahR has joined #ruby-lang
05:02
tenderlove has quit [Remote host closed the connection]
05:03
tenderlove has joined #ruby-lang
05:04
nazty has joined #ruby-lang
05:05
mdedetrich has joined #ruby-lang
05:13
fuhgeddaboudit has quit [Remote host closed the connection]
05:13
kurko_ has quit [Ping timeout: 264 seconds]
05:15
kurko_ has joined #ruby-lang
05:18
lsegal has quit [Read error: Connection reset by peer]
05:18
lsegal has joined #ruby-lang
05:23
tubbo has joined #ruby-lang
05:28
tubbo has quit [Ping timeout: 276 seconds]
05:30
kurko_ has quit [Ping timeout: 248 seconds]
05:32
kurko_ has joined #ruby-lang
05:34
melodic_odyssey has quit [Quit: Page closed]
05:38
CaryInVictoria has joined #ruby-lang
05:40
face has quit [Ping timeout: 264 seconds]
05:43
flip_digits has joined #ruby-lang
05:43
CaryInVictoria has quit [Ping timeout: 260 seconds]
05:44
sevvie has joined #ruby-lang
05:47
vlad_sta_ has joined #ruby-lang
05:48
vlad_starkov has quit [Read error: Operation timed out]
05:48
lsegal has quit [Read error: Connection reset by peer]
05:49
lsegal has joined #ruby-lang
05:50
flip_digits has quit [Remote host closed the connection]
05:55
face has joined #ruby-lang
06:05
charliesome has quit [Ping timeout: 260 seconds]
06:06
crudson has left #ruby-lang [#ruby-lang]
06:07
MaddinXx has joined #ruby-lang
06:10
weems is now known as FROWNING
06:14
FROWNING is now known as weems
06:15
kurko_ has quit [Ping timeout: 256 seconds]
06:17
kurko_ has joined #ruby-lang
06:18
vlad_sta_ has quit [Remote host closed the connection]
06:18
ryez has joined #ruby-lang
06:18
mbr_ has joined #ruby-lang
06:18
vlad_starkov has joined #ruby-lang
06:20
mbr has quit [Read error: Connection reset by peer]
06:20
zz_dlu has quit [Ping timeout: 240 seconds]
06:20
waxjar has quit [Ping timeout: 240 seconds]
06:20
levifig has quit [Ping timeout: 240 seconds]
06:20
akahn has quit [Ping timeout: 240 seconds]
06:20
bri has quit [Ping timeout: 240 seconds]
06:21
waxjar has joined #ruby-lang
06:21
iliketurtles has joined #ruby-lang
06:21
bri has joined #ruby-lang
06:21
zz_dlu has joined #ruby-lang
06:24
vlad_starkov has quit [Ping timeout: 245 seconds]
06:24
levifig has joined #ruby-lang
06:25
iliketurtles has quit [Ping timeout: 248 seconds]
06:25
charliesome has joined #ruby-lang
06:26
kurko_ has quit [Ping timeout: 240 seconds]
06:30
kurko_ has joined #ruby-lang
06:32
loincloth has quit [Remote host closed the connection]
06:35
t0h has quit [Ping timeout: 264 seconds]
06:35
t0h has joined #ruby-lang
06:39
CaryInVictoria has joined #ruby-lang
06:42
heftig has quit [Ping timeout: 245 seconds]
06:43
heftig has joined #ruby-lang
06:44
CaryInVictoria has quit [Ping timeout: 268 seconds]
06:48
vlad_starkov has joined #ruby-lang
06:48
skade has joined #ruby-lang
07:02
tomzx_mac has quit [Ping timeout: 260 seconds]
07:06
hhatch has joined #ruby-lang
07:09
GeissT has joined #ruby-lang
07:11
skade has quit [Quit: Computer has gone to sleep.]
07:11
sevvie has quit [Ping timeout: 264 seconds]
07:11
banister`sleep has quit [Quit: Computer has gone to sleep.]
07:13
hashkey has joined #ruby-lang
07:14
Bosox20051 has joined #ruby-lang
07:22
nofxx has quit [Ping timeout: 248 seconds]
07:26
schaerli has joined #ruby-lang
07:31
Mon_Ouie has joined #ruby-lang
07:36
tbuehlmann has joined #ruby-lang
07:43
schaerli has quit [Remote host closed the connection]
07:45
kurko_ has quit [Ping timeout: 248 seconds]
07:46
kurko_ has joined #ruby-lang
07:48
vlad_sta_ has joined #ruby-lang
07:51
vlad_starkov has quit [Read error: Operation timed out]
07:57
mbr_ has quit [Quit: leaving]
07:57
robbyoconnor has joined #ruby-lang
07:57
mbr has joined #ruby-lang
07:58
apeiros has joined #ruby-lang
07:59
kurko_ has quit [Quit: Computer has gone to sleep.]
08:00
sevvie has joined #ruby-lang
08:05
sevvie has quit [Ping timeout: 248 seconds]
08:09
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
08:10
babinho has joined #ruby-lang
08:16
akahn has joined #ruby-lang
08:18
jiuweigui has joined #ruby-lang
08:19
tenderlove has quit [Read error: Connection reset by peer]
08:20
tenderlove has joined #ruby-lang
08:23
D9_ has quit [Ping timeout: 248 seconds]
08:25
Coincidental has quit [Remote host closed the connection]
08:26
wallerdev has quit [Quit: wallerdev]
08:33
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
08:33
workmad3 has joined #ruby-lang
08:46
mbj has joined #ruby-lang
08:48
workmad3 has quit [Ping timeout: 245 seconds]
08:48
vlad_starkov has joined #ruby-lang
08:52
vlad_sta_ has quit [Ping timeout: 264 seconds]
08:52
relix has joined #ruby-lang
08:54
mbj has quit [Ping timeout: 264 seconds]
08:57
apeiros has quit [Remote host closed the connection]
08:58
adambeynon has joined #ruby-lang
09:01
vlad_starkov has quit [Remote host closed the connection]
09:04
arBmind has joined #ruby-lang
09:05
Forgetful_Lion has joined #ruby-lang
09:05
face has quit [Ping timeout: 260 seconds]
09:08
charliesome has joined #ruby-lang
09:08
corecode has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
09:12
Forgetful_Lion has quit [Read error: Operation timed out]
09:14
jonahR has quit [Quit: jonahR]
09:14
Forgetful_Lion has joined #ruby-lang
09:15
mistym has quit [Remote host closed the connection]
09:19
mdedetrich has quit [Quit: Computer has gone to sleep.]
09:19
toretore has joined #ruby-lang
09:22
Forgetful_Lion has quit [Read error: Operation timed out]
09:24
Forgetful_Lion has joined #ruby-lang
09:32
vlad_starkov has joined #ruby-lang
09:32
Forgetful_Lion has quit [Read error: Operation timed out]
09:34
Forgetful_Lion has joined #ruby-lang
09:39
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
09:39
sepp2k has joined #ruby-lang
09:40
CaryInVictoria has joined #ruby-lang
09:41
vlad_starkov has quit [Ping timeout: 240 seconds]
09:42
Forgetful_Lion has quit [Read error: Operation timed out]
09:43
skade has joined #ruby-lang
09:44
Forgetful_Lion has joined #ruby-lang
09:45
CaryInVictoria has quit [Ping timeout: 256 seconds]
09:47
mbj has joined #ruby-lang
09:47
charliesome has joined #ruby-lang
09:52
Forgetful_Lion has quit [Read error: Operation timed out]
09:54
Forgetful_Lion has joined #ruby-lang
09:59
mindriot101 has joined #ruby-lang
10:02
Forgetful_Lion has quit [Read error: Operation timed out]
10:03
grandy has quit [Ping timeout: 264 seconds]
10:03
Domon_ has quit [Ping timeout: 248 seconds]
10:04
Forgetful_Lion has joined #ruby-lang
10:05
symm-_ has quit [Ping timeout: 264 seconds]
10:06
vlad_starkov has joined #ruby-lang
10:09
apeiros has joined #ruby-lang
10:09
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
10:11
skade has quit [Quit: Computer has gone to sleep.]
10:12
charliesome has joined #ruby-lang
10:12
Forgetful_Lion has quit [Read error: Operation timed out]
10:14
skade has joined #ruby-lang
10:14
Forgetful_Lion has joined #ruby-lang
10:15
norplr_ has quit [Ping timeout: 240 seconds]
10:16
norplr_ has joined #ruby-lang
10:22
Forgetful_Lion has quit [Read error: Operation timed out]
10:24
Forgetful_Lion has joined #ruby-lang
10:28
benanne has joined #ruby-lang
10:32
Forgetful_Lion has quit [Read error: Operation timed out]
10:35
Forgetful_Lion has joined #ruby-lang
10:43
Forgetful_Lion has quit [Read error: Operation timed out]
10:45
elia has joined #ruby-lang
10:45
Forgetful_Lion has joined #ruby-lang
10:50
arBmind has quit [Quit: Leaving.]
10:53
Forgetful_Lion has quit [Read error: Operation timed out]
10:55
Forgetful_Lion has joined #ruby-lang
10:59
banisterfiend has joined #ruby-lang
11:02
workmad3 has joined #ruby-lang
11:03
Forgetful_Lion has quit [Read error: Operation timed out]
11:05
Forgetful_Lion has joined #ruby-lang
11:07
vlad_starkov has quit []
11:11
Kabaka has joined #ruby-lang
11:12
vlad_starkov has joined #ruby-lang
11:12
vlad_starkov has quit [Client Quit]
11:13
Forgetful_Lion has quit [Read error: Operation timed out]
11:13
<
yorickpeterse >
ReinH: regarding vim syn regions, oh?
11:13
<
yorickpeterse >
also morning
11:14
vlad_starkov has joined #ruby-lang
11:14
<
ljarvis >
I have an array I'd like to generate all combinations of (plus their inverted combinations), is there anything better than x.combination(2) + x.combination(2).map(&:reverse) ?
11:15
arBmind has joined #ruby-lang
11:15
Forgetful_Lion has joined #ruby-lang
11:15
stamina has joined #ruby-lang
11:16
arBmind has quit [Client Quit]
11:17
<
yorickpeterse >
#permutate
11:17
<
yorickpeterse >
err Array#permutate
11:18
<
yorickpeterse >
>> [1, 2, 3].permutate
11:18
<
yorickpeterse >
errr
11:18
<
yorickpeterse >
>> [1, 2, 3].permutation
11:18
<
yorickpeterse >
>> [1, 2, 3].permutation.to_a
11:18
<
eval-in >
yorickpeterse => [[1, 2, 3], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]] (
https://eval.in/49611)
11:18
<
yorickpeterse >
it's pretty fast too
11:19
<
ljarvis >
i knew about that too
11:19
<
ljarvis >
thanks yorickpeterse
11:20
<
yorickpeterse >
it's funny since there are quite a few permutation libs for Ruby that are all a million times slower than a simple Array#permutation
11:20
<
charliesome >
whitequark: are you around?
11:23
Forgetful_Lion has quit [Read error: Operation timed out]
11:23
<
whitequark >
charliesome: yep
11:24
<
whitequark >
oh, talking about that syntax thingy
11:24
<
charliesome >
whitequark: so i was poking through your translation of the rhg
11:24
<
charliesome >
"EXPR_CLASS, /* immediate after `class', no here document. */"
11:24
<
charliesome >
couldn't that be achieved using the same state that leads to << being tLSHFT rather than a here document?
11:25
Forgetful_Lion has joined #ruby-lang
11:26
<
whitequark >
that would be EXPR_END
11:26
<
whitequark >
and EXPR_CLASS decays to EXPR_BEG, which correctly emits tCOLON3 for "class ::A"
11:26
<
charliesome >
ah right
11:26
<
whitequark >
well, to EXPR_VALUE actually, but same idea
11:27
<
whitequark >
so. syntax thingy!
11:27
<
charliesome >
i thought i outsmarted ruby's syntax, but then nope!
11:27
<
charliesome >
wait before syntax thingy
11:27
<
charliesome >
let me show you this
11:27
<
whitequark >
listening
11:27
<
charliesome >
if you think ruby's complex
11:28
<
whitequark >
hahahaha nope I want to retain the little shreds of sanity I have left
11:28
<
whitequark >
#define LEX_INTERPCONST 2 /* NOT USED */
11:28
<
whitequark >
oh god
11:28
<
charliesome >
" * FUN1 : not used, except for not, which isn't a UNIOP"
11:28
<
whitequark >
"YADAYADA"
11:28
<
charliesome >
is that a triple negative
11:28
<
charliesome >
also don't knock the yada yada operator
11:28
<
whitequark >
"DORDOR" what
11:30
<
whitequark >
if (PL_madskills)
11:30
<
whitequark >
PL_skipwhite = newSVpvs("");
11:30
toretore has quit [Quit: Leaving]
11:31
<
charliesome >
madskills hahaha what
11:32
<
whitequark >
thingy.
11:32
<
whitequark >
you know how you can do aset in masgn? a[1,2], b[3] = *z
11:33
<
whitequark >
which is translated to a node for "a.[](1,2)"
11:33
<
whitequark >
and aset code appends the actual value to it
11:33
Forgetful_Lion has quit [Read error: Operation timed out]
11:34
<
whitequark >
so I suggest to allow the same syntax for non-[] assignment
11:34
<
whitequark >
a(1) = a(1)
11:34
<
whitequark >
a(1, 2), b(3) = *c
11:34
<
charliesome >
slash has that
11:34
<
whitequark >
it should be trivial to implement
11:34
<
whitequark >
you think it's a good idea for ruby?
11:35
<
charliesome >
not sure, seems visual basicky
11:35
<
whitequark >
is it?..
11:35
Forgetful_Lion has joined #ruby-lang
11:35
<
charliesome >
basically i think it's a good idea if you do it as a generalization of ATTRASGN semantics
11:36
<
charliesome >
but a bad feature on its own
11:36
<
whitequark >
well, of course it's a generalization
11:36
<
whitequark >
I actually was surprised somewhat that it's not supported
11:36
<
charliesome >
maybe propose it
11:36
<
charliesome >
see what happens
11:36
<
charliesome >
i think it's unlikely to be accepted though
11:37
<
charliesome >
well, as a generalization it would've been fine if it was in ruby from the beginning
11:37
<
charliesome >
but it makes little sense to introduce it now
11:37
<
charliesome >
even as a generalization
11:37
<
whitequark >
hm, perhaps
11:38
<
whitequark >
dat syntax
11:38
<
whitequark >
I request ocaml in eval.in
11:39
<
charliesome >
got a link to a preferred implementation?
11:39
<
charliesome >
i'll see what i can do
11:39
<
whitequark >
it has one :)
11:39
<
charliesome >
oh ok
11:39
<
whitequark >
ocaml.org
11:39
<
whitequark >
4.x series please. 4.00.1 or 4.01, 4.01 is better.
11:39
<
whitequark >
(it's stable)
11:40
<
whitequark >
apt-get install ocaml-nox should do it
11:40
<
charliesome >
is the compiler safe to use on arbitrary code unsandboxed?
11:40
hashkey has quit [Quit: Leaving]
11:41
<
charliesome >
for compiled languages i run the compiler with strict resource limits but unsandboxed
11:41
<
whitequark >
which ones do you deem safe already?
11:41
<
whitequark >
stuff like gcc? then yes
11:43
<
charliesome >
yeah gcc is considered safe
11:43
Forgetful_Lion has quit [Read error: Operation timed out]
11:43
<
charliesome >
hah the ocaml i downloaded is 3.11
11:43
<
whitequark >
you certainly shouldn't run 2.95 unsandboxed ;)
11:44
<
whitequark >
it has... hundreds of crashbugs
11:44
<
whitequark >
charliesome: 3.11 vs 4.01 is like 1.9 vs 2.0, in ruby terms
11:44
<
charliesome >
so, insignificant?
11:45
<
whitequark >
well, the changes are more significant. it'd be neat to have 4.01 if it's not a problem
11:45
<
whitequark >
is that not a debian box?
11:45
Forgetful_Lion has joined #ruby-lang
11:45
<
charliesome >
ubuntu 10.04
11:45
<
whitequark >
yeah that ppa should work just fine
11:45
<
charliesome >
oh ok
11:46
<
charliesome >
my sandbox won't run on recent kernels :p
11:46
<
yorickpeterse >
pff
11:46
<
charliesome >
it's pretty hacked up
11:47
<
yorickpeterse >
dude bro use docker
11:47
<
yorickpeterse >
and go
11:47
<
whitequark >
sure, imo 10.04 is "recent"
11:47
<
whitequark >
recent ~ last 5 years :)
11:47
<
charliesome >
yorickpeterse: how about ptrace and c? ;)
11:48
<
charliesome >
i can probably compile 4.01 if you want me to
11:48
<
charliesome >
oh whoops
11:49
<
charliesome >
no lucid package
11:49
<
whitequark >
try precise, it should work
11:50
<
charliesome >
i've had bad experiences running precise packages on lucid boxes
11:50
<
charliesome >
i'll just compile it it's no worry
11:50
<
whitequark >
oh sure then
11:50
elia has quit [Quit: Computer has gone to sleep.]
11:50
<
charliesome >
god damn gcc-4.7.2 is 558 MB
11:51
<
charliesome >
second only to ghc-7.4.2 at 667 MB
11:51
<
whitequark >
ghc is enormous for some reason
11:51
<
whitequark >
I never understood it
11:52
<
whitequark >
gigantic haskell compiler? :)
11:52
<
charliesome >
what is it with these ultra high level languages being so massive
11:52
<
charliesome >
i think racket is huge too
11:53
<
whitequark >
hmmm is it?
11:53
Forgetful_Lion has quit [Read error: Operation timed out]
11:55
schaerli has joined #ruby-lang
11:55
jxie has quit [Quit: leaving]
11:55
Forgetful_Lion has joined #ruby-lang
11:56
mbj has quit [Ping timeout: 268 seconds]
11:57
tharindu_ has joined #ruby-lang
11:58
<
charliesome >
whitequark: i'm lazy, can you give me some code that reads out of /etc/shadow or something in ocaml?
11:58
tharindu has quit [Ping timeout: 245 seconds]
11:58
<
charliesome >
need to test the sandbox
11:59
<
whitequark >
prerr_endline (input_line (open_in "/etc/shadow"))
12:00
<
charliesome >
also, want ocamlopt? or is interpreted fine
12:00
<
whitequark >
it doesn't matter on such sizes really. interpreted has faster compile
12:01
<
charliesome >
cool sandbox works
12:01
<
charliesome >
ship it
12:02
iliketurtles has joined #ruby-lang
12:02
grandy has joined #ruby-lang
12:02
Domon_ has joined #ruby-lang
12:02
<
charliesome >
if you have the time, i'd appreciate some examples done up for ocaml to link to from the homepage
12:02
<
whitequark >
charliesome: you wrote 4.00.1 in the dropbox
12:03
<
whitequark >
so is it 4.00.1 or 4.01.0? :)
12:03
<
charliesome >
it's 4.00.1
12:03
Forgetful_Lion has quit [Read error: Operation timed out]
12:04
<
whitequark >
guess someone forgot to update that
12:04
<
whitequark >
well, 4.00.1 is fine too
12:04
<
whitequark >
one sec, I'll write the examples.
12:04
<
zzak >
good morning!
12:05
<
charliesome >
zzak: morning
12:05
<
charliesome >
whitequark: also turns out i already had 4.00.1 compiled lol
12:05
Forgetful_Lion has joined #ruby-lang
12:06
nneko001__ has joined #ruby-lang
12:06
iliketurtles has quit [Ping timeout: 240 seconds]
12:08
<
zzak >
charliesome: hi!
12:08
<
charliesome >
zzak: congrats on the speaking spot at rubyconf
12:09
<
charliesome >
whitequark: so i'd really like to see method binding syntax in ruby
12:09
<
charliesome >
with : instead of .
12:09
<
charliesome >
dunno how many conflicts there would be with real world code
12:09
<
charliesome >
[1,2,3].map(&2:*)
12:09
<
charliesome >
recv:mid would be equivalent to recv.method(mid)
12:09
<
waxjar >
you're gonna turn ruby into perl this way!
12:10
<
zzak >
charliesome: thanks!
12:10
<
zzak >
charliesome: im giving a talk in about 3 hours, so nerved :X
12:10
<
whitequark >
charliesome: a gigantic amount of conflicts
12:11
<
charliesome >
zzak: you'll be fine!
12:11
<
whitequark >
you aren't going to make that work
12:11
<
charliesome >
whitequark: :(
12:11
<
charliesome >
whitequark: know of any other syntax that could work? i like the idea
12:11
<
whitequark >
you totally can do &&2.*
12:11
<
whitequark >
it's slightly tricky but only a little bit
12:12
<
charliesome >
that's a bit ugly :(
12:12
<
whitequark >
&2:* too
12:12
<
charliesome >
the && reminds me of that crazy gcc extension to haha
12:12
<
whitequark >
it's confusing
12:12
<
whitequark >
charliesome: it's in C++11
12:12
<
waxjar >
whats wrong with [1,2,3].map &2.method(:*)
12:12
<
whitequark >
I think it's sort of analogous to *restargs or something
12:13
<
charliesome >
waxjar: it's unnecessary syntactic overhead imo
12:13
Forgetful_Lion has quit [Read error: Operation timed out]
12:13
<
waxjar >
it's also super clear
12:13
<
whitequark >
waxjar: use java, it's super clear
12:14
<
waxjar >
no it isnt :P
12:14
<
whitequark >
or pascal
12:14
<
whitequark >
dat english
12:14
schaerli has quit [Remote host closed the connection]
12:14
<
charliesome >
i see people doing 'my_method { |x| whatever(x) }' all the time
12:14
<
whitequark >
charliesome: so, y u no add examples
12:15
<
charliesome >
it'd be nice to have a more first-class-ish form for doing that: my_method(&self:whatever)
12:15
<
charliesome >
whitequark: deployed
12:15
<
whitequark >
charliesome: thx!
12:15
<
charliesome >
lol at the id difference between ocaml and the rest
12:15
Forgetful_Lion has joined #ruby-lang
12:16
<
whitequark >
charliesome: by the way, I really think that self:whatever is very ugly
12:16
<
whitequark >
: is never ever used in ruby with such meaning already
12:16
<
whitequark >
maybe unary | ? as in pipe
12:16
<
whitequark >
.map(|self.whatever)
12:16
<
zzak >
charliesome: thanks, ill do my best!
12:17
<
charliesome >
whitequark: |self.whatever is interesting
12:17
<
charliesome >
i can imagine it being a sort of partial application operator
12:17
<
whitequark >
also |self.whatever(1)
12:17
<
charliesome >
also yeah maybe : wouldn't work in ruby
12:17
<
whitequark >
I'm totally sure it won't
12:18
<
charliesome >
it seems to work in slash, where i copied the idea from lua
12:18
vlad_starkov has quit [Remote host closed the connection]
12:18
<
whitequark >
guess slash has a saner parser. does it have symbols btw?
12:18
<
charliesome >
slash has single quoted atoms
12:18
<
charliesome >
but they're just strings
12:18
<
whitequark >
that explains
12:18
<
charliesome >
i want to add unary : to slash too
12:19
<
whitequark >
unary : or : bareword ?
12:19
<
charliesome >
: bareword sorry
12:19
<
charliesome >
so :foo would be equivalent to \x { x.foo }
12:19
<
whitequark >
dat haskell closure syntax
12:19
<
charliesome >
i also support \x . x.foo
12:19
<
whitequark >
dunno, it's your language
12:19
<
charliesome >
and λ x . x.foo :p
12:19
bastilian has joined #ruby-lang
12:19
<
yorickpeterse >
are you doing drugs/
12:19
<
yorickpeterse >
* ?
12:19
<
whitequark >
lol, that seems unnecessary
12:20
vlad_starkov has joined #ruby-lang
12:20
<
whitequark >
tho: your language, your rules.
12:20
* whitequark
shrugs.
12:21
<
charliesome >
yorickpeterse: it seemed like a good idea at the time
12:22
<
yorickpeterse >
mistakes were made
12:23
<
charliesome >
i regret nothing
12:23
Forgetful_Lion has quit [Read error: Operation timed out]
12:23
<
charliesome >
i dunno, unicode in language syntax is underrated
12:23
<
charliesome >
think about all those operator possibilities
12:24
<
whitequark >
I think that user-definable operators, and especially user-definable fixity, is already too confusing
12:24
symm- has joined #ruby-lang
12:24
<
charliesome >
look at haskell for example
12:24
<
whitequark >
if you're doing math, then yes. if it's a general-purpose lang, hell no
12:24
<
charliesome >
their libraries use weird ass operators like ruby libraries monkey patch core types
12:25
<
charliesome >
often, and inappropriately
12:25
<
whitequark >
yeah, that's a side effect of how unification works
12:25
<
whitequark >
actually no, I dunno about haskell with its typeclasses
12:25
<
charliesome >
i don't have an issue with the whole typing part of it
12:25
<
charliesome >
it's just terrible to read and write
12:25
<
whitequark >
ocaml has + for integer, +. for float and +/ for rational for example
12:25
Forgetful_Lion has joined #ruby-lang
12:26
<
charliesome >
foo = <$%^> lol <?> whatever || seriously <?> 123
12:26
<
whitequark >
because its type system is not strong enough to express bounded polymorphism for numerics
12:33
Forgetful_Lion has quit [Read error: Operation timed out]
12:35
Forgetful_Lion has joined #ruby-lang
12:36
schaerli has joined #ruby-lang
12:38
schaerli has quit [Remote host closed the connection]
12:39
sush24 has joined #ruby-lang
12:42
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
12:43
Forgetful_Lion has quit [Read error: Operation timed out]
12:44
enebo has joined #ruby-lang
12:45
hogeo has joined #ruby-lang
12:45
Forgetful_Lion has joined #ruby-lang
12:51
charliesome has joined #ruby-lang
12:53
Forgetful_Lion has quit [Read error: Operation timed out]
12:55
Forgetful_Lion has joined #ruby-lang
12:56
adambeynon has joined #ruby-lang
12:57
stardiviner has joined #ruby-lang
12:58
stardiviner has quit [Client Quit]
12:59
hogeo has quit [Ping timeout: 260 seconds]
13:00
hogeo has joined #ruby-lang
13:03
Forgetful_Lion has quit [Read error: Operation timed out]
13:05
Forgetful_Lion has joined #ruby-lang
13:11
jp- has joined #ruby-lang
13:11
sharma_ has joined #ruby-lang
13:12
sush24 has quit [Ping timeout: 260 seconds]
13:12
robbyoconnor has quit [Ping timeout: 257 seconds]
13:12
Forgetful_Lion has quit [Read error: Operation timed out]
13:13
sr78ger has joined #ruby-lang
13:15
sharma__ has joined #ruby-lang
13:15
Forgetful_Lion has joined #ruby-lang
13:16
sharma_ has quit [Ping timeout: 260 seconds]
13:20
mdedetrich has joined #ruby-lang
13:20
esad has quit [Quit: Computer has gone to sleep.]
13:21
jiuweigui has quit [Quit: Gone...]
13:21
enebo has quit [Quit: enebo]
13:22
vlad_sta_ has joined #ruby-lang
13:22
vlad_starkov has quit [Read error: Connection reset by peer]
13:23
Forgetful_Lion has quit [Read error: Operation timed out]
13:24
elia has joined #ruby-lang
13:24
mdedetrich has quit [Client Quit]
13:25
Forgetful_Lion has joined #ruby-lang
13:32
mark- has quit [Ping timeout: 260 seconds]
13:33
Forgetful_Lion has quit [Read error: Operation timed out]
13:33
mark- has joined #ruby-lang
13:34
sharma__ has quit [Ping timeout: 260 seconds]
13:34
ryez has quit [Ping timeout: 250 seconds]
13:35
Forgetful_Lion has joined #ruby-lang
13:36
sharma__ has joined #ruby-lang
13:43
Forgetful_Lion has quit [Read error: Operation timed out]
13:45
Forgetful_Lion has joined #ruby-lang
13:53
Forgetful_Lion has quit [Read error: Operation timed out]
13:55
Forgetful_Lion has joined #ruby-lang
13:56
relix has quit [Ping timeout: 256 seconds]
13:57
relix has joined #ruby-lang
14:02
esad has joined #ruby-lang
14:02
foucist has joined #ruby-lang
14:03
nofxx has joined #ruby-lang
14:03
Forgetful_Lion has quit [Read error: Operation timed out]
14:03
<
foucist >
is there a way to define a method on the fly? instead of doing class Object; def tap2; yield(self); end; end why can't i do something like [1,2,3,4,5].send(yield(self), {|arr| p arr = arr.reduce(:+)/arr.size})
14:05
sharma__ has quit [Ping timeout: 268 seconds]
14:05
Forgetful_Lion has joined #ruby-lang
14:06
<
waxjar >
you can #instance_exec and #instance_eval stuff
14:08
<
waxjar >
or actually define an instance method: array = [1,2,3,4,5]; def array.tap2; yield self; end
14:11
<
apeiros >
foucist: btw., arr.reduce(:+)/arr.size is a broken impl for average
14:11
<
apeiros >
use .fdiv instead of /
14:12
<
apeiros >
also provide 0 as start value (gets you NaN for empty lists)
14:13
ledestin has quit [Ping timeout: 248 seconds]
14:13
Forgetful_Lion has quit [Read error: Operation timed out]
14:13
<
apeiros >
0/0 => NaN
14:13
<
whitequark >
oh, right.
14:14
<
apeiros >
which is somewhat appropriate for an average over an empty set
14:14
<
apeiros >
s/set/list/
14:14
<
whitequark >
better than NoMethodError, sure
14:14
<
apeiros >
the alternative would be a proper Exception
14:15
Forgetful_Lion has joined #ruby-lang
14:17
vlad_sta_ has quit [Remote host closed the connection]
14:22
toretore has joined #ruby-lang
14:23
jxie has joined #ruby-lang
14:23
Forgetful_Lion has quit [Read error: Operation timed out]
14:25
yfeldblum has quit [Ping timeout: 264 seconds]
14:25
Forgetful_Lion has joined #ruby-lang
14:25
<
foucist >
i've discovered that i can sorta fake the modified #tap behavior i want, by doing: [1,2,3,4,5].instance_exec { self.reduce(:+)/self.size}
14:26
ericwood has quit [Read error: Connection reset by peer]
14:27
<
apeiros >
foucist: "I've discovered" - seriously, why do you ask here if you don't read the responses? That's what waxjar told you 20min ago already…
14:28
<
foucist >
apeiros: i was researching instance_exec/eval based on his suggestion
14:28
<
foucist >
the docs weren't that helpful tho, so it felt like a 'discovery' :P
14:28
justinmburrous has joined #ruby-lang
14:29
justinmburrous has quit [Remote host closed the connection]
14:33
Forgetful_Lion has quit [Read error: Operation timed out]
14:35
jiuweigui has joined #ruby-lang
14:35
Forgetful_Lion has joined #ruby-lang
14:40
GaelanAintAround is now known as Gaelan
14:43
Forgetful_Lion has quit [Read error: Operation timed out]
14:45
Forgetful_Lion has joined #ruby-lang
14:48
vlad_starkov has joined #ruby-lang
14:50
schaerli has joined #ruby-lang
14:52
Nisstyre-laptop has joined #ruby-lang
14:53
heftig has quit [Ping timeout: 260 seconds]
14:53
Forgetful_Lion has quit [Read error: Operation timed out]
14:55
Nisstyre-laptop is now known as nisstyre
14:55
Forgetful_Lion has joined #ruby-lang
14:56
vlad_starkov has quit [Ping timeout: 248 seconds]
14:58
heftig has joined #ruby-lang
15:03
Forgetful_Lion has quit [Read error: Operation timed out]
15:05
Forgetful_Lion has joined #ruby-lang
15:11
nignaztic has joined #ruby-lang
15:12
nazty has quit [Read error: No route to host]
15:12
schaerli has quit [Remote host closed the connection]
15:13
dmitrykorotkov_ has quit [Read error: Connection reset by peer]
15:13
Forgetful_Lion has quit [Read error: Operation timed out]
15:13
<
maloik >
Anyone see where I'm going wrong here? bad value for range
15:13
<
maloik >
that's what I meant to paste
15:15
Forgetful_Lion has joined #ruby-lang
15:16
nicecomputerman has joined #ruby-lang
15:16
<
apeiros >
maloik: maybe a precedence issue.
15:17
<
apeiros >
put parens around your range
15:17
sevvie has joined #ruby-lang
15:17
nicecomputerman has left #ruby-lang [#ruby-lang]
15:17
nicecomputerman has joined #ruby-lang
15:18
<
maloik >
that seems to be a good start
15:19
nicecomputerman has quit [Client Quit]
15:19
<
apeiros >
if not, make sure (e.g. via binding.pry) your range values are what they should be.
15:19
nicecomputerman has joined #ruby-lang
15:20
<
maloik >
it's weird cause I thought I'd tried with parentheses
15:20
<
maloik >
how are you supposed to stub something like Time.now ?
15:21
<
apeiros >
Time.stub(:now) ?
15:21
<
maloik >
tried, fails
15:21
<
apeiros >
also see TimeCop
15:21
<
maloik >
I know TimeCop but it seemed like overkill here
15:21
<
apeiros >
define "fails" (don't have the time to help, though)
15:21
GeissT has quit [Quit: MillBroChat AdIRC User]
15:22
retro|cz has quit [Read error: Operation timed out]
15:22
<
apeiros >
I haven't stubbed Time with stubbing lib. but I've redefined Time.now a couple of times and it worked just fine.
15:22
<
nicecomputerman >
sup yeeeall
15:22
tomzx_mac has joined #ruby-lang
15:23
Forgetful_Lion has quit [Read error: Operation timed out]
15:24
dmitrykorotkov has joined #ruby-lang
15:24
dmitrykorotkov_ has joined #ruby-lang
15:25
<
nicecomputerman >
Let's try this again: What's up ladies and gentlemen?!
15:25
<
maloik >
apeiros: huh, thats weird? thats exactly what I did in the gist didn't I ?
15:25
<
maloik >
hi nicecomputerman
15:25
Forgetful_Lion has joined #ruby-lang
15:26
<
nicecomputerman >
@maloik -what's up brotha
15:26
schaerli has joined #ruby-lang
15:26
<
maloik >
okay are we being trolled ?
15:26
<
nicecomputerman >
Not by me. Lol
15:27
<
apeiros >
um, you use Time.now in your stub of Time.now? not sure that works out…
15:27
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
15:27
<
nicecomputerman >
i'm just super excited to be here. It took me a while to get IRC up and running
15:27
<
apeiros >
maloik: but as said, I did NOT use a stubbing lib
15:27
<
apeiros >
I just redefined the method.
15:27
<
nicecomputerman >
I realized I had to register my nick with freenode first. smh
15:28
<
nicecomputerman >
It's been forever since I last used irc
15:28
<
nicecomputerman >
i think back in 2002 was the last time.
15:28
<
apeiros >
maloik: but I don't think plain redefining is what you should aim for. try to get it to work with your stubbing lib.
15:28
<
nicecomputerman >
anyways, here the deal yo. I'm learning ruby. i learned the basics of the language
15:29
<
nicecomputerman >
but I'm kinda like..stuck.. How do I apply this to web dev?
15:29
<
nicecomputerman >
or dev at all, really.
15:29
<
nicecomputerman >
I went to railsinstaller and got set up with that, but honestly that's a step above where I want to be.. it's kinda, idk, too advanced.. i dont understand it
15:30
dmitrykorotkov_ has joined #ruby-lang
15:30
<
nicecomputerman >
Kinda sucks because I've been using computers since i was 10, im 28 now
15:30
<
nicecomputerman >
and I work as QA tester.. so i 'feel' like i understand software
15:30
<
nicecomputerman >
i guess i just dont know how to apply it..
15:30
<
canton7 >
nicecomputerman, what are you actually trying to do? that's the bit I'm missing
15:31
<
nicecomputerman >
i want to build a nuclear reactor
15:31
<
canton7 >
is it that you've got a good grasp and ruby and want to get into rails?
15:31
<
nicecomputerman >
@canton7 - pardon the sarcasm.. yes, that's pretty much exactly it.
15:31
dmitrykorotkov_ has quit [Client Quit]
15:32
dmitrykorotkov__ has joined #ruby-lang
15:32
<
canton7 >
then there are about a billion and one decent tutorials which will get you started
15:32
<
nicecomputerman >
i have a good grasp of ruby and now i want to do something (anything) with it. Something beyond 'hello, world' or iterating through a list or something
15:32
<
canton7 >
(also, this channel doesn't deal with rails stuff - that's #rubyonrails)
15:33
<
canton7 >
ah, you're after projects?
15:33
dmitrykorotkov__ has quit [Remote host closed the connection]
15:33
<
nicecomputerman >
..perhaps
15:33
Forgetful_Lion has quit [Read error: Operation timed out]
15:33
<
canton7 >
there's always project euler. some of them are more mathematical than programming, but some are good
15:33
<
nicecomputerman >
Yea, like a small project. Maybe a collaborative one.. idk
15:33
<
maloik >
apeiros: went with timecop
15:33
<
canton7 >
otherwise, figure out something you need in real life, and have a crack at writing it
15:34
<
maloik >
trying to figure out why I'm not getting proper failure messagess back from minitest now
15:34
<
maloik >
(rspec user here...)
15:35
Forgetful_Lion has joined #ruby-lang
15:35
scottschecter has joined #ruby-lang
15:36
<
nicecomputerman >
Using Ruby can I create an application that will accept a .txt file and sort it based on numeric values
15:37
<
nicecomputerman >
Either returning a new text file or outputting html
15:37
<
canton7 >
cool. ever seen countdown? write two programs - one to solve the letters round, one to solve the numbers round
15:38
<
canton7 >
that should keep you busy for a little while ;)
15:39
dmitrykorotkov__ has joined #ruby-lang
15:40
<
nicecomputerman >
oops
15:41
hogeo has quit [Remote host closed the connection]
15:41
<
nicecomputerman >
That's a list of professors and their salaries, from a community college system in my area
15:41
<
nicecomputerman >
I want to order that ish by salary.
15:43
Forgetful_Lion has quit [Read error: Operation timed out]
15:43
<
nicecomputerman >
In python:
15:44
<
canton7 >
aah that was a quesiton, not a statement. gotcha
15:44
<
nicecomputerman >
f = open('salaries.txt', 'r+')
15:44
<
nicecomputerman >
('salaries.txt', 'r+')
15:44
<
nicecomputerman >
ln = f.readline()
15:44
<
nicecomputerman >
while ln != '':
15:44
<
nicecomputerman >
if ln.find('$') != -1:
15:44
<
nicecomputerman >
usd_list = []
15:44
<
nicecomputerman >
usd_list.append(tuple(ln.split('$')))
15:44
<
nicecomputerman >
ln = f.readline()
15:44
<
nicecomputerman >
sorted(usd_list, key=lambda usd: usd[1])
15:44
<
nicecomputerman >
f2 = open('sorted_salaries.txt', 'r+')
15:44
<
nicecomputerman >
f2.write(str(usd_list))
15:44
<
canton7 >
AHEM. pastebin please
15:45
Forgetful_Lion has joined #ruby-lang
15:46
<
nicecomputerman >
sorry
15:46
<
apeiros >
puts File.readlines(path).sort_by { |line| line[/[\d,.]{5,}/].delete(",").to_f }
15:46
<
apeiros >
@ nicecomputerman ^ - something along those lines should do
15:46
<
canton7 >
darn, just beat me
15:46
dmitrykorotkov__ has joined #ruby-lang
15:46
dmitrykorotkov__ has quit [Client Quit]
15:47
<
apeiros >
canton7 surely helps you remove the kinks this code probably still has :)
15:47
dmitrykorotkov has quit [Remote host closed the connection]
15:48
<
canton7 >
meh. I had a very slightly different regex, but I was going to leave it where you left yours :P
15:48
<
nicecomputerman >
Doesnt work.
15:49
<
canton7 >
you're learning ruby - you fix it ;)
15:50
<
nicecomputerman >
regex.. I guess i'll learn it now.
15:50
nertzy has joined #ruby-lang
15:50
<
apeiros >
you probably have to add provisions for lines without salaries in it. I'd probably just use grep(/\$[\d,.]{5,}/) to find those with a salary
15:50
<
apeiros >
puts File.readlines(path).grep(/\$[\d,.]{5,}/).sort_by { |line| line[/\$[\d,.]{5,}/].delete(",$").to_f }
15:51
<
canton7 >
puts File.readlines(path).sort_by { |line| (line[/[\d,.]{5,}/] || '').delete(",").to_f }
15:51
<
nicecomputerman >
^ works.
15:51
<
nicecomputerman >
Thanks
15:52
Gaelan is now known as GaelanAintAround
15:53
Forgetful_Lion has quit [Read error: Operation timed out]
15:53
sush24 has joined #ruby-lang
15:53
GaelanAintAround is now known as Gaelan
15:54
wallerdev has joined #ruby-lang
15:54
cads has quit [Ping timeout: 252 seconds]
15:54
dmitrykorotkov_ has joined #ruby-lang
15:55
Forgetful_Lion has joined #ruby-lang
15:56
<
nicecomputerman >
Apeiros
15:56
<
nicecomputerman >
Are you familiar with AppAacademy
15:58
<
nicecomputerman >
Im trying to get in but I think it'll be too hard.
15:59
<
nicecomputerman >
This guy went - apparently you helped him with something?
16:00
dmitrykorotkov__ has joined #ruby-lang
16:01
<
apeiros >
nicecomputerman: I'm here for ~8y, I helped a couple of people with something :)
16:02
<
nicecomputerman >
Lol.
16:03
Forgetful_Lion has quit [Read error: Operation timed out]
16:04
dmitrykorotkov__ has left #ruby-lang [#ruby-lang]
16:05
Forgetful_Lion has joined #ruby-lang
16:08
Gaelan is now known as GaelanAintAround
16:09
GaelanAintAround has quit [Quit: Bye!]
16:10
Bosox20051 has quit [Remote host closed the connection]
16:11
vlad_starkov has joined #ruby-lang
16:12
dmitrykorotkov has joined #ruby-lang
16:12
GaelanAintAround has joined #ruby-lang
16:13
Forgetful_Lion has quit [Read error: Operation timed out]
16:13
zz_dlu has joined #ruby-lang
16:15
Forgetful_Lion has joined #ruby-lang
16:18
GaelanAintAround is now known as Gaelan
16:20
banisterfiend has quit [Quit: Computer has gone to sleep.]
16:23
Forgetful_Lion has quit [Read error: Operation timed out]
16:23
CaryInVictoria has joined #ruby-lang
16:25
Forgetful_Lion has joined #ruby-lang
16:26
ericwood has joined #ruby-lang
16:26
<
yorickpeterse >
whitequark: oi, do you know if somebody was ever crazy enough to make a Ruby binding for Lemon?
16:26
tkuchiki has quit [Remote host closed the connection]
16:27
<
yorickpeterse >
racc doesn't look very nice tbh
16:27
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
16:29
<
chris2 >
it's ok imo
16:29
vlad_starkov has quit [Remote host closed the connection]
16:30
vlad_starkov has joined #ruby-lang
16:32
tylersmith has joined #ruby-lang
16:33
Forgetful_Lion has quit [Read error: Operation timed out]
16:34
loincloth has joined #ruby-lang
16:35
Forgetful_Lion has joined #ruby-lang
16:38
loincloth has quit [Ping timeout: 248 seconds]
16:40
Gaelan is now known as GaelanAintAround
16:43
Forgetful_Lion has quit [Read error: Operation timed out]
16:44
vlad_sta_ has joined #ruby-lang
16:45
brianpWins has quit [Quit: brianpWins]
16:45
schaerli has quit [Remote host closed the connection]
16:45
crzrcn has joined #ruby-lang
16:45
gtwhite has joined #ruby-lang
16:45
wallerdev has quit [Quit: wallerdev]
16:45
Forgetful_Lion has joined #ruby-lang
16:46
<
crzrcn >
Is there a difference between %w[] and %w() to generate Array literals?
16:47
retro|cz has joined #ruby-lang
16:48
vlad_starkov has quit [Ping timeout: 264 seconds]
16:49
<
whitequark >
yorickpeterse: there's no point in it
16:49
<
whitequark >
you have to write a binding for each parser distinctly
16:49
<
whitequark >
also I heavily recommend against using that... you'll spend much more time integrating lemon than writing useful code
16:49
<
whitequark >
"doesn't look very nice" is a shitty excuse
16:51
<
foucist >
it seems that nobody has figured out a good looking DSL for parsing. . hence regexp & bnf looking ugly
16:53
<
whitequark >
there are, just in neither c nor ruby
16:53
<
whitequark >
(and bnf isn't bad; it's just that bison and yacc don't implement it.)
16:53
cstrahan has joined #ruby-lang
16:53
Forgetful_Lion has quit [Read error: Operation timed out]
16:55
Forgetful_Lion has joined #ruby-lang
16:59
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
17:00
zenspider has quit [Quit: bye]
17:01
apeiros has quit [Remote host closed the connection]
17:03
nertzy has quit [Quit: This computer has gone to sleep]
17:03
Forgetful_Lion has quit [Read error: Operation timed out]
17:04
CaryInVictoria has quit [Remote host closed the connection]
17:05
Forgetful_Lion has joined #ruby-lang
17:06
CaryInVictoria has joined #ruby-lang
17:07
tbuehlmann has quit [Remote host closed the connection]
17:09
cstrahan has quit [Ping timeout: 268 seconds]
17:10
<
nofxx >
hehe, want to make a rspec/test run on any project w/o one line of test code ? tail -f production log + sitemap generator -> endless fun!
17:10
<
nofxx >
project/web project
17:12
jaimef has quit [Excess Flood]
17:13
jaimef has joined #ruby-lang
17:13
Forgetful_Lion has quit [Read error: Operation timed out]
17:15
Forgetful_Lion has joined #ruby-lang
17:19
mistym has joined #ruby-lang
17:19
CaryInVictoria has quit [Remote host closed the connection]
17:19
dhruvasagar has joined #ruby-lang
17:20
wallerdev has joined #ruby-lang
17:20
sniffingcats has joined #ruby-lang
17:21
adambeynon has joined #ruby-lang
17:23
Forgetful_Lion has quit [Read error: Operation timed out]
17:24
sush24 has quit [Quit: This computer has gone to sleep]
17:24
<
yorickpeterse >
whitequark: heh
17:25
Forgetful_Lion has joined #ruby-lang
17:25
CaryInVictoria has joined #ruby-lang
17:26
<
nofxx >
Feel an urge to this be an oneliner... any better way? (@title ||= ''); @title += 'fu'
17:27
brianpWins has joined #ruby-lang
17:27
<
nofxx >
@title = "#{@title} fu"
17:29
elia has quit [Quit: Computer has gone to sleep.]
17:30
tubbo has joined #ruby-lang
17:32
<
whitequark >
@title = [@title, 'fu'].compact.join(' ')
17:32
vlad_starkov has joined #ruby-lang
17:33
Forgetful_Lion has quit [Read error: Operation timed out]
17:33
<
yorickpeterse >
clearly you need a title factory here
17:34
<
yorickpeterse >
or just `@title = @title ? @title + 'fu' : ''
17:35
Forgetful_Lion has joined #ruby-lang
17:36
vlad_sta_ has quit [Ping timeout: 240 seconds]
17:36
vlad_sta_ has joined #ruby-lang
17:37
vlad_starkov has quit [Read error: Operation timed out]
17:37
CaryInVictoria has quit [Remote host closed the connection]
17:40
retro|cz has quit [Ping timeout: 268 seconds]
17:40
crzrcn has left #ruby-lang [#ruby-lang]
17:41
apeiros has joined #ruby-lang
17:43
Forgetful_Lion has quit [Read error: Operation timed out]
17:45
Forgetful_Lion has joined #ruby-lang
17:46
kurko_ has joined #ruby-lang
17:48
elia has joined #ruby-lang
17:52
CaryInVictoria has joined #ruby-lang
17:53
<
ryanf >
whitequark: lately I've been really liking * instead of compact. not sure if other people find it readable though
17:53
<
ryanf >
so @title = [*@title, 'fu'].join(' ')
17:53
Forgetful_Lion has quit [Read error: Operation timed out]
17:53
<
canton7 >
do you mean #concat?
17:54
<
ryanf >
who, me? no
17:55
<
canton7 >
as * doesn't replace compact, surely? compact removes nils, and splat does nothing of the sort? or am I missing something?
17:55
Forgetful_Lion has joined #ruby-lang
17:56
cstrahan has joined #ruby-lang
17:56
schaerli has joined #ruby-lang
17:58
havenwood has joined #ruby-lang
17:59
vlad_sta_ has quit [Remote host closed the connection]
17:59
<
Mon_Ouie >
You might mean flatten
17:59
<
Mon_Ouie >
or flatten(1)
17:59
<
Mon_Ouie >
Oh, I guess it works in the case of [@title, 'fu'] though (as nil.to_a #=> [])
18:00
hakunin has quit [Ping timeout: 245 seconds]
18:00
<
canton7 >
ah if @title is nil. yeah that makes sense
18:00
<
canton7 >
I think we've just shown that that snippet is non-obvious :P
18:02
schaerli has quit [Remote host closed the connection]
18:03
Forgetful_Lion has quit [Read error: Operation timed out]
18:05
Forgetful_Lion has joined #ruby-lang
18:07
grandy has quit [Ping timeout: 268 seconds]
18:07
tubbo has quit [Ping timeout: 276 seconds]
18:08
Guest85414__ has quit [Ping timeout: 240 seconds]
18:08
dhruvasagar has quit [Ping timeout: 261 seconds]
18:08
UziMonkey has quit [Ping timeout: 245 seconds]
18:08
franckverrot has quit [Ping timeout: 245 seconds]
18:09
norplr_ has quit [Ping timeout: 245 seconds]
18:10
IteratorP has quit [Ping timeout: 260 seconds]
18:10
mindriot101 has quit [Remote host closed the connection]
18:11
<
rue >
You don’t say
18:13
Forgetful_Lion has quit [Read error: Operation timed out]
18:15
tenderlove has quit [Remote host closed the connection]
18:15
tenderlove has joined #ruby-lang
18:15
Forgetful_Lion has joined #ruby-lang
18:16
fuhgeddaboudit has joined #ruby-lang
18:16
elia has quit [Quit: Computer has gone to sleep.]
18:17
lsegal has joined #ruby-lang
18:19
D9_ has joined #ruby-lang
18:19
lsegal has quit [Read error: Connection reset by peer]
18:19
lsegal has joined #ruby-lang
18:20
hakunin has joined #ruby-lang
18:21
nofxx has quit [Ping timeout: 248 seconds]
18:22
ruby-lang626 has joined #ruby-lang
18:22
ruby-lang626 has quit [Client Quit]
18:23
Forgetful_Lion has quit [Read error: Operation timed out]
18:24
schaerli has joined #ruby-lang
18:25
Forgetful_Lion has joined #ruby-lang
18:29
nofxx has joined #ruby-lang
18:31
schaerli has quit [Remote host closed the connection]
18:33
Forgetful_Lion has quit [Read error: Operation timed out]
18:34
loincloth has joined #ruby-lang
18:34
schaerli has joined #ruby-lang
18:35
arope28 has quit [Quit: arope28]
18:35
Forgetful_Lion has joined #ruby-lang
18:39
loincloth has quit [Ping timeout: 248 seconds]
18:40
schaerli has quit [Remote host closed the connection]
18:43
Forgetful_Lion has quit [Read error: Operation timed out]
18:44
tharindu_ has quit [Remote host closed the connection]
18:45
Forgetful_Lion has joined #ruby-lang
18:49
nisstyre has quit [Quit: Leaving]
18:53
Forgetful_Lion has quit [Read error: Operation timed out]
18:55
Forgetful_Lion has joined #ruby-lang
18:56
banisterfiend has joined #ruby-lang
19:01
banisterfiend has quit [Ping timeout: 264 seconds]
19:03
Forgetful_Lion has quit [Read error: Operation timed out]
19:05
Forgetful_Lion has joined #ruby-lang
19:08
gtwhite has quit [Quit: Page closed]
19:10
skade has quit [Quit: Computer has gone to sleep.]
19:11
schaerli has joined #ruby-lang
19:12
Mon_Ouie has quit [Ping timeout: 264 seconds]
19:13
Forgetful_Lion has quit [Read error: Operation timed out]
19:15
Forgetful_Lion has joined #ruby-lang
19:16
schaerli has quit [Ping timeout: 248 seconds]
19:16
postmodern has quit [Quit: Leaving]
19:16
symm- has quit [Ping timeout: 260 seconds]
19:18
stamina has quit [Ping timeout: 264 seconds]
19:23
Forgetful_Lion has quit [Read error: Operation timed out]
19:24
norplr_ has joined #ruby-lang
19:25
Forgetful_Lion has joined #ruby-lang
19:26
banisterfiend has joined #ruby-lang
19:27
mindriot101 has joined #ruby-lang
19:33
Forgetful_Lion has quit [Read error: Operation timed out]
19:35
Forgetful_Lion has joined #ruby-lang
19:36
kurko_ has quit [Ping timeout: 260 seconds]
19:37
kurko_ has joined #ruby-lang
19:38
mbj has joined #ruby-lang
19:41
kurko_ has quit [Client Quit]
19:43
Forgetful_Lion has quit [Read error: Operation timed out]
19:44
Bosox20051 has joined #ruby-lang
19:45
Forgetful_Lion has joined #ruby-lang
19:48
brianpWins has quit [Quit: brianpWins]
19:50
CaryInVictoria has quit [Remote host closed the connection]
19:53
shevy has joined #ruby-lang
19:53
Forgetful_Lion has quit [Read error: Operation timed out]
19:55
elia has joined #ruby-lang
19:55
Forgetful_Lion has joined #ruby-lang
19:59
D9_ has quit [Ping timeout: 248 seconds]
20:00
tubbo has joined #ruby-lang
20:01
stamina has joined #ruby-lang
20:03
Forgetful_Lion has quit [Read error: Operation timed out]
20:04
grandy has joined #ruby-lang
20:05
UziMonkey has joined #ruby-lang
20:05
Forgetful_Lion has joined #ruby-lang
20:06
franckverrot has joined #ruby-lang
20:08
IteratorP has joined #ruby-lang
20:11
brianpWins has joined #ruby-lang
20:13
Forgetful_Lion has quit [Read error: Operation timed out]
20:14
VTLob has joined #ruby-lang
20:15
Guest85414__ has joined #ruby-lang
20:15
D9_ has joined #ruby-lang
20:15
Forgetful_Lion has joined #ruby-lang
20:20
D9_ has quit [Ping timeout: 252 seconds]
20:23
Forgetful_Lion has quit [Read error: Operation timed out]
20:25
Forgetful_Lion has joined #ruby-lang
20:27
TheNotary has joined #ruby-lang
20:28
havenwood has quit [Remote host closed the connection]
20:28
schaerli has joined #ruby-lang
20:29
foucist has quit [Quit: leaving]
20:29
havenwood has joined #ruby-lang
20:33
Forgetful_Lion has quit [Read error: Operation timed out]
20:34
havenwood has quit [Ping timeout: 252 seconds]
20:35
Forgetful_Lion has joined #ruby-lang
20:38
schaerli has quit [Remote host closed the connection]
20:41
arBmind has joined #ruby-lang
20:43
kurko_ has joined #ruby-lang
20:43
Forgetful_Lion has quit [Read error: Operation timed out]
20:45
Forgetful_Lion has joined #ruby-lang
20:46
jaimef has quit [Excess Flood]
20:47
MaddinXx has quit [Remote host closed the connection]
20:48
CaryInVictoria has joined #ruby-lang
20:52
jaimef has joined #ruby-lang
20:53
Forgetful_Lion has quit [Read error: Operation timed out]
20:55
Bosox20051 has quit [Quit: Leaving]
20:55
Forgetful_Lion has joined #ruby-lang
20:56
nofxx has quit [Ping timeout: 260 seconds]
20:56
TheNotary has quit [Quit: Leaving]
20:57
pskosinski__ has joined #ruby-lang
20:57
sniffingcats has quit [Disconnected by services]
20:57
pskosinski__ is now known as sniffingcats
20:58
runeb has joined #ruby-lang
21:00
hashkey has joined #ruby-lang
21:00
adambeynon has joined #ruby-lang
21:03
Forgetful_Lion has quit [Read error: Operation timed out]
21:05
Forgetful_Lion has joined #ruby-lang
21:09
jonahR has joined #ruby-lang
21:13
Forgetful_Lion has quit [Read error: Operation timed out]
21:15
tylersmith has quit [Ping timeout: 264 seconds]
21:15
Forgetful_Lion has joined #ruby-lang
21:16
hogeo has joined #ruby-lang
21:17
hhatch has quit [Read error: Operation timed out]
21:18
s0ber has quit [Ping timeout: 245 seconds]
21:21
hogeo has quit [Remote host closed the connection]
21:22
runeb has quit [Remote host closed the connection]
21:23
Forgetful_Lion has quit [Read error: Operation timed out]
21:24
D9_ has joined #ruby-lang
21:24
Bosox20051 has joined #ruby-lang
21:25
Forgetful_Lion has joined #ruby-lang
21:28
elia has quit [Quit: Computer has gone to sleep.]
21:29
shevy has left #ruby-lang ["I'll be back ... maybe"]
21:33
Forgetful_Lion has quit [Read error: Operation timed out]
21:35
Forgetful_Lion has joined #ruby-lang
21:43
Forgetful_Lion has quit [Read error: Operation timed out]
21:45
Forgetful_Lion has joined #ruby-lang
21:45
<
ljarvis >
zzak: how was your talk?
21:48
toretore has quit [Quit: Leaving]
21:53
Forgetful_Lion has quit [Read error: Operation timed out]
21:55
Forgetful_Lion has joined #ruby-lang
21:56
nofxx has joined #ruby-lang
21:57
mistym has quit [Remote host closed the connection]
21:57
mdedetrich has joined #ruby-lang
21:59
heftig has quit [Ping timeout: 260 seconds]
22:03
Forgetful_Lion has quit [Read error: Operation timed out]
22:05
Forgetful_Lion has joined #ruby-lang
22:07
znz_jp has quit [Ping timeout: 260 seconds]
22:10
relix has joined #ruby-lang
22:13
Forgetful_Lion has quit [Read error: Operation timed out]
22:15
vlad_starkov has joined #ruby-lang
22:15
D9_ has quit [Ping timeout: 252 seconds]
22:15
Forgetful_Lion has joined #ruby-lang
22:22
tubbo has quit [Ping timeout: 276 seconds]
22:22
bastilian has joined #ruby-lang
22:23
Forgetful_Lion has quit [Read error: Operation timed out]
22:23
cads has joined #ruby-lang
22:24
mbj has quit [Quit: leaving]
22:25
Forgetful_Lion has joined #ruby-lang
22:26
CaryInVictoria has quit [Remote host closed the connection]
22:33
runeb has joined #ruby-lang
22:33
Forgetful_Lion has quit [Read error: Operation timed out]
22:35
dmitrykorotkov_ has joined #ruby-lang
22:35
Forgetful_Lion has joined #ruby-lang
22:37
runeb has quit [Ping timeout: 252 seconds]
22:38
skade has joined #ruby-lang
22:38
dmitrykorotkov has quit [Ping timeout: 248 seconds]
22:40
thepumpkin has joined #ruby-lang
22:40
tubbo has joined #ruby-lang
22:41
jiuweigui has quit [Quit: Gone...]
22:41
jbsan_ has joined #ruby-lang
22:41
jbsan has quit [Ping timeout: 245 seconds]
22:41
jbsan_ is now known as jbsan
22:41
CaryInVictoria has joined #ruby-lang
22:41
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
22:43
Boohbah has quit [Remote host closed the connection]
22:43
Forgetful_Lion has quit [Read error: Operation timed out]
22:43
Boohbah has joined #ruby-lang
22:45
Forgetful_Lion has joined #ruby-lang
22:51
sepp2k1 has joined #ruby-lang
22:53
sepp2k has quit [Ping timeout: 268 seconds]
22:53
Forgetful_Lion has quit [Read error: Operation timed out]
22:53
banisterfiend is now known as banister`sleep
22:55
Forgetful_Lion has joined #ruby-lang
22:56
skade has quit [Quit: Computer has gone to sleep.]
22:57
Forgetful_Lion has quit [Client Quit]
23:05
Boohbah has quit [Remote host closed the connection]
23:05
Boohbah has joined #ruby-lang
23:07
brianpWins has quit [Quit: brianpWins]
23:09
workmad3 is now known as wm3|zzz
23:17
mdedetrich has quit [Quit: Computer has gone to sleep.]
23:18
mdedetrich has joined #ruby-lang
23:19
bastilian has joined #ruby-lang
23:19
Coincidental has joined #ruby-lang
23:19
x0f has joined #ruby-lang
23:23
x0f_ has quit [Ping timeout: 260 seconds]
23:32
mdedetrich has quit [Quit: Computer has gone to sleep.]
23:33
kurko_ has quit [Ping timeout: 252 seconds]
23:34
kazuuu has joined #ruby-lang
23:34
kurko_ has joined #ruby-lang
23:35
vlad_starkov has quit [Remote host closed the connection]
23:36
Boohbah has quit [Ping timeout: 240 seconds]
23:36
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
23:38
Boohbah has joined #ruby-lang
23:38
CaryInVictoria has quit [Remote host closed the connection]
23:42
ruskie has quit [Ping timeout: 245 seconds]
23:52
benanne has quit [Quit: kbai]
23:59
izzy006 has joined #ruby-lang