jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<riceandbeans> eh?
<riceandbeans> like config_option = true, config_option.value = 'foo' ?
<apeiros> like show_foo_part = true/false
<smathy> riceandbeans, the former.
<apeiros> alternatively what baweaver showed - set it to nil if it should not be shown, to any non-nil/false value which you can use in the content part too if it should be shown.
<smathy> riceandbeans, then just `if your_var`
marr has quit [Ping timeout: 246 seconds]
lemur has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
<riceandbeans> ok, I can accept that
<riceandbeans> nil vs non nil
frozen3 has quit [Read error: Connection reset by peer]
<riceandbeans> simple enough
<riceandbeans> well...wait
<riceandbeans> >> v = -1; v.nil?
<ruby[bot]> riceandbeans: # => false (https://eval.in/545288)
<riceandbeans> >> v = 0; v.nil?
<ruby[bot]> riceandbeans: # => false (https://eval.in/545289)
LoneHermit has joined #ruby
<riceandbeans> >> v = ''; v.nil?
<ruby[bot]> riceandbeans: # => false (https://eval.in/545290)
<apeiros> -.-
<apeiros> ?experiment riceandbeans
<ruby[bot]> riceandbeans: Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<riceandbeans> ...ok...I think I'll be good then, just worried about edge cases
<Ox0dea> First day with Ruby, eh?
<apeiros> and - surprise - only nil.nil? is true. and only nil/false won't branch into `if foo`
<riceandbeans> not exactly
<smathy> riceandbeans, I wouldn't use .nil? - just test the var. false.nil? is false, and the last thing you want is for `show_stuff = false` to SHOW the view.
<riceandbeans> :\ yeah
<riceandbeans> it doesn't help that it's for a giant config file so spotting an error is a needle in a hay stack
<riceandbeans> I need to get it right
madgen has quit [Ping timeout: 264 seconds]
<riceandbeans> anyway, bbl
<apeiros> even worse if you use implicit meaning
<riceandbeans> thanks
<apeiros> like whether the variable exists or not…
wilbert has quit [Ping timeout: 252 seconds]
goglosh has quit [Ping timeout: 268 seconds]
Inside has quit [Ping timeout: 268 seconds]
rkazak has joined #ruby
benlieb has joined #ruby
wilbert has joined #ruby
rbennacer has joined #ruby
Rutix has quit [Ping timeout: 264 seconds]
LoneHermit has quit [Ping timeout: 250 seconds]
hiyosi has joined #ruby
frozen3 has joined #ruby
Ropeney has joined #ruby
tubuliferous_ has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
Vile` has joined #ruby
Gasher has quit [Quit: Leaving]
roshanavand has quit [Quit: This computer has gone to sleep]
abyx has quit [Quit: This computer has gone to sleep]
edwinvdgraaf has joined #ruby
kies has joined #ruby
zzz has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
radens has joined #ruby
radens has left #ruby ["WeeChat 1.3"]
uglybandersnatch has quit [Ping timeout: 244 seconds]
Aviio has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
ruby-lang326 has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
babblebre has joined #ruby
mistermo_ has joined #ruby
blackmesa has quit [Quit: WeeChat 1.4]
edwinvdgraaf has quit [Ping timeout: 250 seconds]
<ruby-lang326> I am creating a poker simulator with Ruby and it contains a module Ranking that checks an array of Cards and determines what combination you might have.
<ruby-lang326> My question is a module the right approach? I was wondering if I should make that a class instead. Also I am not sure how to start with testing a module.
abyx has joined #ruby
abyx has quit [Client Quit]
<RickHull> modules are the easiest to test
<RickHull> i start with them first
mistermocha has quit [Ping timeout: 246 seconds]
<RickHull> module methods (at the class layer) have no private state
<RickHull> so output generally just depends on input
<RickHull> aka "static" methods
<Ox0dea> ruby-lang326: Why not a #value method on a Hand class?
<RickHull> generally you can only go so far with a bare module, and you want to add state. then just call it a class, def initialize, and figure out what you need for private state
rbennacer has quit [Remote host closed the connection]
kies has quit [Ping timeout: 248 seconds]
mistermo_ has quit [Ping timeout: 248 seconds]
ramfjord has joined #ruby
jenrzzz has joined #ruby
rubie has quit [Remote host closed the connection]
jdawgaz has joined #ruby
DTZUZU has joined #ruby
rubie has joined #ruby
lxsameer has quit [Quit: WeeChat 1.4]
pawnbox has quit [Ping timeout: 240 seconds]
rubie has quit [Ping timeout: 252 seconds]
bronson has quit [Remote host closed the connection]
ekinmur has joined #ruby
blackgoat has quit [Ping timeout: 276 seconds]
ruby-lang326 has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
skade has joined #ruby
ramfjord has quit [Ping timeout: 252 seconds]
ramfjord has joined #ruby
bhaak has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
n008f4g_ has quit [Ping timeout: 246 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
xlegoman has quit [Quit: xlegoman]
solocshaw1 has joined #ruby
solocshaw has quit [Read error: Connection reset by peer]
solocshaw1 is now known as solocshaw
maletor has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
sarbs has quit [Ping timeout: 250 seconds]
sarbs has joined #ruby
shazaum_ has joined #ruby
jdawgaz has joined #ruby
freerobby has quit [Quit: Leaving.]
jdawgaz has quit [Client Quit]
sneakerhax has quit [Ping timeout: 276 seconds]
Guest69884 has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 276 seconds]
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest70829
skade has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby
skade has quit [Client Quit]
AustinMatherne has joined #ruby
wilbert has quit [Ping timeout: 252 seconds]
amclain has quit [Quit: Leaving]
frozen3 has quit [Read error: Connection reset by peer]
FooMunki has quit [Quit: FooMunki]
stunder has joined #ruby
FooMunki has joined #ruby
rolha_ has joined #ruby
rolha has quit [Ping timeout: 276 seconds]
lyoshajapan has joined #ruby
ur5us has quit [Remote host closed the connection]
frozen3 has joined #ruby
goglosh has joined #ruby
itaipu has joined #ruby
ur5us has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
ur5us has quit [Remote host closed the connection]
<goglosh> what was the name that replaced Config::CONFIG?
<goglosh> oh yes RbConfig
blackgoat has joined #ruby
freerobby has joined #ruby
andywojo has quit [Ping timeout: 240 seconds]
FooMunki has quit [Quit: FooMunki]
<darix> goglosh: that's like *years* ago :p
<goglosh> yeah but I'm reading a book that says "look into Config::CONFIG"
stantona has quit [Ping timeout: 248 seconds]
<goglosh> maybe I should read something more modern? :9
<darix> goglosh: what book are you reading? maybe there is an updated version of it
blackgoat has quit [Client Quit]
<goglosh> the well grounded rubyist
<havenwood> goglosh: the second edition covers Ruby 2
<goglosh> oh nice
<goglosh> lemme find it
cpup has quit [Ping timeout: 246 seconds]
hotpancakes has joined #ruby
cpup has joined #ruby
<darix> goglosh: www.amazon.com :p
<goglosh> yeah, moni is not my strong point :`
itaipu has quit [Ping timeout: 248 seconds]
jdawgaz has joined #ruby
minimalism has joined #ruby
blackgoat has joined #ruby
<tzhuang> j/quit
tzhuang has quit [Quit: leaving]
jackjackdripper has quit [Quit: Leaving.]
hxegon has quit [Ping timeout: 268 seconds]
goglosh has quit [Ping timeout: 250 seconds]
frem has quit [Quit: Connection closed for inactivity]
baweaver has quit [Remote host closed the connection]
andywojo has joined #ruby
djbkd has joined #ruby
bronson has joined #ruby
GodFather has quit [Ping timeout: 244 seconds]
wilbert has joined #ruby
stunder has quit [Ping timeout: 260 seconds]
arescorpio has joined #ruby
ur5us has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
sarbs has quit [Ping timeout: 250 seconds]
sorbo_ has joined #ruby
Aviio has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
ramfjord has quit [Ping timeout: 248 seconds]
Aswebb_ has joined #ruby
shazaum_ has quit [Quit: Leaving]
leon_e has joined #ruby
hahuang61 has quit [Ping timeout: 248 seconds]
sarbs has joined #ruby
leon_e has quit [Client Quit]
sudoubuntu has joined #ruby
moeabdol has joined #ruby
leon_e has joined #ruby
Aswebb_ has quit [Ping timeout: 260 seconds]
sorbo_ has quit [Remote host closed the connection]
benlovell has joined #ruby
saneax is now known as saneax_AFK
ur5us has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
sarbs has quit [Ping timeout: 244 seconds]
benlovell has quit [Ping timeout: 264 seconds]
frozen3 has quit [Read error: Connection reset by peer]
emmanuel_erc has joined #ruby
emmanuel_erc has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
Xeago has quit [Ping timeout: 244 seconds]
rubie has joined #ruby
bedouin_ has quit [Ping timeout: 264 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
ur5us has joined #ruby
bedouin_ has joined #ruby
bkxd has joined #ruby
maletor has joined #ruby
sarbs has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
sarbs has quit [Ping timeout: 244 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
frozen3 has joined #ruby
yqt has quit [Ping timeout: 276 seconds]
sarbs has joined #ruby
abyx has joined #ruby
jdawgaz has joined #ruby
stantona has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
jdawgaz has quit [Client Quit]
abyx has quit [Client Quit]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
rmulliga` has joined #ruby
IrishGringo has joined #ruby
jt__ has joined #ruby
G has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
kies has joined #ruby
diegoaguilar has joined #ruby
Rixius|Alt has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Remote host closed the connection]
Rixius has joined #ruby
bronson has joined #ruby
moeabdol1 has joined #ruby
ur5us has quit [Remote host closed the connection]
sarbs has quit [Ping timeout: 276 seconds]
bronson has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 244 seconds]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
ur5us has joined #ruby
yfeldblum has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
sorbo_ has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rubie has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 250 seconds]
G has quit [Quit: leaving]
Suntzu has quit [Read error: Connection reset by peer]
sudoubuntu has joined #ruby
mistermocha has quit [Ping timeout: 264 seconds]
jdawgaz has quit [Client Quit]
sorbo_ has quit [Remote host closed the connection]
jdawgaz has joined #ruby
sp4rrow has joined #ruby
shadoi has quit [Quit: Leaving.]
jdawgaz has quit [Client Quit]
Spami_ has quit [Quit: This computer has gone to sleep]
mostlybadfly has joined #ruby
jt__ has quit [Remote host closed the connection]
hiyosi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Chagel has joined #ruby
jdawgaz has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hahuang61 has joined #ruby
tref has joined #ruby
kam270 has quit [Ping timeout: 244 seconds]
jkahn has quit [Remote host closed the connection]
statelesscode has joined #ruby
<tref> hey guys I’m looking for the best resource for learning basic algorithms in either ruby or JS. Preferably something at the beginner level with examples of real world application on stuff like: [Hash tables, Linked lists, Breadth-first search, depth-first search, Quicksort, merge sort, Binary search, 2D arrays, Dynamic arrays, Binary search trees, Dynamic programming, Big-O analysis]
<benzrf> tref: this is not stuff that has real world application if you'rew riting ruby
<benzrf> *writing
<benzrf> tref: most of this stuff is only things that get implemented in C
<benzrf> well, maybe not big-o
<Ox0dea> And search.
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tref> benzrf this because of the higher-level implementation of Ruby?
hahuang61 has quit [Ping timeout: 260 seconds]
<tref> I’m in the process of interviewing and it seems to be a pretty common question that comes up
<benzrf> that's kind of silly :(
<tref> benzrf: tell me about it
<tref> its a torrent of problems about shit I’ve never used in practice
<Ox0dea> Computer science != software development.
<tref> Ox0dea EXACTLY
<Ox0dea> tref: But it's the same logic that makes standardized testing a reasonable thing to do.
<tref> Ox0dea: I dont think the game questions are bad
<tref> I just dont like how I have to explain them verbally
sneakerhax has joined #ruby
sp4rrow has quit [Quit: Textual]
<tref> Ox0dea: I think the best way to screen a candidate is to do the same exact thing you do at work. Give them a task and see how well they do it
<Radar> +1
<Ox0dea> tref: That's far too sensible.
<tref> The last time they asked me about checkers I wanted to ask the interviewer at which point his fortune 500 payroll company started building games?
<tref> I thought I was interviewing for application development
hxegon has joined #ruby
z3uS has quit [Ping timeout: 248 seconds]
matp has quit [Excess Flood]
matp has joined #ruby
Rasi has quit [Ping timeout: 248 seconds]
frozen3 has quit [Read error: Connection reset by peer]
slackR has quit [Ping timeout: 248 seconds]
<tref> That’s like interviewing a Chef with questions about farming
leon_ee has joined #ruby
noService has quit [Ping timeout: 246 seconds]
jinie has quit [Ping timeout: 248 seconds]
leon_e has quit [Ping timeout: 268 seconds]
<Ox0dea> tref: Was that a Mitch Hedberg reference?
<tref> yes sir!
Rasi has joined #ruby
jinie has joined #ruby
<Ox0dea> <3
<tref> Ox0dea: wish that guy was still around. Such a shame :/
<Ox0dea> He was pretty great.
braincrash has quit [Quit: bye bye]
z3uS has joined #ruby
<tref> indeed
slackR has joined #ruby
baweaver has joined #ruby
abyx has joined #ruby
zast has joined #ruby
frozen3 has joined #ruby
Cohedrin has joined #ruby
Suntzu has joined #ruby
<Ox0dea> tref: Really, though, it's more like expecting a chef to know how to prepare everything from scratch.
<Ox0dea> Really good chefs even pride themselves on being able to do so.
<smathy> tref, those sorts of questions are a very effective way of filtering out job opportunities that will be a nightmare.
<tref> Ox0dea: what are you equating to ‘scratch’
Cohedrin_ has quit [Ping timeout: 252 seconds]
sarbs has joined #ruby
<Ox0dea> tref: Well, raw ingredients, I suppose.
<Ox0dea> Probably don't look too far into the analogy.
<tref> Ox0dea: haha, noted.
G has joined #ruby
jt__ has joined #ruby
ruby-lang236 has joined #ruby
rubie has joined #ruby
freerobby has quit [Quit: Leaving.]
braincrash has joined #ruby
ruby-lang236 has quit [Quit: Page closed]
aeterne has quit [Read error: Connection reset by peer]
darkf_ has joined #ruby
sgambino has joined #ruby
baweaver has quit [Quit: -a- IRC for Android 2.1.31]
j0bk_ has joined #ruby
sorbo_ has joined #ruby
mrfooo_ has joined #ruby
BoxDevelopment_ has joined #ruby
jhill_ has joined #ruby
cbetta_ has joined #ruby
baweaver has joined #ruby
rgs_ has joined #ruby
Mr_Pancake- has joined #ruby
Armand has joined #ruby
bjmllr has joined #ruby
aspiers_ has joined #ruby
Armand is now known as Guest47401
joeyjones_ has joined #ruby
c355e3b_ has joined #ruby
TomyLobo has quit [Disconnected by services]
TomyLobo has joined #ruby
troter________ has joined #ruby
rfv_ has joined #ruby
pfg__ has joined #ruby
nuck has joined #ruby
Lloyd__ has joined #ruby
tekmaster has joined #ruby
deimos__ has joined #ruby
Madplatypus_ has joined #ruby
nuck is now known as Guest78515
thomasfedb_ has joined #ruby
gsingh93- has joined #ruby
UKn0Meh has joined #ruby
Blue_Ice_ has joined #ruby
awk has joined #ruby
iNeedHelp has joined #ruby
shwouchkster_ has joined #ruby
Lorn_ has joined #ruby
awk is now known as Guest55473
artmann_ has joined #ruby
Guest12896__ has joined #ruby
j2k_ has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
bestie_ has joined #ruby
bttf_ has joined #ruby
bihi_ has joined #ruby
x77686d_ has joined #ruby
kireevco_ has joined #ruby
shelling___ has joined #ruby
wreet has joined #ruby
wreet has left #ruby [#ruby]
majuscul1 has joined #ruby
jmcc________ has joined #ruby
abhishek_ has joined #ruby
swills_ has joined #ruby
barajasfab has quit [Quit: Leaving]
Eleeleth_ has joined #ruby
svkurowski_ has joined #ruby
DiabolikFreenode has joined #ruby
abhishek_ is now known as Guest84401
j0bk has quit [Ping timeout: 246 seconds]
amitchellbullard has quit [Ping timeout: 246 seconds]
jhill has quit [Ping timeout: 246 seconds]
joeyjones has quit [Ping timeout: 246 seconds]
acalewin has quit [Ping timeout: 246 seconds]
Apocalypse has quit [Ping timeout: 246 seconds]
dling` has quit [Ping timeout: 246 seconds]
aspiers has quit [Ping timeout: 246 seconds]
BoxDevelopment has quit [Ping timeout: 246 seconds]
mrfooo has quit [Ping timeout: 246 seconds]
joeyjones_ is now known as joeyjones
Guest47401 is now known as Apocalypse
Mr_Pancake has quit [Ping timeout: 246 seconds]
HashNuke has quit [Ping timeout: 246 seconds]
Lloyd has quit [Ping timeout: 246 seconds]
rfv has quit [Ping timeout: 246 seconds]
darkf has quit [Ping timeout: 246 seconds]
bjmllr_ has quit [Ping timeout: 246 seconds]
cbetta has quit [Ping timeout: 246 seconds]
ElderFain has quit [Ping timeout: 246 seconds]
EvilJStoker has quit [Ping timeout: 246 seconds]
rgs has quit [Ping timeout: 246 seconds]
pfg has quit [Ping timeout: 246 seconds]
c355e3b has quit [Ping timeout: 246 seconds]
kpwarr has quit [Ping timeout: 246 seconds]
Lorn has quit [Ping timeout: 246 seconds]
thomasfedb has quit [Ping timeout: 246 seconds]
shevy has quit [Ping timeout: 246 seconds]
russt has quit [Ping timeout: 246 seconds]
nugit has quit [Ping timeout: 246 seconds]
tekacs has quit [Ping timeout: 246 seconds]
bihi has quit [Ping timeout: 246 seconds]
troter_______ has quit [Ping timeout: 246 seconds]
Guest67267 has quit [Ping timeout: 246 seconds]
deimos_ has quit [Ping timeout: 246 seconds]
Diabolik has quit [Ping timeout: 246 seconds]
UKn0Me has quit [Ping timeout: 246 seconds]
hplar_ has quit [Ping timeout: 246 seconds]
bttf has quit [Ping timeout: 246 seconds]
shelling__ has quit [Ping timeout: 246 seconds]
Madplatypus has quit [Ping timeout: 246 seconds]
JoL1hAHN has quit [Ping timeout: 246 seconds]
TheCubeLord has quit [Ping timeout: 246 seconds]
kpwarr has joined #ruby
gsingh93 has quit [Ping timeout: 246 seconds]
crayfishx has quit [Ping timeout: 246 seconds]
kalz has quit [Ping timeout: 246 seconds]
Guest12896_ has quit [Ping timeout: 246 seconds]
NuckingFuts has quit [Ping timeout: 246 seconds]
Blue_Ice has quit [Ping timeout: 246 seconds]
Guest8960 has quit [Ping timeout: 246 seconds]
dellavg has quit [Ping timeout: 246 seconds]
Kilo`byte has quit [Ping timeout: 246 seconds]
nyandoge has quit [Ping timeout: 246 seconds]
M-Kodo has quit [Ping timeout: 246 seconds]
Eleeleth has quit [Ping timeout: 246 seconds]
Flipez has quit [Ping timeout: 246 seconds]
jwang has quit [Ping timeout: 246 seconds]
cjk101010 has quit [Ping timeout: 246 seconds]
Mr_Pancake- is now known as Mr_Pancake
tekmaster is now known as tekacs
gsingh93- is now known as gsingh93
bihi_ is now known as bihi
kireevco has quit [Ping timeout: 246 seconds]
incomprehensibly has quit [Ping timeout: 246 seconds]
shwouchkster has quit [Ping timeout: 246 seconds]
vqrs has quit [Ping timeout: 246 seconds]
UserInNeed has quit [Ping timeout: 246 seconds]
jmcc_______ has quit [Ping timeout: 246 seconds]
svkurowski has quit [Ping timeout: 246 seconds]
j2k has quit [Ping timeout: 246 seconds]
RealMarc has quit [Ping timeout: 246 seconds]
trajing has quit [Ping timeout: 246 seconds]
bestie has quit [Ping timeout: 246 seconds]
alxndr has quit [Ping timeout: 246 seconds]
abhishek has quit [Ping timeout: 246 seconds]
dukedave has quit [Ping timeout: 246 seconds]
Antiarc_ has joined #ruby
mrfooo_ is now known as mrfooo
Jamo_ has joined #ruby
kpwarr_ has joined #ruby
raenk has joined #ruby
swills has quit [Ping timeout: 246 seconds]
x77686d has quit [Ping timeout: 246 seconds]
majuscule has quit [Ping timeout: 246 seconds]
artmann has quit [Ping timeout: 246 seconds]
andersh has quit [Ping timeout: 246 seconds]
Elysia has quit [Ping timeout: 246 seconds]
charles81 has quit [Ping timeout: 246 seconds]
beagles has quit [Ping timeout: 246 seconds]
moredhel has quit [Ping timeout: 246 seconds]
Antiarc has quit [Ping timeout: 246 seconds]
Jamo has quit [Ping timeout: 246 seconds]
nitrix has quit [Ping timeout: 246 seconds]
borkdude has quit [Ping timeout: 246 seconds]
Cyrus has quit [Ping timeout: 246 seconds]
atom3 has quit [Ping timeout: 246 seconds]
kpwarr has quit [Ping timeout: 246 seconds]
gremax has quit [Ping timeout: 246 seconds]
podman has quit [Ping timeout: 246 seconds]
RealMarc has joined #ruby
Mekkis has quit [Ping timeout: 246 seconds]
raenk_ has quit [Ping timeout: 246 seconds]
Luna_Moonfang has quit [Ping timeout: 246 seconds]
x77686d_ is now known as x77686d
atom3 has joined #ruby
Flipez has joined #ruby
bestie_ is now known as bestie
dling` has joined #ruby
jhill_ is now known as jhill
Lloyd__ is now known as Lloyd
ElderFain has joined #ruby
jwang has joined #ruby
hxegon has quit [Ping timeout: 246 seconds]
bougyman has quit [Ping timeout: 246 seconds]
trajing has joined #ruby
russt has joined #ruby
dellavg has joined #ruby
cbetta_ is now known as cbetta
bougyman has joined #ruby
shelling___ is now known as shelling__
b3nt_pin has joined #ruby
cjk101010 has joined #ruby
b3nt_pin is now known as Guest40396
moredhel has joined #ruby
glacius has quit [Read error: Connection reset by peer]
M-Kodo has joined #ruby
TheCubeLord has joined #ruby
hplar_ has joined #ruby
Kilo`byte has joined #ruby
glacius has joined #ruby
hxegon has joined #ruby
nugit has joined #ruby
kalz has joined #ruby
Eleeleth_ is now known as Eleeleth
rfv_ is now known as rfv
c355e3b_ is now known as c355e3b
EvilJStoker has joined #ruby
Luna_Moonfang has joined #ruby
Mekkis has joined #ruby
Cyrus has joined #ruby
JoL1hAHN has joined #ruby
vqrs has joined #ruby
pfg__ is now known as pfg
Cyrus is now known as Guest120
Madplatypus_ is now known as Madplatypus
shwouchkster_ is now known as shwouchkster
shevy has joined #ruby
blackgoat has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
borkdude has joined #ruby
gix has quit [Ping timeout: 240 seconds]
uglybandersnatch has joined #ruby
incomprehensibly has joined #ruby
nitrix has joined #ruby
dukedave has joined #ruby
alxndr has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
amitchellbullard has joined #ruby
nyandoge has joined #ruby
bkxd has joined #ruby
charles81 has joined #ruby
HashNuke has joined #ruby
kireevco_ is now known as kireevco
bttf_ is now known as bttf
acalewin has joined #ruby
podman has joined #ruby
DTZUZU has quit [Ping timeout: 276 seconds]
crayfishx has joined #ruby
skydiver has joined #ruby
gix has joined #ruby
andersh has joined #ruby
sudoubuntu has joined #ruby
gremax has joined #ruby
uglybandersnatch has quit [Ping timeout: 246 seconds]
bronson has quit [Ping timeout: 252 seconds]
LoneHermit has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
benlovell has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
drewo has joined #ruby
LoneHermit has quit [Ping timeout: 276 seconds]
benlovell has quit [Ping timeout: 248 seconds]
hanmac has quit [Ping timeout: 250 seconds]
mr_oh has joined #ruby
Aswebb_ has joined #ruby
rmulliga` has quit [Remote host closed the connection]
<mr_oh> Is there a way to do something like: write_to_file + "stuff...." , instead of typing out write_to_file every time?
<mr_oh> every line
<baweaver> mr_oh: https://gist.github.com/ - what's the code look like?
<baweaver> the answer depends on the context.
hxegon has quit [Quit: BRB]
vdamewood has quit [Quit: Life beckons.]
dravine has quit [Quit: dravine]
ruby-lang930 has quit [Ping timeout: 250 seconds]
Aswebb_ has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
<mr_oh> Hmmm... is this how you use gist?
trosborn has joined #ruby
G has quit [Quit: leaving]
trosborn has left #ruby [#ruby]
moeabdol1 has quit [Quit: WeeChat 1.4]
<mr_oh> looks like poop? (Beginner stages)
agent_white has quit [Ping timeout: 244 seconds]
<Ox0dea> mr_oh: For what it's worth, decent editor would let you write "w<Tab>" instead of having to spell it out every time.
<mr_oh> Atom seems kind of slow at that
<Ox0dea> I believe it.
<Ox0dea> I said a decent editor. :P
<mr_oh> :-)
Biohazard has joined #ruby
<Ox0dea> You could stick all the strings in an Array and say `strings.each { |s| write_to_file s }` or some such, but that's not much of an improvement.
Biohazard is now known as Guest45768
<Ox0dea> Do nix all those comments, though.
moeabdol has joined #ruby
<mr_oh> ok
pawnbox has joined #ruby
merida has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
<mr_oh> I thought about initalizing values elsewhere and getting at them in the process_ methods
noService has joined #ruby
<Ox0dea> That's not a bad idea.
<mr_oh> But I haven't gotten into class and all that yet
dravine has joined #ruby
hanmac has joined #ruby
<baweaver> also what's write_to_file
<mr_oh> suprising, but @variables work without any defined classes
<shevy> I believe it writes to a file
<baweaver> kinda unnecessary honestly.
aces1up has joined #ruby
aces1up has quit [Client Quit]
<baweaver> it's more of output to file, not process_products
<shevy> mr_oh yeah but actually when you are already using @variables, it's just a tiny extra step to write classes
rubie has quit [Remote host closed the connection]
<mr_oh> I should just do a class or two...
frozen3 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mr_oh> well even if I do $file.puts "xcxcc", I'm still typing $file.puts on every line, no?
<Ox0dea> mr_oh: You can pass multiple arguments to #puts.
karioleez has joined #ruby
<Ox0dea> Also, @instance_variables don't go on classes; they go on instances.
_blizzy_ has joined #ruby
<Ox0dea> >> @foo = 42; [self, instance_variables]
<ruby[bot]> Ox0dea: # => [main, [:@foo]] (https://eval.in/545337)
dravine has quit [Quit: dravine]
pawnbox has quit [Remote host closed the connection]
CloCkWeRX has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
zast has quit [Remote host closed the connection]
hk238 has joined #ruby
Vile` has quit [Ping timeout: 276 seconds]
NightMonkey_ has joined #ruby
nlsun has quit [Quit: ZNC - http://znc.in]
NightMonkey_ is now known as NightMonkey
pawnbox has quit [Ping timeout: 260 seconds]
nlsun has joined #ruby
hxegon has joined #ruby
darkf_ is now known as darkf
lyoshajapan has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
<mr_oh> right, so the top level class is "main" or Object
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aviio has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
lyoshajapan has joined #ruby
jt__ has quit [Remote host closed the connection]
duncannz has joined #ruby
nando293921 has joined #ruby
<Ox0dea> More precisely, `self` is `main` at the top level, and Object is the "default definee".
CloCkWeRX has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
* mr_oh punches screen
sorbo_ has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 276 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
pawnbox has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
MyMind has quit [Ping timeout: 240 seconds]
lyoshajapan has quit [Remote host closed the connection]
DTZUZU has joined #ruby
fedexo has joined #ruby
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
bkxd has joined #ruby
<shevy> are you punching any particular nick mr_oh :)
TheCubeLord has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
sgambino has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
DTZUZU has quit [Ping timeout: 250 seconds]
uglybandersnatch has joined #ruby
benlieb has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 276 seconds]
paradisaeidae has joined #ruby
<mr_oh> Just the computer in general
<Ox0dea> How come?
vale_tudo has quit [Ping timeout: 264 seconds]
jt__ has joined #ruby
<shevy> don't let the AIs rise
sorbo_ has joined #ruby
kariolee_ has joined #ruby
Gooer has joined #ruby
hahuang61 has joined #ruby
<paradisaeidae> So I've compiled Ruby 2.3.0. Looks like my gem's extension need recompiling. As rb_data_object_alloc is DEPRECATED_BY(rb_data_object_wrap
<paradisaeidae> Though when invoking gem, it loads the gems, one is ffi which halts.
<paradisaeidae> So cannot rebuild.
karioleez has quit [Ping timeout: 252 seconds]
<paradisaeidae> Is there an option in building Ruby which gets over this?
<mr_oh> Ox0dea: It's just frustrating not knowing enough yet.
CloCkWeRX has joined #ruby
<Ox0dea> mr_oh: Anger is hardly the most appropriate response to (temporary) ignorance.
Gooer_ has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
<mr_oh> It isn't. But it built up over the course of the evening.
<Ox0dea> ¯\_(ツ)_/¯
<Ox0dea> Aim for "Fuck yeah! New shit to learn."
<Ox0dea> All things in moderation, of course.
Gooer has quit [Ping timeout: 240 seconds]
Gooer_ has quit [Read error: Connection reset by peer]
teejayen has joined #ruby
minimalism has quit [Read error: Connection reset by peer]
lyoshajapan has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
BoxDevelopment_ has quit []
S01780 has joined #ruby
minimalism has joined #ruby
gevans has quit [Remote host closed the connection]
lyoshajapan has quit [Remote host closed the connection]
tneilen has joined #ruby
<Ox0dea> paradisaeidae: Could you clarify? The ffi gem doesn't use rb_data_object_alloc(), so its relevance is unclear.
frozen3 has joined #ruby
teej has quit [Ping timeout: 252 seconds]
postmodern has quit [Quit: Leaving]
lyoshajapan has joined #ruby
<paradisaeidae> Hi, I see this: gems/ffi-1.9.10/lib/ffi_c.so: undefined symbol: rb_data_object_alloc
nando293921 has quit [Ping timeout: 252 seconds]
uglybandersnatch has quit [Ping timeout: 250 seconds]
maxxe has quit [Remote host closed the connection]
<paradisaeidae> Has it been linked in by a previous compile with Ruby 2.2.2?
teejayen has quit [Ping timeout: 252 seconds]
<Ox0dea> Yes, that seems the most likely cause.
<Ox0dea> Re-installing the gem should clear that right up.
<paradisaeidae> Looks like I have to remove it with 2.2.2 then install it with 2.3.0
statelesscode has quit [Quit: statelesscode]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sauvin has joined #ruby
rmulligan has quit [Ping timeout: 268 seconds]
<Ox0dea> Yeah, gems are per-version unless you go out of your way to share them across, which isn't a great idea in the first place.
last_staff has joined #ruby
arescorpio has quit [Remote host closed the connection]
Xiti has quit [Ping timeout: 240 seconds]
Inside has quit [Ping timeout: 250 seconds]
sgambino has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
yatish27 has quit []
tref has quit [Quit: tref]
Chagel has joined #ruby
Devalo has joined #ruby
lyoshajapan has joined #ruby
UKn0Meh is now known as UKn0Me
tneilen has quit [Read error: Connection reset by peer]
kariolee_ has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 260 seconds]
hxegon has quit [Quit: BRB]
Gooer_ has joined #ruby
Elysia has joined #ruby
tref has joined #ruby
benlovell has joined #ruby
tubuliferous_ has quit [Ping timeout: 276 seconds]
hotpancakes has quit [Remote host closed the connection]
lyoshajapan has quit [Remote host closed the connection]
Gooer_ has quit [Quit: Leaving]
Gooer has joined #ruby
Gooer_ has joined #ruby
benlovell has quit [Ping timeout: 244 seconds]
Gooer_ has quit [Remote host closed the connection]
Gooer_ has joined #ruby
bronson has joined #ruby
hotpancakes has joined #ruby
juria_roberts has joined #ruby
DiabolikFreenode is now known as Diabolik
Oog has joined #ruby
mr_oh has quit [Quit: Page closed]
<juria_roberts> How do i merge the arrays instead of it being overwritten? https://repl.it/CAym/0
jaruga has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
Xiti has joined #ruby
jaruga has quit [Client Quit]
spuk has quit [Ping timeout: 260 seconds]
<baweaver> juria_roberts: Look into the merge function
jaruga has joined #ruby
<baweaver> &ri Hash#merge
<baweaver> it takes a block
<Radar> baweaver: good point
sinanislekdemir has joined #ruby
krz has joined #ruby
hotpancakes has quit [Ping timeout: 268 seconds]
<baweaver> >> {a: [1]}.merge({a: [2]}) { |k, old_val, new_val| old_val + new_val }
<ruby[bot]> baweaver: # => {:a=>[1, 2]} (https://eval.in/545359)
<Radar> juria_roberts: ^
<juria_roberts> Thanks baweaver and Radar..i am new to Ruby :)
<baweaver> given that it's a block, you could do arbitrary conditions to do things like diffs, unions, and more. Quite handy.
<baweaver> juria_roberts: everyone starts somewhere.
<juria_roberts> how do i merge multiple?
<baweaver> though the docs are quite well written and very useful. I'd read through Enumerable at some point.
<baweaver> juria_roberts: explain a little further there
<juria_roberts> without chaining merge
<baweaver> merge multiple hashes, ie flatten them into one?
<baweaver> do you want the same block logic?
<juria_roberts> yup
<baweaver> yup to the second as well?
<juria_roberts> no another logic will do
Macaveli has joined #ruby
<baweaver> >> [{a: 1}, {b: 2}, {c: 3}].reduce({}, :merge!)
<ruby[bot]> baweaver: # => {:a=>1, :b=>2, :c=>3} (https://eval.in/545368)
<baweaver> That's dense, so let's break it down a bit
<Ox0dea> baweaver: Obfuscatory?
<Ox0dea> They need merge logic.
<baweaver> first, the longhand version of it.
<baweaver> hm?
<Ox0dea> They need #reduce + #merge with a block.
<baweaver> getting to that.
<juria_roberts> https://repl.it/CAym/3 doesnt work
<baweaver> >> [{a: 1}, {b: 2}, {c: 3}].reduce({}) { |new_hash, hash| new_hash.merge!(hash) }
<ruby[bot]> baweaver: # => {:a=>1, :b=>2, :c=>3} (https://eval.in/545371)
<baweaver> >> [{a: 1}, {b: 2, c: 2}, {c: 3}].reduce({}) { |new_hash, hash| new_hash.merge!(hash) { |k,o,n| o + n } }
<ruby[bot]> baweaver: # => {:a=>1, :b=>2, :c=>5} (https://eval.in/545374)
goodroot has quit [Ping timeout: 250 seconds]
<Ox0dea> juria_roberts: https://eval.in/545376
<baweaver> the shorthand was because they mentioned it being different logic as a setup to mentioning the rest of it.
hotpancakes has joined #ruby
Aswebb_ has joined #ruby
<juria_roberts> Ox0dea: so if i have 10 hashes that becomes infeasible
rmulligan has joined #ruby
<Ox0dea> juria_roberts: How come?
<baweaver> give it a try with 10 hashes
<Ox0dea> If you've got ten related Hashes, they should probably be in an Array already, and you just #reduce over that.
jorum has joined #ruby
<baweaver> noted that reduce is dense the first few times you see it.
<juria_roberts> Ox0dea: i was wrong i misunderstood
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GitGud has quit [Remote host closed the connection]
sandelius has joined #ruby
<juria_roberts> Ox0dea: yeah my hashes will have the same keys
hotpancakes has quit [Ping timeout: 244 seconds]
Aswebb_ has quit [Ping timeout: 260 seconds]
GitGud has joined #ruby
<baweaver> http://www.sitepoint.com/guide-ruby-collections-iii-enumerable-enumerator/ - that has a section on reduce that looks fairly good
yfeldblum has quit [Remote host closed the connection]
benlieb has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
GitGud has quit [Client Quit]
nando293921 has joined #ruby
<Ox0dea> juria_roberts: Another approach worth considering: https://eval.in/545384
Xeago has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
karioleez has joined #ruby
karioleez has quit [Remote host closed the connection]
torandu has quit [Ping timeout: 264 seconds]
GitGud has joined #ruby
benlieb has quit [Read error: Connection timed out]
chouhoulis has quit [Ping timeout: 264 seconds]
<juria_roberts> Ox0dea: Thanks thats awesome..ill read up and try to understand what's happening
karioleez has joined #ruby
akkad has quit [Quit: Emacs must have died]
jkahn has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
torandu has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
rmulligan has quit [Ping timeout: 248 seconds]
pawnbox has quit [Remote host closed the connection]
frozen3 has joined #ruby
hotpancakes has joined #ruby
lyoshajapan has joined #ruby
jkahn has quit [Ping timeout: 248 seconds]
DTZUZU has joined #ruby
Oog has quit []
<Ox0dea> juria_roberts: Sure thing. Feel free to ask for clarification.
<Ox0dea> It's almost 5x faster and than the reduce+merge approach, *and* you don't have to artificially bracket your values. :)
<juria_roberts> Ox0dea: Thanks a lot!
<Ox0dea> juria_roberts: Happy to help.
<baweaver> Ox0dea: is it really? huh
* baweaver tinkers with benchmark
<baweaver> wait, merge or merge!?
<Ox0dea> baweaver: https://eval.in/545404
<Ox0dea> Oh, you're right that #merge! would be faster, though.
<Ox0dea> Wow, or not... at all.
Devalo has quit [Remote host closed the connection]
DTZUZU has quit [Ping timeout: 248 seconds]
Don_John has quit [Read error: Connection reset by peer]
<Ox0dea> baweaver: Are you seeing what I'm seeing?
<baweaver> give me a sec
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> the heck
* baweaver checks ruby version
<baweaver> 2.1.2
skade has joined #ruby
<Ox0dea> On trunk, swapping #merge for #merge! makes that approach ~100x slower!
jenrzzz has joined #ruby
<baweaver> is it the block?
uglybandersnatch has joined #ruby
<baweaver> also: Array(o) + [n] is slower
<baweaver> >> [*1, 2]
<ruby[bot]> baweaver: # => [1, 2] (https://eval.in/545407)
<baweaver> 2.3 doesn't have ips, odd.
<Ox0dea> It should totally be in stdlib by now.
<baweaver> nope
rmulligan has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jkahn has joined #ruby
<Ox0dea> At any rate, the speedier approach just makes more sense if all the Hashes have the same keys.
pawnbox has joined #ruby
mrgrieves has joined #ruby
<Ox0dea> Still not sure why #merge! makes it crawl rather than give it a little boost.
krz has quit [Ping timeout: 268 seconds]
<baweaver> something screwy with the block
<baweaver> using Benchmark#benchmark with 10k repeats
<baweaver> merge! is still waiting
<Ox0dea> Eeps.
<baweaver> merge took under half a second
<Ox0dea> I swapped the body for `[*o, n]` to no real gain.
<baweaver> this has been going for several
araujo has quit [Ping timeout: 244 seconds]
<baweaver> 52 seconds
<baweaver> wtf
hotpancakes has quit [Ping timeout: 268 seconds]
<Ox0dea> It's very strange.
nickjj_ has joined #ruby
theRealAlexz has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
<Ox0dea> It must be that far more objects are being allocated than intuition reveals.
sandelius has joined #ruby
<Radar> just run strace on it
* Radar runs
araujo has joined #ruby
MyMind has joined #ruby
<Ox0dea> baweaver: I found my derp.
segy has quit [Ping timeout: 240 seconds]
nickjj has quit [Ping timeout: 240 seconds]
<Ox0dea> #merge! is faster than #merge if you pass an init Hash.
djbkd has quit [Quit: My people need me...]
theRealAlexz has joined #ruby
<baweaver> ah
<baweaver> Radar: we good
<baweaver> shenanigans were had
<Ox0dea> So write locking of some kind?
jkahn has quit [Remote host closed the connection]
<baweaver> exceptions
<Ox0dea> Hm?
<baweaver> oh I see it
<baweaver> merge! kept mutating it
<baweaver> making the thing giant
<baweaver> only shows up on large sets
jt__ has quit [Read error: Connection reset by peer]
jt__ has joined #ruby
saneax_AFK is now known as saneax
fedexo has quit [Ping timeout: 268 seconds]
<Ox0dea> Not sure I follow.
segy has joined #ruby
<baweaver> what happens when you don't pass an init?
mrgrieves has quit [Ping timeout: 246 seconds]
<baweaver> https://eval.in/545414 - in any case, yours is faster still
uglybandersnatch has quit [Ping timeout: 240 seconds]
<baweaver> the gist of it is without an init, it keeps merging down onto the first element mutating them all along the way
<baweaver> repeat for thousands of times and....
<baweaver> boom
bruce_lee has joined #ruby
sorbo_ has quit [Remote host closed the connection]
<Ox0dea> Yep, I see it now.
CausaMortis has joined #ruby
User458764 has joined #ruby
<baweaver> memory doesn't like us
sorbo_ has joined #ruby
blackgoat has joined #ruby
<Ox0dea> Memory wants to be finite.
<Ox0dea> Entropy wins. :(
rkazak has joined #ruby
CausaMortis_ has joined #ruby
LoneHerm_ has joined #ruby
bkxd has joined #ruby
sorbo_ has quit [Ping timeout: 248 seconds]
CausaMortis has quit [Ping timeout: 248 seconds]
rmulligan has quit [Ping timeout: 264 seconds]
<baweaver> well, good thing it was just a mistake
<baweaver> otherwise that'd be terrifying :D
bkxd has quit [Ping timeout: 244 seconds]
<Ox0dea> A universe where allocating new objects is faster than reusing old ones? I want to go to there.
davedev24 has quit []
the_drow has joined #ruby
anisha has joined #ruby
andikr has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
tomaz_b has joined #ruby
Sammichmaker has quit [Read error: Connection reset by peer]
minimalism has quit [Quit: minimalism]
kam270 has joined #ruby
davee_ has joined #ruby
<baweaver> I hear Haskell Curry greets you upon arrival
<Ox0dea> I'd've expected Bagwell.
madgen has joined #ruby
minimalism has joined #ruby
djbkd has joined #ruby
<baweaver> well allocating a new object is free, so why not
<baweaver> Bagwell is there with them
<Ox0dea> :P
hotpancakes has joined #ruby
vale_tudo has joined #ruby
djbkd has quit [Client Quit]
krz has joined #ruby
CloCkWeRX has quit [Ping timeout: 248 seconds]
<baweaver> Ablesson and Sussman are teaching the acolytes in the garden
<Ox0dea> I really like this picture you're painting.
<baweaver> you know
<baweaver> I could actually paint it
tubuliferous_ has joined #ruby
<Ox0dea> Something like "The Garden of Earthly Delights" + http://i.imgur.com/aqg21UI.jpg
polysics has joined #ruby
<Ox0dea> Love the hat.
<baweaver> you notice the oregano there?
* baweaver man oregano
vale_tudo has quit [Ping timeout: 268 seconds]
aganov has joined #ruby
hotpancakes has quit [Ping timeout: 248 seconds]
noServic1 has joined #ruby
DoubleMalt has joined #ruby
chouhoulis has joined #ruby
<Ox0dea> SPICE -> ngspice -> Oregano.
djbkd has joined #ruby
theRealAlexz has quit [Ping timeout: 264 seconds]
MyMind has quit [Ping timeout: 252 seconds]
noService has quit [Ping timeout: 246 seconds]
biberu has joined #ruby
tvw has joined #ruby
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0.1/20160315153207]]
frozen3 has quit [Read error: Connection reset by peer]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 244 seconds]
neanderslob has quit [Ping timeout: 260 seconds]
neanderslob_ has joined #ruby
frozen3 has joined #ruby
yfeldblum has joined #ruby
torandu has quit [Ping timeout: 264 seconds]
brt has joined #ruby
CloCkWeRX has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
mark2 has joined #ruby
wethu has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
ruby-lang390 has joined #ruby
baweaver has quit [Remote host closed the connection]
theRealAlexz has joined #ruby
torandu has joined #ruby
codecop has joined #ruby
codecop_ has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
rmulligan has joined #ruby
Couch has joined #ruby
ur5us has joined #ruby
Gooer__ has joined #ruby
Gooer_ has quit [Read error: Connection reset by peer]
Gooer has quit [Read error: Connection reset by peer]
Gooer has joined #ruby
Ropeney has quit [Quit: Textual IRC Client: www.textualapp.com]
wethu has quit [Ping timeout: 240 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstrom has joined #ruby
jorum has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
jt__ has quit [Remote host closed the connection]
mark2 has quit [Quit: Leaving.]
mark2 has joined #ruby
mark2 has left #ruby [#ruby]
mark2 has joined #ruby
sorbo_ has joined #ruby
jorum has joined #ruby
rmulligan has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
sarbs has quit [Ping timeout: 268 seconds]
kwd has joined #ruby
mikecmpbll has joined #ruby
sorbo_ has quit [Ping timeout: 250 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
madgen has quit [Ping timeout: 268 seconds]
dikaio has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
bronson has joined #ruby
dling has quit [Remote host closed the connection]
jackjackdripper has joined #ruby
dling has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
codecop_ has quit [Quit: Išeinu]
GitGud has quit [Remote host closed the connection]
GitGud has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
edwinvdgraaf has joined #ruby
Gooer_ has joined #ruby
x77686d has quit [Quit: x77686d]
hotpancakes has joined #ruby
tildes has joined #ruby
Gooer has quit [Ping timeout: 240 seconds]
Gooer__ has quit [Ping timeout: 244 seconds]
Gooer has joined #ruby
kristofferR has joined #ruby
Aswebb_ has joined #ruby
sarbs has joined #ruby
jt__ has joined #ruby
mikecmpbll has quit [Client Quit]
Gooer__ has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
staticfox has quit [Quit: ZNC - http://znc.in]
Gooer has quit [Read error: Connection reset by peer]
BlindSight has joined #ruby
Gooer_ has quit [Read error: Connection reset by peer]
marr has joined #ruby
Gooer has joined #ruby
artmann_ has quit [Remote host closed the connection]
artmann has joined #ruby
Aswebb_ has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 244 seconds]
kies has quit [Ping timeout: 276 seconds]
Gooer_ has joined #ruby
DTZUZU has joined #ruby
Gooer__ has quit [Read error: Connection reset by peer]
Gooer has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
elaptics`away is now known as elaptics
Gooer has joined #ruby
drewo has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
frozen3 has joined #ruby
juria_roberts has quit [Quit: ChatZilla 0.9.92 [Firefox 42.0/20151029151421]]
BlindSight has quit [Quit: ZNC - http://znc.in]
BlindSight has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
sjohnsen has left #ruby ["WeeChat 1.4"]
mikecmpbll has joined #ruby
Gooer__ has joined #ruby
BlindSight is now known as staticfox
noServic1 has quit [Ping timeout: 246 seconds]
Gooer_ has quit [Ping timeout: 252 seconds]
Gooer has quit [Ping timeout: 240 seconds]
nanoz has joined #ruby
staticfox has quit [Client Quit]
BlindSight has joined #ruby
workmad3 has joined #ruby
krz has quit [Ping timeout: 248 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
krz has joined #ruby
BlindSight is now known as staticfox
Gooer__ has quit [Ping timeout: 244 seconds]
Gooer has joined #ruby
Gooer_ has joined #ruby
rmulligan has joined #ruby
merida has quit [Remote host closed the connection]
diegoaguilar has quit [Remote host closed the connection]
baweaver has joined #ruby
Xeago_ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
kwd has quit [Quit: kwd]
staticfox has quit [Quit: ZNC - http://znc.in]
BlindSight has joined #ruby
User458764 has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
miah has quit [Changing host]
miah has joined #ruby
dikaio has quit [Quit: Textual IRC Client: www.textualapp.com]
Suntzu has quit [Read error: Connection reset by peer]
rmulligan has quit [Ping timeout: 248 seconds]
the_drow has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 248 seconds]
BlindSight is now known as staticfox
mrgrieves has joined #ruby
agit0 has joined #ruby
Spami has joined #ruby
pandaant has joined #ruby
the_drow has joined #ruby
PaulCapestany has joined #ruby
Chagel has quit [Ping timeout: 268 seconds]
PaulCape_ has quit [Ping timeout: 240 seconds]
kristofferR has quit [Quit: Textual IRC Client: www.textualapp.com]
AlexRussia has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
hotpancakes has joined #ruby
myntcake has joined #ruby
uglybandersnatch has joined #ruby
tubuliferous_ has joined #ruby
brt has quit [Quit: peace]
patrick_star_2 has quit [Quit: Leaving]
f4cl3y has joined #ruby
lkba_ has quit [Ping timeout: 244 seconds]
hotpancakes has quit [Ping timeout: 248 seconds]
ur5us has quit [Remote host closed the connection]
sorbo_ has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
decoponio has joined #ruby
brt has joined #ruby
nando293921 has quit [Ping timeout: 246 seconds]
drewo has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
bigkevmcd has joined #ruby
sorbo_ has quit [Ping timeout: 248 seconds]
joonty has joined #ruby
ssiris has quit [Quit: End of Line]
Xeago_ has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 246 seconds]
bkxd has quit [Ping timeout: 276 seconds]
Suntzu has joined #ruby
uglybandersnatch has quit [Ping timeout: 240 seconds]
tubuliferous_ has quit [Ping timeout: 248 seconds]
johnmilton has joined #ruby
dionysus69 has joined #ruby
hotpancakes has joined #ruby
PaulCape_ has joined #ruby
PaulCapestany has quit [Ping timeout: 248 seconds]
benlovell has joined #ruby
hotpancakes has quit [Ping timeout: 240 seconds]
Spami has quit [Ping timeout: 248 seconds]
alexherbo2 has quit [Ping timeout: 248 seconds]
bruce_lee has quit [Ping timeout: 260 seconds]
bruce_lee has joined #ruby
Xeago has joined #ruby
myntcake has quit [Quit: Leaving]
chouhoulis has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
noService has joined #ruby
noService has quit [Changing host]
noService has joined #ruby
frozen3 has joined #ruby
hotpancakes has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
tubuliferous_ has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
torandu has quit [Ping timeout: 264 seconds]
rmulligan has joined #ruby
torandu has joined #ruby
noService has quit [Ping timeout: 246 seconds]
AlexRussia has quit [Ping timeout: 268 seconds]
CausaMortis has joined #ruby
CausaMortis_ has quit [Quit: Goodbye]
hotpancakes has quit [Ping timeout: 264 seconds]
sandelius has quit [Ping timeout: 260 seconds]
jt__ has quit [Remote host closed the connection]
rmulligan has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
binaryplease1 has joined #ruby
evidex has joined #ruby
LowLifePerv has joined #ruby
GitGud has quit [Ping timeout: 248 seconds]
LowLifePerv is now known as GitGud
LowLifePerv has joined #ruby
benlovell has quit [Ping timeout: 248 seconds]
tomaz_b has quit [Ping timeout: 276 seconds]
binaryplease has quit [Ping timeout: 252 seconds]
rolha has joined #ruby
PaulCapestany has joined #ruby
rolha_ has quit [Ping timeout: 244 seconds]
LowLifePerv has quit [Client Quit]
Azure|dc has joined #ruby
SweetHeart has joined #ruby
GitGud has quit [Ping timeout: 248 seconds]
SweetHeart is now known as GitGud
PaulCape_ has quit [Ping timeout: 244 seconds]
TvL2386 has quit [Ping timeout: 260 seconds]
Azure has quit [Ping timeout: 244 seconds]
binaryplease1 is now known as binaryplease
noService has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
merida has joined #ruby
noService has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
adaedra has quit [Changing host]
adaedra has joined #ruby
uglybandersnatch has joined #ruby
skislak has joined #ruby
User458764 has joined #ruby
TvL2386 has joined #ruby
Ropeney has joined #ruby
Azure|dc has quit [Remote host closed the connection]
hogetaro_ has quit [Ping timeout: 250 seconds]
hogetaro has joined #ruby
m8 has joined #ruby
sorbo_ has joined #ruby
Gasher has joined #ruby
tvw has joined #ruby
bronson has joined #ruby
sorbo_ has quit [Ping timeout: 248 seconds]
_blizzy_ has quit [Ping timeout: 268 seconds]
GitGud has quit [Quit: You're gonna carry that weight...]
lyoshajapan has quit [Remote host closed the connection]
_blizzy_ has joined #ruby
ferr has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
hotpancakes has joined #ruby
GitGud has joined #ruby
GitGud has quit [Client Quit]
GitGud has joined #ruby
benlovell has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
uglybandersnatch has quit [Ping timeout: 250 seconds]
evidex has quit [Read error: Connection reset by peer]
hotpancakes has quit [Ping timeout: 240 seconds]
evidex has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
noService has joined #ruby
Chagel has joined #ruby
Aswebb_ has joined #ruby
Gooer has quit [Ping timeout: 250 seconds]
Gooer_ has quit [Ping timeout: 250 seconds]
yorickpeterse1 is now known as yorickpeterse
jaruga has quit [Quit: jaruga]
Aswebb_ has quit [Ping timeout: 260 seconds]
Snowy has joined #ruby
sarbs has quit [Ping timeout: 264 seconds]
sarbs has joined #ruby
duncannz has quit [Remote host closed the connection]
madgen has joined #ruby
rmulligan has joined #ruby
peteykun has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
sarbs_ has joined #ruby
chouhoulis has joined #ruby
vondruch_ has joined #ruby
bluOxigen has joined #ruby
User458764 has joined #ruby
pawnbox has quit [Remote host closed the connection]
sarbs has quit [Ping timeout: 248 seconds]
sarbs_ is now known as sarbs
hotpancakes has joined #ruby
vondruch has quit [Ping timeout: 252 seconds]
cibs_ has joined #ruby
patrick_star has joined #ruby
rmulligan has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
cibs has quit [Ping timeout: 240 seconds]
hotpancakes has quit [Ping timeout: 248 seconds]
d0nn1e has quit [Ping timeout: 268 seconds]
frozen3 has joined #ruby
PaulCape_ has joined #ruby
d0nn1e has joined #ruby
cibs has joined #ruby
Spami has joined #ruby
PaulCapestany has quit [Ping timeout: 244 seconds]
tubuliferous_ has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 264 seconds]
PlasmaStar has quit [Ping timeout: 264 seconds]
brent_ has quit [Quit: Connection closed for inactivity]
blaxter has quit [Quit: foo]
cibs_ has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
_blizzy_ has quit [Ping timeout: 248 seconds]
ixti has quit [Quit: WeeChat 1.4]
n008f4g_ has joined #ruby
PlasmaStar has joined #ruby
krz has joined #ruby
sepp2k has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
_blizzy_ has joined #ruby
pawnbox has joined #ruby
nanoz has quit [Ping timeout: 260 seconds]
blaxter has joined #ruby
bkxd has joined #ruby
Spami has quit [Ping timeout: 244 seconds]
drewo has joined #ruby
ixti has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
johnmilton has quit [Remote host closed the connection]
wethu has joined #ruby
drewo has quit [Ping timeout: 248 seconds]
Spami has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Spami_ has joined #ruby
krz has quit [Ping timeout: 246 seconds]
FooMunki has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Spami has quit [Ping timeout: 244 seconds]
Azure has joined #ruby
brt has quit [Quit: peace]
Chagel has quit [Ping timeout: 276 seconds]
crazydiamond has quit [Ping timeout: 276 seconds]
Silox| has joined #ruby
blaxter has quit [Quit: foo]
CloCkWeRX has joined #ruby
blaxter has joined #ruby
ponga has joined #ruby
quazimodo has quit [Ping timeout: 276 seconds]
<Gasher> hello, is erb included with Ruby? I couldn't install it as a gem
hotpancakes has joined #ruby
polysics_ has joined #ruby
<yorickpeterse> Gasher: Yes, just require 'erb'
<yorickpeterse> >> require 'erb'
<ruby[bot]> yorickpeterse: # => true (https://eval.in/545578)
jaruga has joined #ruby
yfeldblum has quit [Ping timeout: 268 seconds]
<Gasher> thanks
jaruga_ has joined #ruby
davee_ has quit [Ping timeout: 244 seconds]
polysics has quit [Ping timeout: 260 seconds]
mikeiniowa has quit [Remote host closed the connection]
biberu has quit [Ping timeout: 260 seconds]
bluOxigen has quit [Ping timeout: 240 seconds]
mikeiniowa has joined #ruby
hotpancakes has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
noService has quit [Ping timeout: 246 seconds]
jaruga has quit [Ping timeout: 252 seconds]
djellemah_ has joined #ruby
merida_ has joined #ruby
djellemah_ has quit [Remote host closed the connection]
bluOxigen has joined #ruby
sandstrom has joined #ruby
n008f4g_ has quit [Ping timeout: 246 seconds]
merida has quit [Ping timeout: 248 seconds]
crazydiamond has joined #ruby
rmulligan has joined #ruby
rodfersou has joined #ruby
Xeago has quit [Remote host closed the connection]
noService has joined #ruby
rmulligan has quit [Ping timeout: 260 seconds]
brt has joined #ruby
biberu has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
yfeldblum has joined #ruby
chouhoulis has joined #ruby
jaruga_ has quit [Quit: jaruga_]
jaruga_ has joined #ruby
noService has quit [Ping timeout: 246 seconds]
dvinciguerra__ has joined #ruby
brt_ has joined #ruby
merida has joined #ruby
brt has quit [Disconnected by services]
brt_ is now known as brt
andywojo has quit [Quit: Lost terminal]
merida_ has quit [Ping timeout: 250 seconds]
MyMind has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
woodruffw has quit [Ping timeout: 252 seconds]
vale_tudo has joined #ruby
roelof has joined #ruby
woodruffw has joined #ruby
woodruffw has quit [Excess Flood]
<roelof> How can I improve this code :https://gist.github.com/rwobben/6f52289d9d0dc686ff270fb19faad5b4
woodruffw has joined #ruby
sdothum has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
Balzrael has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
KensoDev has quit [Read error: Connection reset by peer]
Xiti has joined #ruby
noService has joined #ruby
jaruga_ has quit [Quit: jaruga_]
solocshaw has quit [Remote host closed the connection]
mja has joined #ruby
neanderslob_ has quit [Quit: No Ping reply in 180 seconds.]
solocshaw has joined #ruby
norc has joined #ruby
vqrs_ has joined #ruby
Zarthus_ has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
neanderslob has joined #ruby
drewo has joined #ruby
Some-body_ has joined #ruby
crankharder has joined #ruby
hays has joined #ruby
juanfra has quit [Disconnected by services]
hays_ has quit [Ping timeout: 276 seconds]
juanfra_ has joined #ruby
vqrs has quit [Ping timeout: 244 seconds]
Log1x has quit [Ping timeout: 244 seconds]
Zarthus has quit [Ping timeout: 244 seconds]
WebDawg has quit [Ping timeout: 244 seconds]
IanMalcolm has quit [Ping timeout: 244 seconds]
brixen has quit [Ping timeout: 244 seconds]
mtkd has quit [Ping timeout: 244 seconds]
jhass has quit [Ping timeout: 244 seconds]
hyperdrive has quit [Ping timeout: 244 seconds]
MalcolmReynolds has joined #ruby
D9 has quit [Ping timeout: 244 seconds]
bqscott has quit [Ping timeout: 244 seconds]
flopsec has quit [Ping timeout: 244 seconds]
bihi has quit [Ping timeout: 244 seconds]
djcp has quit [Ping timeout: 244 seconds]
kriskropd has quit [Ping timeout: 244 seconds]
lianj has quit [Ping timeout: 244 seconds]
m8 has quit [Ping timeout: 244 seconds]
kam270 has quit [Ping timeout: 244 seconds]
DarthGandalf has quit [Ping timeout: 244 seconds]
David_H_Smith has quit [Ping timeout: 244 seconds]
Alina-malina has quit [Ping timeout: 244 seconds]
kkirsche has joined #ruby
Cork has quit [Ping timeout: 244 seconds]
r4z3r has quit [Ping timeout: 244 seconds]
TheBrayn has quit [Ping timeout: 244 seconds]
atmosx has quit [Excess Flood]
Some-body_ is now known as DarthGandalf
bihi_ has joined #ruby
jhass has joined #ruby
atmosx_alt has joined #ruby
djcp has joined #ruby
bqscott_ has joined #ruby
David_H_Smith has joined #ruby
mtkd has joined #ruby
hyperdrive has joined #ruby
bihi_ is now known as bihi
lianj has joined #ruby
lianj has quit [Changing host]
lianj has joined #ruby
Alina-malina has joined #ruby
TheBrayn has joined #ruby
D9 has joined #ruby
WebDawg has joined #ruby
brixen_ has joined #ruby
kkirsche is now known as r4z3r
frozen3 has joined #ruby
flopsec has joined #ruby
Log1x has joined #ruby
Log1x has quit [Changing host]
Log1x has joined #ruby
<roelof> Another question : why is answer not a array here ; number = array.shuffle.join.to_i answer << number unless answer.include? number ???
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
kriskropd has joined #ruby
Cork has joined #ruby
mdw has joined #ruby
<gregf_> roelof: youre finding the permutations for a number?
kam270 has joined #ruby
mja has quit [Quit: Lost terminal]
<roelof> gregf_: yep, that is the challenge I have to solve
<madgen> how is answer declared?
<gregf_> >> "245".split("").permutation.to_a.map(&:join).map(&:to_i) # like that
<ruby[bot]> gregf_: # => [245, 254, 425, 452, 524, 542] (https://eval.in/545599)
Guest40396 is now known as b3nt_pin
<gregf_> roelof: you need to calculate the fatorial just once in that while?
<roelof> gregf_: yep, that factorial is a constant
drewo has quit [Ping timeout: 276 seconds]
<gregf_> so change that :) # btw, whiles in ruby are *rare* &
<roelof> and the answer has to be for 24 . [24,42] and I see 24 42
b3nt_pin is now known as beagles
<roelof> gregf_: change that . the calculation is now a seperate variable
<gregf_> # [1,2,3].permutations.map(*.perl) # Perl6 ftw!
<roelof> But still I think answer << number schould be a array not seperate numbers
<norc> roelof: Calling join on an array coerces all elements to string and then joins them together. Thus [10, 11].join would produce a String "1011". Calling to_i on that converts that string back to a number.
<madgen> well the answer is an array and you are adding all permutations
<norc> Just to answer your initial question.
<madgen> it is an array
<madgen> puts prints all array values in a newline
<madgen> puts [1,2,3]
nachoman has joined #ruby
<madgen> ?? puts [1,2,3]
<madgen> >> puts [1,2,3]
<norc> >> p 1
<ruby[bot]> norc: # => 1 ...check link for more (https://eval.in/545600)
<norc> madgen: You have to be identified with NickServ for it to work I believe.
<roelof> >> puts [1,2,3]
benlovell has quit [Ping timeout: 246 seconds]
<madgen> norc: I think it worked, no?
<norc> Nope...
<norc> It just reacted to my statement.
<norc> >> puts [1,2,3]
<ruby[bot]> norc: # => 1 ...check link for more (https://eval.in/545601)
quazimodo has joined #ruby
<madgen> indeed, thanks for warning
<roelof> >> puts [1,2,3]
<ruby[bot]> roelof: # => 1 ...check link for more (https://eval.in/545602)
<roelof> oke, how can I tell ruby I want the whole array
GodFather has joined #ruby
Guest55473 is now known as awk
nachoman has quit [Ping timeout: 248 seconds]
benlovell has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
<madgen> >> puts [1,2,3] # i am registered now, I think...
<ruby[bot]> madgen: # => 1 ...check link for more (https://eval.in/545615)
quazimodo has quit [Read error: Connection reset by peer]
<madgen> roelof: that's the whole array
<manveru> roelof: puts returns one element per line
<madgen> you can do the following though
<madgen> >> p [1,2,3]
<ruby[bot]> madgen: # => [1, 2, 3] ...check link for more (https://eval.in/545616)
<manveru> >> [1,2,3].inspect
<roelof> yep, outs [1,2,3] returns 1 2 3 . I want to output [1,2,3]
<ruby[bot]> manveru: # => "[1, 2, 3]" (https://eval.in/545617)
johnmilton has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
<manveru> >> puts [1,2,3].inspect
<ruby[bot]> manveru: # => [1, 2, 3] ...check link for more (https://eval.in/545618)
benlovell has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
DTZUZU has quit [Ping timeout: 260 seconds]
hanmac has quit [Ping timeout: 248 seconds]
hotpancakes has joined #ruby
<roelof> pff , with answer.inspect I see this rspec error : expected: [123, 132, 213, 231, 312, 321] got: "[\"231\", \"132\", \"321\", \"312\", \"123\", \"213\"]"
<manveru> lol
<manveru> ok, you want to just return your array
<roelof> yep
<manveru> then don't use puts or inspect
<manveru> or p
ldnunes has joined #ruby
bronson has joined #ruby
<manveru> >> [1,2,3]
<ruby[bot]> manveru: # => [1, 2, 3] (https://eval.in/545621)
<manveru> just do that
<roelof> manveru: so just answer
<manveru> yes
peteykun has quit [Ping timeout: 240 seconds]
_blizzy_ has quit [Ping timeout: 250 seconds]
<manveru> aye
<roelof> but I still wonder if it can be done with lesser code
<madgen> also you can replace inject
Gasher has quit [Read error: Connection reset by peer]
<madgen> >> [1,2,3,4].inject(:*)
<ruby[bot]> madgen: # => 24 (https://eval.in/545622)
<manveru> i'm still not sure what it's supposed to do...
hotpancakes has quit [Ping timeout: 264 seconds]
<manveru> running inject on each iterations is bad
vondruch_ has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 252 seconds]
mdw_ has joined #ruby
<manveru> more like (1..array.size).reduce(:+).times{}
<manveru> err, :*
vondruch has joined #ruby
rmulligan has joined #ruby
solars has joined #ruby
nfk|laptop has joined #ruby
<manveru> oh, you try to get all combinations?
GitGud has quit [Quit: ur gay]
<manveru> >> [1,2,3].permutation(3).to_a.map(&:join)
<ruby[bot]> manveru: # => ["123", "132", "213", "231", "312", "321"] (https://eval.in/545624)
<manveru> like that?
c999 has joined #ruby
woodruffw has quit [Ping timeout: 244 seconds]
andywojo has joined #ruby
IrishGringo has joined #ruby
<manveru> >> [1,2,3].permutation(3).map{|a| a.join.to_i }
<ruby[bot]> manveru: # => [123, 132, 213, 231, 312, 321] (https://eval.in/545625)
but3k4 has joined #ruby
mdw has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
rmulligan has quit [Ping timeout: 246 seconds]
<roelof> manveru: thanks, have not learned about the permutations function
hanmac has joined #ruby
wethu has quit [Quit: This computer has gone to sleep]
DTZUZU has joined #ruby
riffraff has joined #ruby
GitGud has joined #ruby
creat has quit [Ping timeout: 260 seconds]
jdawgaz has joined #ruby
jdawgaz has quit [Client Quit]
noService has quit [Ping timeout: 246 seconds]
polysics_ has quit []
Brando753 has quit [Ping timeout: 248 seconds]
polysics has joined #ruby
frozen3 has quit [Read error: Connection reset by peer]
creat has joined #ruby
frozen3_ has joined #ruby
roelof has quit [Quit: Page closed]
m8 has joined #ruby
leon_ee has quit [Remote host closed the connection]
leon_ee has joined #ruby
chouhoulis has joined #ruby
IrishGringo has quit [Ping timeout: 264 seconds]
DTZUZU has quit [Ping timeout: 244 seconds]
dravine has joined #ruby
SCHAAP137 has joined #ruby
User458764 has joined #ruby
frozen3_ has quit [Read error: Connection reset by peer]
benlovell has joined #ruby
jorum has quit [Quit: Lost terminal]
chouhoulis has quit [Ping timeout: 252 seconds]
StyXman has left #ruby [#ruby]
LoneHerm_ has joined #ruby
pandaant has quit [Remote host closed the connection]
brt has quit [Quit: peace]
blackgoat has quit [Quit: WeeChat 1.4]
joonty has quit [Ping timeout: 252 seconds]
skweek has quit [Ping timeout: 260 seconds]
bqscott_ is now known as bqscott
drewo has joined #ruby
baweaver has joined #ruby
n008f4g_ has joined #ruby
inukshuk_ has joined #ruby
inukshuk_ has quit [Client Quit]
krz has joined #ruby
Xeago has quit [Remote host closed the connection]
drewo has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
GodFather has quit [Ping timeout: 244 seconds]
benlovel1 has joined #ruby
hotpancakes has joined #ruby
joonty has joined #ruby
zzz__ has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
benlovell has quit [Ping timeout: 276 seconds]
jdawgaz has joined #ruby
bkxd has joined #ruby
decoponio has quit [Quit: Leaving...]
hotpancakes has quit [Ping timeout: 248 seconds]
Snowy has quit [Ping timeout: 248 seconds]
pydave6367 has quit [Quit: leaving]
aupadhye has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
codecop has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
leon_ee has quit [Remote host closed the connection]
duckpuppy has joined #ruby
Xeago has quit [Remote host closed the connection]
SenpaiSilver has quit [Quit: Leaving]
Xeago has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
Vile` has joined #ruby
hays has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 250 seconds]
NightMonkey has quit [Ping timeout: 244 seconds]
neanderslob has quit [Quit: No Ping reply in 180 seconds.]
neanderslob has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
merida has quit [Remote host closed the connection]
rmulligan has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dvinciguerra__ has quit [Ping timeout: 276 seconds]
NightMonkey has joined #ruby
Snowy has joined #ruby
hightower3 has quit [Ping timeout: 250 seconds]
rmulligan has quit [Ping timeout: 252 seconds]
aryaching has joined #ruby
madgen has joined #ruby
pawnbox has joined #ruby
jaruga_ has joined #ruby
aryaching has quit [Client Quit]
gaf_ has quit [Ping timeout: 244 seconds]
statelesscode has joined #ruby
jaruga_ has quit [Client Quit]
jaruga_ has joined #ruby
hightower3 has joined #ruby
krz has quit [Ping timeout: 248 seconds]
Gasher has joined #ruby
cpup has quit [Ping timeout: 248 seconds]
lyoshajapan has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
aryaching has joined #ruby
CloCkWeRX has joined #ruby
gaf_ has joined #ruby
krz has joined #ruby
cpup has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
<n1colas> Hello
vondruch has quit [Quit: Ex-Chat]
<TheBrayn> hello
skweek has joined #ruby
tvw has quit [Remote host closed the connection]
tvw has joined #ruby
djcp1 has joined #ruby
hotpancakes has joined #ruby
siaw has quit [Quit: siaw]
chouhoulis has joined #ruby
solars has quit [Quit: WeeChat 0.4.2]
ekinmur has joined #ruby
torandu has quit [Ping timeout: 248 seconds]
the_drow has quit [Quit: This computer has gone to sleep]
lyoshajapan has joined #ruby
konsolebox has joined #ruby
hotpancakes has quit [Ping timeout: 276 seconds]
drewo has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
torandu has joined #ruby
hightower3 has quit [Ping timeout: 244 seconds]
krobzaur has joined #ruby
peteykun has joined #ruby
ekinmur has quit [Client Quit]
ekinmur has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
hxegon has joined #ruby
hightower3 has joined #ruby
Vile` has quit [Ping timeout: 240 seconds]
aryaching has quit [Ping timeout: 244 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has joined #ruby
sudoubuntu has joined #ruby
konsolebox has quit [Quit: Leaving]
sgambino has joined #ruby
darkf has quit [Quit: Leaving]
Xeago has quit [Remote host closed the connection]
jeffsouz4 has joined #ruby
jeffsouz4 has left #ruby ["WeeChat 1.4"]
jeffsouz4 has joined #ruby
MaienM has quit [Ping timeout: 252 seconds]
AlexJakeGreen has joined #ruby
jeffsouz4 has left #ruby ["WeeChat 1.4"]
Ishido has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
hightower3 has quit [Ping timeout: 244 seconds]
skade has joined #ruby
rbennacer has joined #ruby
decoponio has joined #ruby
_stu_ has joined #ruby
malconis has joined #ruby
Chagel has joined #ruby
IrishGringo has joined #ruby
Spami_ has quit [Read error: Connection reset by peer]
Spami_ has joined #ruby
tref has quit [Quit: tref]
Ropeney has quit [Quit: Leaving]
Gasher has quit [Ping timeout: 276 seconds]
Xeago has joined #ruby
hxegon has quit [Quit: BRB]
rmulligan has joined #ruby
MaienM has joined #ruby
roelof has joined #ruby
aryaching has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
<roelof> why do I get a non-method error here : nums.inject(1) { |answer, number| sum = sum * number } I thought I could multiply with * ?
benlovel1 has quit [Ping timeout: 276 seconds]
patrick_star has quit [Quit: Leaving]
patrick_star has joined #ruby
DTZUZU has joined #ruby
noService has joined #ruby
<apeiros> roelof: read your code. pay attention to the variable names.
nickjj_ is now known as nickjj
pandaant has joined #ruby
rmulligan has quit [Ping timeout: 264 seconds]
benlovell has joined #ruby
c999 has quit [Quit: ChatZilla 0.9.92 [Firefox 45.0.1/20160315153207]]
gregf has quit [Ping timeout: 276 seconds]
<roelof> apeiros: thanks, I think I need a break
freerobby has joined #ruby
konsolebox has joined #ruby
hotpancakes has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
freerobby has quit [Remote host closed the connection]
inukshuk_ has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
inukshuk_ has quit [Client Quit]
benlovell has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
MaienM has quit [Ping timeout: 244 seconds]
uglybandersnatch has joined #ruby
hotpancakes has quit [Ping timeout: 244 seconds]
nanoz has joined #ruby
hxegon has joined #ruby
hamed_r has joined #ruby
<madgen> roelof: also that's now how you want to use inject it suffices to state the operation in the block eg. sum * number and the assignment back to sum is not necessary.
<madgen> >> (1..10).inject(1) { |sum, number| sum * number }
benlovell has joined #ruby
uglybandersnatch has quit [Ping timeout: 260 seconds]
hotpancakes has joined #ruby
dhollinger has joined #ruby
<madgen> and even the argument to inject is optional as when you don't pass that argument, inject just initialises the accumulator to the first element in the list. In this case very conveniently 1, but for just doing a product it doesn't even have to be 1.
mdw_ has quit [Quit: Sleeping Zzzzz]
n008f4g_ has quit [Ping timeout: 244 seconds]
aegis3121 has joined #ruby
bkxd has joined #ruby
CloCkWeRX has joined #ruby
roshanavand has joined #ruby
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
quazimodo has joined #ruby
GodFodder has joined #ruby
GodFodder has quit [Max SendQ exceeded]
krz has quit [Ping timeout: 244 seconds]
GodFodder has joined #ruby
fexilal has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
Xeago has quit [Remote host closed the connection]
drewo has joined #ruby
idletask has quit [Ping timeout: 240 seconds]
idletask has joined #ruby
saneax is now known as saneax_AFK
openstruct has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
chouhoulis has joined #ruby
ChiefAlexander has joined #ruby
roelof has quit [Quit: Page closed]
CloCkWeRX has quit [Quit: Leaving.]
bry4n_ has joined #ruby
drewo has quit [Ping timeout: 252 seconds]
krz has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
stannard has joined #ruby
bry4n_ has quit [Ping timeout: 268 seconds]
tvw has quit []
<apeiros> madgen: they could even just do .inject(:*)
hotpancakes has quit [Remote host closed the connection]
<madgen> I suggested that earlier it got lost I think
tref has joined #ruby
aryaching_ has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
wilbert has joined #ruby
rubie has joined #ruby
anisha has quit [Quit: Leaving]
aryaching_ has quit [Read error: Connection reset by peer]
sinanislekdemir has quit [Remote host closed the connection]
tref has quit [Quit: tref]
Brando753 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
VeryBewitching has joined #ruby
blandflakes has joined #ruby
<VeryBewitching> o/
rmulligan has joined #ruby
openstruct has quit []
madgen has quit [Ping timeout: 276 seconds]
krz has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
hotpanca_ has joined #ruby
Guest14434 has joined #ruby
konsolebox has quit [Quit: Leaving]
bry4n_ has joined #ruby
<benzrf> hi
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
siaw has joined #ruby
rmulligan has quit [Ping timeout: 276 seconds]
norc has quit [Ping timeout: 250 seconds]
krz has joined #ruby
bkxd has joined #ruby
mdw has joined #ruby
yqt has joined #ruby
djcp1 has quit [Ping timeout: 276 seconds]
krz has quit [Ping timeout: 244 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
melter has quit [Ping timeout: 250 seconds]
skweek has quit [Ping timeout: 246 seconds]
ekinmur has joined #ruby
krz has joined #ruby
bkxd has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Chagel has quit [Ping timeout: 264 seconds]
Guest6001 has joined #ruby
bluOxigen has quit [Ping timeout: 248 seconds]
bkxd has quit [Ping timeout: 248 seconds]
b|ackwolf has joined #ruby
<b|ackwolf> what is the common way to sandboxing dependencies these days?
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
rippa has joined #ruby
FooMunki has quit [Quit: FooMunki]
<apeiros> b|ackwolf: bundler
FooMunki has joined #ruby
twistedpixels has quit [Ping timeout: 260 seconds]
Devalo has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<b|ackwolf> apeiros, for example; when I install rails, 4.2.1 (in vendor/bundle) and I try to create a new Rails application bundler tries to install dependencies again for that project.
joonty has quit [Ping timeout: 264 seconds]
dvinciguerra__ has joined #ruby
<b|ackwolf> apeiros, how can I get rid of downloading the gems every time I run bundle exec rails new app_name ?
stunder has joined #ruby
<apeiros> b|ackwolf: I'm afk now, but I'm pretty sure it's somewhere in bundlers docs
kies has joined #ruby
joonty has joined #ruby
karioleez has quit [Read error: Connection reset by peer]
<b|ackwolf> apeiros, oh sorry, thanks for your mention.
melter has joined #ruby
Devalo has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 244 seconds]
drewo has joined #ruby
DEac-_ has quit [Quit: leaving]
DEac- has joined #ruby
lyoshajapan has quit []
twistedpixels has joined #ruby
karioleez has joined #ruby
djcp1 has joined #ruby
djcp1 has quit [Client Quit]
GodFodder has quit [Ping timeout: 250 seconds]
sgambino has joined #ruby
statelesscode has quit [Quit: statelesscode]
drewo has quit [Ping timeout: 276 seconds]
nfk|laptop has quit [Ping timeout: 244 seconds]
FooMunki has quit [Quit: FooMunki]
madgen has quit [Ping timeout: 248 seconds]
agit0 has quit [Quit: zzzZZZ….]
b|ackwolf has quit [Quit: Leaving]
peteykun has quit [Quit: Leaving]
FooMunki has joined #ruby
rubie has joined #ruby
madgen has joined #ruby
skislak has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
rkazak has joined #ruby
x77686d has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
pandaant has quit [Quit: Lost terminal]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
goodroot has joined #ruby
aufi has quit [Ping timeout: 276 seconds]
yqt has quit [Ping timeout: 268 seconds]
ekinmur has joined #ruby
phpwebdev has joined #ruby
stunder has quit [Ping timeout: 244 seconds]
AlexJakeGreen has quit [Remote host closed the connection]
jaruga_ has quit [Quit: jaruga_]
krz has quit [Ping timeout: 246 seconds]
karioleez has quit [Remote host closed the connection]
platzhirsch has left #ruby [#ruby]
krz has joined #ruby
polishdub has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
whippythellama has quit [Ping timeout: 250 seconds]
x77686d has quit [Read error: Connection reset by peer]
x77686d has joined #ruby
hotpanca_ has quit []
rmulligan has joined #ruby
johnny56_ has joined #ruby
mrgrieve1 has joined #ruby
dopamean_ has joined #ruby
riffraff_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
dikaio has joined #ruby
mrgrieves has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
riffraff_ has quit [Client Quit]
davee_ has joined #ruby
johnny56 has quit [Ping timeout: 264 seconds]
whippythellama has joined #ruby
riffraff has quit [Ping timeout: 250 seconds]
GitGud has quit [Quit: I leave because I don't chill with criminals who sniff chemicals. I'm going to sniff gasoline now bye]
hxegon has quit [Quit: PEACE OUT]
rubie has quit [Remote host closed the connection]
rmulligan has quit [Ping timeout: 248 seconds]
dravine_ has joined #ruby
FooMunki has quit [Quit: FooMunki]
hanmac has quit [Ping timeout: 250 seconds]
FooMunki has joined #ruby
dravine has quit [Ping timeout: 246 seconds]
dravine_ is now known as dravine
GitGud has joined #ruby
dikaio_ has joined #ruby
CausaMortis has quit [Ping timeout: 244 seconds]
rkazak has quit [Quit: Sleep.....ing....]
wilbert has quit [Ping timeout: 260 seconds]
dikaio_ has quit [Max SendQ exceeded]
wilbert has joined #ruby
dikaio_ has joined #ruby
madgen has quit [Ping timeout: 244 seconds]
dikaio has quit [Ping timeout: 264 seconds]
roshanavand has quit [Quit: Leaving]
maletor has joined #ruby
Devalo has joined #ruby
ssiris has joined #ruby
nanoz has quit [Ping timeout: 268 seconds]
torandu has quit [Ping timeout: 244 seconds]
whippythellama has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Remote host closed the connection]
madgen has joined #ruby
torandu has joined #ruby
mistermocha has joined #ruby
freerobby has joined #ruby
KensoDev has joined #ruby
skade has joined #ruby
rkazak has joined #ruby
Devalo has quit [Remote host closed the connection]
Kimm has joined #ruby
dc4 has joined #ruby
bkxd has joined #ruby
gregf has joined #ruby
misterm__ has quit [Ping timeout: 260 seconds]
forest has joined #ruby
forest is now known as Guest88581
dmr8 has joined #ruby
<Kimm> Hi, I'm trying to use ruby c api, i'm trying to compile like so gcc call.c -o call -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0/ but i get error `ruby.h:24:25: fatal error: ruby/config.h: No such file or directory`
Silox| has quit [Quit: Connection closed for inactivity]
Gasher has joined #ruby
rbennacer has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 252 seconds]
rkazak has quit [Quit: Sleep.....ing....]
rbennacer has joined #ruby
howdoi has joined #ruby
pandaant has joined #ruby
rbennacer has quit [Remote host closed the connection]
benlieb has joined #ruby
rbennacer has joined #ruby
karioleez has joined #ruby
amclain has joined #ruby
andikr has quit [Remote host closed the connection]
<benlieb> are "class instance variables" the same as "instance variables"
diegoaguilar has joined #ruby
<apeiros> benlieb: yes
Kero has quit [Ping timeout: 252 seconds]
<benlieb> tnx
<apeiros> it's just a fancy way to say that they're associated with an object whose class is Class (or Module)
smathy has joined #ruby
freerobby has quit [Quit: Leaving.]
machinewar has joined #ruby
bronson has joined #ruby
shredding has joined #ruby
<benlieb> gotcha, I guess most developers just say "instance variable", but a lot of blogs (being formal) use "class instance variable". I just wanted to make double sure
minimalism has quit [Quit: minimalism]
<machinewar> anyone experienced using CSV setting headers: true. When I give it a afile with only one row (the headers) it doesn't recongnize them as headers
mistermocha has quit [Remote host closed the connection]
hanmac has joined #ruby
<machinewar> has anyone seen this before / have a non-hacky solution (i.e. adding a fake row beneath)
<benlieb> I'm trying to make sure my rails app is thread safe, and it's kinda scary
axl_ has joined #ruby
smathy has quit [Client Quit]
A124 has quit [Quit: '']
karioleez has quit [Client Quit]
karioleez has joined #ruby
workmad3_ has joined #ruby
baweaver has joined #ruby
nanoz has joined #ruby
<benlieb> apeiros: actually I'm still confused.
mistermocha has joined #ruby
<benlieb> There is a section called "Class instance variables" that says that "Class instance variables" can be not thread safe
<benlieb> "In this case, calling the layout method causes Rails to set the class instance variable @_layout for the controller class. If two concurrent requests (served by two threads) hit this code simultaneously, they might end up in a race condition and overwrite each others’ layout."
<benlieb> So it seems like class instance vars are set outside of a method, and a "instance" var isn't?
mistermo_ has joined #ruby
A124 has joined #ruby
<benlieb> confused
rkazak has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
Kero has joined #ruby
rolha has quit [Read error: Connection reset by peer]
hightower3 has joined #ruby
benlovell has quit [Ping timeout: 244 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has quit [Ping timeout: 244 seconds]
rolha has joined #ruby
imperator has joined #ruby
stunder has joined #ruby
<imperator> good morning
matt_d_ is now known as matt_d
TomyLobo has joined #ruby
rkazak has quit [Ping timeout: 260 seconds]
mrgrieve1 has quit [Ping timeout: 244 seconds]
Couch has quit [Ping timeout: 244 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
mistermocha has joined #ruby
graywh has joined #ruby
<imperator> anyone know how to parse an iso 8601 interval string into a Ruby object?
smathy has joined #ruby
<imperator> e.g. "P10675199DT2H48M5.4775807S"
graywh has left #ruby [#ruby]
aganov has quit [Remote host closed the connection]
<imperator> is there a core/stdlib method out there somewhere i'm missing?
dionysus69 has quit [Ping timeout: 244 seconds]
n008f4g_ has joined #ruby
shredding has quit [Ping timeout: 260 seconds]
benlovell has joined #ruby
frem has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Don_John has joined #ruby
Xeago has joined #ruby
symm- has joined #ruby
cjbottaro has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
Miron has quit [Ping timeout: 248 seconds]
nando293921 has joined #ruby
djcp1 has joined #ruby
zzz__ has quit [Quit: Leaving...]
mark2 has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 276 seconds]
bhaak has joined #ruby
tristanp_ has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
rmulligan has joined #ruby
Miron has joined #ruby
pandaant has quit [Remote host closed the connection]
tristanp has quit [Ping timeout: 260 seconds]
marxarelli has joined #ruby
Xeago has quit [Remote host closed the connection]
sgambino has joined #ruby
merida has joined #ruby
poguez_ has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
chouhoulis has joined #ruby
rmulligan has quit [Ping timeout: 248 seconds]
benlovell has joined #ruby
whippythellama has joined #ruby
User458764 has joined #ruby
bronson has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
hxegon has joined #ruby
<shevy> I think there is not
rolha has quit [Quit: Textual IRC Client: www.textualapp.com]
zapata has quit [Ping timeout: 260 seconds]
LaT0rtue has joined #ruby
zast has joined #ruby
rubie has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
drewo has joined #ruby
Spami_ has quit [Ping timeout: 248 seconds]
freerobby has joined #ruby
merida has quit [Remote host closed the connection]
freerobby1 has joined #ruby
merida has joined #ruby
Gasher has quit [Quit: Leaving]
<darix> imperator: that's not correct iso date no?
<darix> that would be more in the line of 2016-03-31T16:35:04+00:00
sneakerhax has quit [Ping timeout: 250 seconds]
hightower3 has quit [Ping timeout: 250 seconds]
hightower2 has joined #ruby
freerobby has quit [Ping timeout: 260 seconds]
benlovell has quit [Read error: Connection reset by peer]
thomashaw has joined #ruby
tristanp has joined #ruby
cwong_on_irc has joined #ruby
cwong_on_irc was kicked from #ruby by ruby[bot] [was banned before]
<benlieb> apeiros: I may have misunderstood you before, but on further reading it appears that "class instance variables" are definitely not the same as "instance variables".
KensoDev has quit [Quit: Textual IRC Client: www.textualapp.com]
tristanp has quit [Read error: Connection reset by peer]
Spami_ has joined #ruby
baweaver has quit [Remote host closed the connection]
tristanp_ has quit [Ping timeout: 244 seconds]
tristanp has joined #ruby
<apeiros> benlieb: sorry, missed your earlier ping
duderonomy has quit [Ping timeout: 250 seconds]
<apeiros> benlieb: no, you didn't misunderstand me. class *instance* variables are definitively the same as instance variables
IrishGringo has quit [Ping timeout: 246 seconds]
<apeiros> class variables are something different, though. @@class_variables, @instance_variables.
<apeiros> darix: he's talking about interval, not time. that's also specified by iso8601
moei has quit [Quit: Leaving...]
djbkd has joined #ruby
zapata has joined #ruby
benlovell has joined #ruby
<apeiros> benlieb: I think "class instance variables can't be thread-safe" is a mischaracterization. I won't read the full article, but it's all about what they say at the start: it matters whether you share mutable state or not.
<benlieb> From this article (http://thoughts.codegram.com/understanding-class-instance-variables-in-ruby/) He explains that there class vars @@var, instance vars @var defined in method, and class instance vars, @var defined in class body outside of method, and only accessible from class methods
<apeiros> and as it is in ruby, you can share *all* variable types across threads, even local variables.
<apeiros> benlieb: yeah, "class methods" is again, just a fancy term for "instance methods on the object's singleton_class"
<apeiros> there's only one kind of methods in ruby, and that's instance methods.
<apeiros> it's just more convenient to say "class method". and it's widely understood what is meant. even though sadly many rubyists miss the technical background.
djbkd has quit [Ping timeout: 268 seconds]
<imperator> darix, is it not correct? quite possible, this is coming from MS
B1n4r10 has joined #ruby
wilbert has quit [Ping timeout: 264 seconds]
Spami has joined #ruby
ChiefAlexander has joined #ruby
agit0 has joined #ruby
Spami_ has quit [Ping timeout: 276 seconds]
Spami_ has joined #ruby
<imperator> apeiros, yes :)
barajasfab has joined #ruby
m4dfry has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
mdw has quit [Quit: Sleeping Zzzzz]
GitGud has quit [Ping timeout: 248 seconds]
davedev24 has joined #ruby
Spami has quit [Ping timeout: 264 seconds]
CausaMortis has joined #ruby
SCHAAP137 has joined #ruby
IrishGringo has joined #ruby
hxegon is now known as hxegon_AFK
<imperator> well, i did find the iso8601 gem, which has ISO8601::Duration and seems to parse it properly
dopie has quit [Ping timeout: 260 seconds]
freerobby1 has quit [Quit: Leaving.]
tristanp_ has joined #ruby
karioleez has quit [Remote host closed the connection]
finisherr has joined #ruby
rodfersou is now known as rodfersou|lunch
sepp2k has quit [Ping timeout: 244 seconds]
sepp2k1 has joined #ruby
benlovell has quit [Ping timeout: 244 seconds]
tristanp has quit [Ping timeout: 268 seconds]
stannard_ has joined #ruby
mjc_ has joined #ruby
stannard has quit [Ping timeout: 244 seconds]
KensoDev has joined #ruby
dionysus69 has joined #ruby
hxegon_AFK has quit [Quit: BRB]
vF3hNGxc47h8 has joined #ruby
Guest88581 has quit [Remote host closed the connection]
Outlastsheep has quit [Ping timeout: 244 seconds]
agit0 has quit [Quit: zzzZZZ….]
Xeago has joined #ruby
priodev has quit [Ping timeout: 248 seconds]
karioleez has joined #ruby
merida_ has joined #ruby
<shevy> apeiros well "class method" is a lot shorter to write than "instance method on the object's singleton_class" - and you may have to explain what a singleton_class is in addition to that in a discussion :-)
merida has quit [Ping timeout: 248 seconds]
choke has joined #ruby
fragtastic has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
yeticry has quit [Ping timeout: 248 seconds]
agit0 has joined #ruby
loc22 has joined #ruby
<apeiros> shevy: I trust in their ability to `ri singleton_class`
<apeiros> and alternatively in their ability to ask follow-up questions
Kero has quit [Ping timeout: 260 seconds]
priodev has joined #ruby
Spami_ has quit [Quit: Leaving]
fragtastic has joined #ruby
<Zarthus_> i'm not sure if my brain is having a day off or not, I'm trying to default a value if it is not set, my IDE is complaining that this always evaluates to true: myvar = config['item'] || true -- it is probably right, but I find the alternative of config['item'].nil? ? true : config['item'] longwinded, surely there is a better way I'm just unable to think of right now?
Spami has joined #ruby
Kero has joined #ruby
IrishGringo has quit [Ping timeout: 246 seconds]
vF3hNGxc47h8 has quit [Ping timeout: 246 seconds]
karioleez has quit [Ping timeout: 264 seconds]
rmulligan has joined #ruby
rcvalle has joined #ruby
sneakerhax has joined #ruby
shinnya has joined #ruby
<shevy> Zarthus_ well it evaluates to true right? because one argument will always be true
Zarthus_ is now known as Zarthus
Xeago has quit [Remote host closed the connection]
DoubleMalt has quit [Remote host closed the connection]
<Zarthus> yeah, I want it to be the first one if it is set at all
<Zarthus> the default value should be true, but whenever the config item is made in a yaml file, it should be that value.
_ko1 has quit [Ping timeout: 244 seconds]
Snowy has quit [Remote host closed the connection]
dvinciguerra__ has quit [Ping timeout: 260 seconds]
<djellemah> Zarthus_: That expression only evaluates to true when config['item'] is nil (or config['item'] is true). Which is what you want.
<shevy> when will it not be true?
<Zarthus> when the user's value in the yaml file is false, or any string
<Zarthus> (but the latter won't be a case)
wilbert has joined #ruby
<shevy> no I mean
<shevy> in the evaluation
<shevy> I can't seem to find a result where it will be false
<Zarthus> config['item'] is loaded from a yaml file, so it's user edited
Spami has quit [Ping timeout: 244 seconds]
<Zarthus> it may essentially be anything (but it'd be pebcak if they fill in a non-boolean value)
<Zarthus> when that value is not in the yaml file though, it should default to true.
<shevy> I mean the myvar = config['item'] || true
x77686d has quit [Quit: x77686d]
rmulligan has quit [Ping timeout: 244 seconds]
<Zarthus> does this help describe my problem? https://eval.in/545826
<Zarthus> i'm looking for something that would make for better-readable code than the last case
tildes has quit [Ping timeout: 248 seconds]
<Zarthus> Some of the YAML items go pretty deep, and you'd be reading much of the same code essentially.
johnny56_ is now known as johnny56
benlieb has quit [Quit: benlieb]
<Zarthus> and the only solution I seem to be thinking of is to make a method that accepts an item and does it behind the scenes, but this is ruby - surely there's something I'm missing to make my life easier (like a strict null coalising operator)
hxegon has joined #ruby
ocbtec has joined #ruby
<shevy> Zarthus I haven't been able to go to that part, I am still pondering about what djellemah wrote ;)
Cohedrin has joined #ruby
<Zarthus> ah
<shevy> what I do in my projects is to usually sanitize the configuration dataset
<Zarthus> i'm not very worried about sanitizing of the data
Cohedrin has quit [Max SendQ exceeded]
<shevy> like I can do "use_colours: t" and it'll become "yes we will use colours"
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
<shevy> Zarthus can you set a state of default values?
<shevy> and then load up the configuration?
<Zarthus> the defaults that the user will copy (example.config.yaml) will contain all values with predefined values, and there's documentation of what each item expects. If they go and fill in a string where a boolean previously was, they're just dummies.
<Zarthus> shevy: sorta, I'd prefer not to. I'm aware of ||=
<Kimm> Hi, I'm trying to use ruby c api, i'm trying to compile like so gcc call.c -o call -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0/ but i get error `ruby.h:24:25: fatal error: ruby/config.h: No such file or directory`
roelof has joined #ruby
<Zarthus> in all fairness the once innocent configuration.rb is becoming a bit big right now, but this should be the last edit I make to it and I'm not in the mood of refactoring :)
<Zarthus> famous last words, anyways.
<shevy> I have all sort of different size ranges for config values... lemme count
<roelof> Can anyone help me with this problem : https://gist.github.com/rwobben/3700b514db89aba2b8d583acf717f32a
<shevy> ah... rbt has 61 entries... diashell 57, but these are the upper ranges. I guess the project average I have is 2-4
karioleez has joined #ruby
Spami has joined #ruby
bronson has joined #ruby
sudoubuntu has joined #ruby
rmulligan has joined #ruby
thomashaw has quit [Quit: thomashaw]
workmad3 has joined #ruby
karioleez has quit [Ping timeout: 248 seconds]
rodfersou|lunch is now known as rodfersou
jenrzzz has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
workmad3_ has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
bkxd has joined #ruby
GitGud has joined #ruby
<smathy> roelof, gty vs qty
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sorbo_ has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
sudoubuntu has joined #ruby
sudoubuntu has quit [Client Quit]
n008f4g_ has joined #ruby
GitGud has quit [Client Quit]
LowLifePerv has joined #ruby
rubie has quit [Remote host closed the connection]
drbrain has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
edwinvdgraaf has joined #ruby
<shevy> hah good catch
Guest120 is now known as Cyrus
Cyrus has quit [Changing host]
Cyrus has joined #ruby
sorbo_ has quit [Ping timeout: 250 seconds]
dn` has quit [Quit: dn`]
tildes has joined #ruby
evidex has quit [Remote host closed the connection]
wilbert has quit [Quit: quit]
baweaver has joined #ruby
<smathy> Copy, find, paste - I didn't do much.
Sammichmaker has joined #ruby
jrafanie has joined #ruby
<thoraxe> is there a way with haml to set the heading depth programmatically?
<thoraxe> %h#{varname} doesn't seem to work
borodin has joined #ruby
<thoraxe> at least not buried in asciidoctor
<borodin> guys I have rbenv installed using puppet on a centos box. Root's ruby is /opt/rbenv/shims/ruby but a regular user's ruby is /usr/bin/ruby
<borodin> how do I get all regular users to have the rbenv ruby?
<borodin> when I try to execute /optrbenv/shims/ruby as a regular user, I get permission denied
djbkd has joined #ruby
AlexRussia has joined #ruby
jason^ has joined #ruby
karioleez has joined #ruby
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
User458764 has joined #ruby
rubie has joined #ruby
baweaver has quit [Ping timeout: 248 seconds]
mdw has joined #ruby
<jason^> is there a way to return multiple objects within a array.map?
freerobby has joined #ruby
<apeiros> jason^: as always - by returning an array
<jason^> then it ends up being [a,b,c,[d,e,f]]
<apeiros> so?
djbkd has quit [Ping timeout: 244 seconds]
karioleez has quit [Ping timeout: 250 seconds]
<jason^> i'd rather it be a,b,c,d,e,f so it's not nested
<apeiros> then write the code accordingly
<apeiros> from map alone it won't end up as [a,,
<apeiros> whoops, premature enter
<roelof> thanks, it's not my day today with coding
<jason^> yeah i can write around it
<apeiros> from map alone it won't end up as [a,b,c,[d,e,f]]
<apeiros> so if you get that, you're leaving out something.
Spami_ has joined #ruby
uglybandersnatch has joined #ruby
GitGud has quit [Quit: theFam The iphone rose gold is not gay..]
iy has joined #ruby
<apeiros> anyway, I think:
Spami has quit [Ping timeout: 276 seconds]
<apeiros> ?code jason^
<ruby[bot]> jason^: We can't help you without your code, please post it to https://gist.github.com
hamed_r has quit [Quit: Leaving]
<smathy> thoraxe, you'll have to use `= content_tag "h#{varname}"...
ssiris has quit [Quit: End of Line]
juanfra_ has quit [Quit: juanfra_]
alexherbo2 has joined #ruby
juanfra has joined #ruby
djbkd has joined #ruby
uglybandersnatch has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
dopie has joined #ruby
<apeiros> jason^: always return an array and use flat_map
kith has quit [Quit: kith]
roelof has quit [Quit: Page closed]
kellabyte has joined #ruby
<smathy> thoraxe, which you could, of course, make into your own helper method, but don't call it `h` :)
<kellabyte> I'm trying to use %Q() to run a curl command that works on the command line but I'm getting this error, any thoughts? I feel like I'm doing something really dumb somewhere: https://gist.github.com/kellabyte/84235c207df7c53c0ac9cec05b26cf04
krz has quit [Ping timeout: 276 seconds]
<jason^> apeiros: never knew flat_map existed
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<jason^> thank you ;)
drewo has quit [Ping timeout: 260 seconds]
stannard_ has quit [Remote host closed the connection]
<smathy> kellabyte, you don't have a |
<kellabyte> smathy: I'm not sure what you mean?
bruce_lee has quit [Remote host closed the connection]
baweaver has joined #ruby
aegis3121 has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<thoraxe> smathy: ah ok. there's also haml_tag
<thoraxe> but i will look at content_tag that might work better for me
dopie has quit [Quit: Lost terminal]
<smathy> kellabyte, read the Kernel#open docs. You're telling ruby to open a file with that string as a name.
<thoraxe> wait
<thoraxe> is content_tag a rails thing? I'm not using rails.
<kellabyte> smathy: I have other curl commands working fine though, not sure why this specific one isn't
dopie has joined #ruby
<djellemah> shevy: you're right, I didn't think of the case where config['item'] => false
<djellemah> >> [{'item' => 42}, {'item' => true}, {'item' => false}, {'item' => nil}, {}].map{|config| config['item'] || true}
<ruby[bot]> djellemah: # => [42, true, true, true, true] (https://eval.in/545841)
karioleez has joined #ruby
stannard has joined #ruby
skweek has joined #ruby
rubie_ has joined #ruby
<smathy> kellabyte, I couldn't say why the others are working, you must be doing something differently there.
baweaver has quit [Ping timeout: 264 seconds]
chouhoul_ has joined #ruby
<kellabyte> where does the | go? I'm new to ruby so trying to interpret what you're telling me
machinewar has quit [Remote host closed the connection]
<smathy> thoraxe, ah, yes it is. Sorry, I thought I was in #ror. Yeah, haml_tag then.
<smathy> kellabyte, the Kernel#open docs are pretty clear. Which part didn't you understand?
rubie has quit [Ping timeout: 252 seconds]
<smathy> kellabyte, I realized you were new to Ruby, because you're shelling out to curl :)
<kellabyte> lol
roelof has joined #ruby
<kellabyte> fair point :P
imperator has left #ruby ["Leaving"]
zast has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
<smathy> Props for finding %Q - most people spend a long time in backslash hell.
<kellabyte> I mostly found it because it was already in the code base lol
karioleez has quit [Ping timeout: 260 seconds]
<roelof> hopefully the last question for today . Why do I not see the quantity here : https://gist.github.com/rwobben/5c81ca3f8d29bf18293ab9c6b26ef690
<smathy> Oh, ok. You should take a look at %x btw, but it'd also be good to solve this method before moving on.
chouhoulis has quit [Ping timeout: 244 seconds]
<smathy> roelof, FFS, for the same reason I mentioned that was causing your other problem.
<smathy> [11:34:35] smathy:roelof, gty vs qty
<kellabyte> smathy: yeah, I like to learn my mistakes before going down an alternative route and then not learning what I did wrong
<roelof> oke, I will look for new glasses :(
<smathy> roelof, or, y'know, copy paste into a find.
dvinciguerra has joined #ruby
<smathy> OSX has a nice zoom feature.
<kellabyte> ok read the docs, clear about | but thats strange that the other curl commands work without it
<smathy> Also, maybe you need a different font in your editor.
<djellemah> Kimm: You'll needs another -I something like -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0/x86_64-linux
abyx has joined #ruby
<smathy> kellabyte, if you want to add them to your gist I'll explain your confusion.
<kellabyte> sweet, sure :) I have to obfuscate the exact url details for business purposes
baweaver has joined #ruby
<smathy> kellabyte, yeah, the URL isn't important.
tristanp_ has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
tristanp has joined #ruby
blandflakes has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
moeabdol1 has joined #ruby
stannard has quit [Remote host closed the connection]
loc22 has quit [Quit: Lingo: www.lingoirc.com]
cdg has quit [Remote host closed the connection]
mburns has quit [Ping timeout: 260 seconds]
roelof has quit [Quit: Page closed]
stannard has joined #ruby
cdg has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jdawgaz has joined #ruby
iy has quit [Quit: Page closed]
moeabdol has quit [Ping timeout: 276 seconds]
mburns has joined #ruby
adamsilver has joined #ruby
Outlastsheep has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Success has joined #ruby
<adamsilver> HI guys, new to Ruby. Which application server I should be using here: http://www.redmine.org/projects/redmine/wiki/HowTo_configure_Nginx_to_run_Redmine
drewo has joined #ruby
jt__ has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
blaxter has quit [Quit: foo]
<baweaver> kellabyte: oh hey, didn't know you were on irc
jdawgaz has quit [Client Quit]
<baweaver> (keystonelemur on twitter)
symm- has quit [Ping timeout: 244 seconds]
cdg has quit [Ping timeout: 250 seconds]
karioleez has joined #ruby
krz has joined #ruby
dmr8 has quit [Quit: Leaving]
mikecmpbll has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
<havenwood> adamsilver: What you linked shows Nginx as a reverse proxy to the Thin rack webserver.
<smathy> kellabyte, that first line is opening a file, not a command.
<smathy> kellabyte, oh, wait, `source` is a URL prefix.
<havenwood> adamsilver: Say more about what you're wanting to know?
<smathy> kellabyte, so that first one is opening a URL not a full `curl` command.
<kellabyte> ok let me show another example
<kellabyte> sorry
<baweaver> Would Net::HTTP not work for this? At least for running a system command, why not use backticks?
Success has quit [Ping timeout: 250 seconds]
<smathy> kellabyte, that works because of open-uri, you'll be `require "open-uri"` somewhere in your code, which mixes this into Kernel#open: http://ruby-doc.org/stdlib-2.3.0/libdoc/open-uri/rdoc/OpenURI.html
<baweaver> or system, or %x, or .... ok, maybe we have a lot of those.
<baweaver> smathy: TIL
<smathy> baweaver, yeah, already talking about backticks, but she (admirably) wants to understand why one open works and the other doesn't.
<kellabyte> smathy: oh I see, interesting. what about this second example? https://gist.github.com/kellabyte/84235c207df7c53c0ac9cec05b26cf04
<baweaver> yeah, I was scratching my head on why that worked myself
<smathy> kellabyte, nope, that `status = ` line doesn't work, maybe it's %x instead of %Q ?
<borodin> I installed rbenv using puppet-rbenv module, but ruby is still the ols system ruby for regular users. Does anyone know what could be wrong or how to troubleshoot?
<smathy> kellabyte, well, it works, but it doesn't do anything - just assigns a string to a variable.
rmulligan has quit [Ping timeout: 250 seconds]
<baweaver> ^
rmulligan has joined #ruby
karioleez has quit [Ping timeout: 260 seconds]
<thoraxe> so, using haml_tag inside a haml document seems to be giving me grief
<kellabyte> smathy: sorry there's an open() there too, I forgot to paste that
<smathy> baweaver, I'm not, for even a second, recommending using open-uri, I think it's such a PHP-esque API.
<baweaver> yeah, fair. I just didn't reconcile how in the world that worked
<baweaver> thoraxe: Might check #RubyOnRails
<smathy> kellabyte, copy and paste exactly what's there, then you can remove the sensitive things.
<smathy> baweaver, thoraxe isn't using Rails, pure haml.
<baweaver> ah
* baweaver is off to a bad start today
IrishGringo has joined #ruby
<thoraxe> pebcak
<thoraxe> nvm
x77686d has joined #ruby
<shevy> this is not a good day for beavers it seems
adamsilver has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop_ has joined #ruby
<baweaver> http://www.sitepoint.com/ruby-net-http-library/ - that covers a good amount on Net::HTTP
blackjid has quit [Max SendQ exceeded]
Dimik has joined #ruby
<baweaver> anyways, off I go
<havenwood> I've been enjoying using HTTP.rb: https://github.com/httprb/http
Guest14434 has quit [Remote host closed the connection]
Guest6001 has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
adamsilver has joined #ruby
<adamsilver> havenwood: I want to install Redmine on production
blackjid has joined #ruby
<shevy> there is so much on github related to ruby that I don't know
symm- has joined #ruby
<miah> endless amounts of code on github really
<havenwood> shevy: Must. Read. All the code!
<shevy> I believe that :)
shredding has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
hplar_ has quit [Remote host closed the connection]
elaptics is now known as elaptics`away
finisherr has quit [Quit: finisherr]
karioleez has joined #ruby
the_drow has joined #ruby
zeroDivisible has joined #ruby
<kellabyte> smathy: ooooh I see the difference, some do an IO.open
sorbo_ has joined #ruby
bphogan has joined #ruby
Mon_Ouie has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
shadoi has joined #ruby
karioleez has quit [Ping timeout: 276 seconds]
polysics has quit [Read error: Connection reset by peer]
djbkd_ has joined #ruby
polysics_ has joined #ruby
sorbo_ has quit [Ping timeout: 276 seconds]
majuscul1 is now known as majuscule
<eam> does irb have anything like binding.pry to drop back to a prompt?
vikaton has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
<eam> (obviously pry is ideal but I was just in an environment without it)
nanoz has quit [Read error: Connection reset by peer]
resno has quit [Ping timeout: 252 seconds]
<adaedra> I think there's IRB.start, but this does not use current context
ur5us has joined #ruby
<eam> yeah that blows up if you're already in an irb
Azure has quit [Remote host closed the connection]
<apeiros> eam: I think I released irb_drop as a gem
djbkd_ has quit [Ping timeout: 264 seconds]
<apeiros> if not, should be easy to find
shredding has quit [Ping timeout: 246 seconds]
<eam> apeiros: nice! but, damn, if it's a gem I can just install pry :D
<kellabyte> in ruby how can I check something["foo"]["bar"][0]["baz"]["foo"] exists before trying to access it and crash?
<apeiros> eam: it's ~10 lines of code
rbennacer has quit [Remote host closed the connection]
<kellabyte> I know in ruby you can check that without having to check each level right?
<Papierkorb> kellabyte: See Hash#dig
<eam> aha, looks like the magic is ARGV stuff - apeiros thx
<adaedra> &ri Array#dig kellabyte
<Papierkorb> kellabyte: Part of Ruby2.3
<apeiros> but IMO yeah, just use pry
<apeiros> irb is horrible :)
<adaedra> or Hash, but it's the same
Musashi007 has joined #ruby
aegis3121 has quit [Ping timeout: 246 seconds]
<kellabyte> oh neat
<apeiros> eam: ah, hehe, the code comments are gold
<apeiros> # IRB is being stupid (it processes ARGV, destroying it in the process)
rbennacer has joined #ruby
merida_ has quit [Remote host closed the connection]
<eam> kellabyte: you can also just do something[:foo][:bar} rescue nil
<eam> let it raise, let it raise
<shevy> hah cool that irb_drop gem
<adaedra> eam: typo aside, ewwww.
<eam> adaedra: it's fine, don't worry about it. it's ... fine
<kellabyte> lol
<kellabyte> can I mix dig with keys and array locations too?
<Papierkorb> kellabyte: Yes.
<eam> should work with any object that implements #dig yeah?
aegis3121 has joined #ruby
<adaedra> Hash#dig and Array#dig call #dig on the next object each time if they respond to it.
jdawgaz has joined #ruby
<adaedra> >> class Blackhole; def dig(*); self; end; end; [Blackhole.new].dig(0, 1, 2, 3, 4)
<ruby[bot]> adaedra: # => #<Blackhole:0x40f658d4> (https://eval.in/545855)
<kellabyte> ahh
jackjackdripper has joined #ruby
rubie_ has quit [Remote host closed the connection]
sarbs has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
aegis3121 has quit [Ping timeout: 276 seconds]
hxegon is now known as hxegon_AFK
stannard has quit [Remote host closed the connection]
Xeago has joined #ruby
karioleez has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
cpruitt has joined #ruby
<havenwood> I dig it.
sepp2k1 has quit [Ping timeout: 246 seconds]
sarbs has joined #ruby
<shevy> the undertaker
baweaver has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
jt__ has quit [Remote host closed the connection]
<Kimm> undefined reference to `rb_require' when using ruby c api, what is the ruby library name?
<adaedra> ?rimshot havenwood
<ruby[bot]> havenwood: Badum-Tshh! https://www.youtube.com/watch?v=oShTJ90fC34
rodfersou is now known as rodfersou|afk
shinnya has quit [Ping timeout: 264 seconds]
dc4 has quit [Ping timeout: 246 seconds]
Acontius has joined #ruby
symm- has quit [Ping timeout: 246 seconds]
dn` has joined #ruby
kobain has joined #ruby
dc4 has joined #ruby
hxegon_AFK is now known as hxegon
nikger has joined #ruby
sandstrom has joined #ruby
sergey_makagon has joined #ruby
stunder has quit [Ping timeout: 264 seconds]
yqt has joined #ruby
skweek has quit [Ping timeout: 250 seconds]
rodfersou|afk is now known as rodfersou
krz has quit [Read error: Connection reset by peer]
madgen has joined #ruby
LaT0rtue has quit [Read error: Connection reset by peer]
Cohedrin_ has joined #ruby
krz has joined #ruby
Cohedrin_ has quit [Max SendQ exceeded]
CausaMortis has quit [Ping timeout: 240 seconds]
nikger has quit [Remote host closed the connection]
Cohedrin_ has joined #ruby
moeabdol1 has quit [Ping timeout: 252 seconds]
symm- has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cohedrin has quit [Ping timeout: 260 seconds]
mdw_ has joined #ruby
ramfjord has joined #ruby
BSaboia has joined #ruby
Todd has quit [Quit: WeeChat 0.4.2]
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
moss has joined #ruby
mdw has quit [Ping timeout: 244 seconds]
mdw has joined #ruby
<Kimm> rb_protect( (VALUE (*)(VALUE))rb_require, (VALUE) "test.rb", &error); //causes segfault, anyone had this problem?
the_drow has quit [Quit: This computer has gone to sleep]
jdawgaz has joined #ruby
bronson has joined #ruby
rmulligan has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
<Ox0dea> Kimm: You can't just cast a char * to VALUE like that.
sudoubuntu has joined #ruby
mdw_ has quit [Ping timeout: 246 seconds]
<Kimm> I forgot to ruby_init()
spider-mario has joined #ruby
BSaboia has quit [Quit: Leaving]
bronson has quit [Ping timeout: 252 seconds]
sergey_makagon has quit [Remote host closed the connection]
bkxd has joined #ruby
x0f has quit [Ping timeout: 268 seconds]
<moss> hi. i'm trying to do the following and am having trouble getting started: find directory names located at /sys/class/net/* - for every directory name, get the value of /sys/class/net/{dirname}/operstate, if the value is up, check /etc/sysconfig/network-scripts/ifcfg-{dirname} for the string 'BOOTPROTO="dhcp"' - if it exists, return true.
jenrzzz has joined #ruby
KensoDev has quit [Max SendQ exceeded]
stannard has joined #ruby
<moss> If anyone's willing to help me get started with this, I'd appreciate it
sergey_makagon has joined #ruby
<Papierkorb> moss: See Dir#glob for finding the folders, File.exist? to check for the file (Or Pathname#file?), File.read or Pathname#read to read the file, Pathname#dir? for the network-scripts stuff, and Array#grep for the "contains this string" stuff
<Papierkorb> moss: I think using Pathname() is much nicer on the long run when dealing with path magic and files/directories, but you can also use File.exist? and friends if you like them more
sarbs has quit [Ping timeout: 244 seconds]
<moss> Papierkorb: Thank you
<moss> I will look into this
<moss> This is all for puppet facter..
bkxd has quit [Ping timeout: 268 seconds]
<moss> Papierkorb: won't Dir.glob return all the files in that folder?
<Papierkorb> moss: Nope, .glob works like in bash
<moss> ah
baweaver has joined #ruby
<Papierkorb> moss: You can also write Dir['foo/bar*'] instead of Dir.glob('foo/bar*') ;)
<Kimm> !paste
lemur has joined #ruby
Musashi007 has quit [Quit: Musashi007]
djbkd_ has joined #ruby
Aviio has joined #ruby
sarbs has joined #ruby
Xeago has quit [Ping timeout: 276 seconds]
dvinciguerra has quit [Ping timeout: 252 seconds]
bphogan has left #ruby [#ruby]
pawnbox has quit [Remote host closed the connection]
<moss> Papierkorb: the problem is that I need ruby to find the names of the directories and edit files based on the name of the directory
CausaMortis has joined #ruby
Aviio has quit [Remote host closed the connection]
Aviio has joined #ruby
<moss> so how do i include a variable in File.open?
pawnbox has joined #ruby
<moss> or File.read
howdoi has quit [Quit: Connection closed for inactivity]
stunder has joined #ruby
tvon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
tvon has joined #ruby
Snowy has joined #ruby
lemur has quit [Ping timeout: 248 seconds]
<Kimm> If anyone mind please take a look at this https://gist.github.com/anonymous/d0d539c1249e073a3b4b427c789fa7d5, error im having when calling a ruby function from c
<majuscule> how can i use a hash in an erb template?
djbkd_ has quit [Ping timeout: 244 seconds]
<Papierkorb> moss: Are you new to ruby?
<moss> Papierkorb: yes, very
<moss> new to ruby, programming in general
sarbs has quit [Ping timeout: 260 seconds]
<majuscule> ahh you just need to use :key instead of 'key'
<Papierkorb> moss: Claims to take 20mins, but gets you started: https://www.ruby-lang.org/en/documentation/quickstart/
pawnbox has quit [Ping timeout: 264 seconds]
<moss> Great :)
Aviio has quit [Remote host closed the connection]
stunder has quit [Ping timeout: 276 seconds]
tvon has quit [Client Quit]
<Ox0dea> Kimm: rb_require("./e.rb");
diegoviola has joined #ruby
dc4 has quit [Ping timeout: 250 seconds]
<Ox0dea> `require` searches $LOAD_PATH, which doesn't contain the current working directory by default.
dvinciguerra has joined #ruby
mdelgadonyc has joined #ruby
sarbs has joined #ruby
hahuang61 has joined #ruby
rubie has joined #ruby
rkazak has joined #ruby
KensoDev has joined #ruby
borodin has quit [Ping timeout: 250 seconds]
hahuang65 has joined #ruby
sarbs has quit [Ping timeout: 248 seconds]
codecop_ has quit [Remote host closed the connection]
hahuang61 has quit [Ping timeout: 268 seconds]
sarbs has joined #ruby
<Kimm> Thanks Ox0dea, I get different segfault now https://gist.github.com/anonymous/34c71e7ef6bd385485042319918161fa
sarbs has quit [Max SendQ exceeded]
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
benlovell has joined #ruby
dextertzu has quit [Ping timeout: 244 seconds]
DTZUZU has quit [Ping timeout: 276 seconds]
<Ox0dea> Kimm: `obj` is uninitialized.
<hanmac> Kimm did you maybe forgot to set obj ?
Snowy has quit [Quit: ragequit]
agit0_ has joined #ruby
sarbs has joined #ruby
agit0_ has quit [Read error: Connection reset by peer]
_stu_ has quit [Quit: _stu_]
kith has joined #ruby
MaienM has joined #ruby
dex7 has joined #ruby
<majuscule> How can I use .map(&method:foo), where foo is a method of the objects being mapped over?
<Ox0dea> majuscule: You just say `map(&:foo)`.
kirun has joined #ruby
<majuscule> ahh perfect
<majuscule> thanks!
<Ox0dea> Sure thing.
<Kimm> Intialize obj to what? I followed https://silverhammermba.github.io/emberb/c/ "Send" section
<Ox0dea> Kimm: Anything, really. Top-level method definitions become private instance methods on Object, so you just need to initialize `obj` to *some* Ruby value.
cdg has joined #ruby
DTZUZU has joined #ruby
n008f4g_ has quit [Ping timeout: 264 seconds]
baweaver is now known as baweaver-mobile
cdg has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 244 seconds]
baweaver-mobile is now known as baweaver-home
baweaver-home is now known as baweaver
cdg has joined #ruby
n008f4g_ has joined #ruby
<Kimm> obj=rb_str_new_cstr(""); // this is ok?
baweaver is now known as Ox0deb
<Kimm> I still get the error
Spami_ has quit [Ping timeout: 260 seconds]
<Ox0deb> Ox0dea: I'm one upping you
nando293921 has quit [Remote host closed the connection]
Ox0deb is now known as baweaver
dopamean_ has quit [Ping timeout: 264 seconds]
Spami_ has joined #ruby
andywojo has quit [Ping timeout: 260 seconds]
Snowy has joined #ruby
<Ox0dea> Kimm: That has to happen after ruby_init().
<Kimm> it does
Suntzu has quit [Read error: Connection reset by peer]
LHdez has joined #ruby
ChiefAlexander has quit [Quit: Leaving...]
djbkd has quit [Remote host closed the connection]
<Ox0dea> Works fine here. :/
<Kimm> Wow, thats scary then :)
<Kimm> maybe i compile it wrong
sorbo_ has joined #ruby
alsu has joined #ruby
<Kimm> gcc e.c -o e.out -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0/x86_64-linux -I/home/wh/.rbenv/versions/2.1.6/include/ruby-2.1.0 -L/home/wh/.rbenv/versions/2.1.6/lib/ -lruby-static -lm -pthread -lcrypt -ldl
dn` has quit [Quit: dn`]
<alsu> does this encoding error make sense to anyone? https://gist.github.com/anonymous/1199866ce36dbc4185c74715a80318fe
<hanmac> man i wanted to test it on evalin but it does say: "fatal error: ruby.h: No such file or directory" ;P
<Kimm> -rdynamic
<alsu> ruby seems to accept it as UTF-8, but the JSON serializer can’t handle it
x77686d has quit [Quit: x77686d]
<alsu> YAML does fine, but I need JSON
biberu has quit []
sorbo_ has quit [Ping timeout: 248 seconds]
krz has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
nando293921 has joined #ruby
<Radar> alsu: "\xE0\xA4\xB8".force_encoding('ASCII-8BIT').force_encoding('UTF-8').to_json
<alsu> Radar: yes but why
sigurding has quit [Quit: sigurding]
<Radar> "\xE0\xA4\xB8".to_json
<Radar> Works on my machine
freerobby has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
<Radar> I don't know why you're doing this force_encoding dance at all.
<alsu> Radar: this is burried deep in a nested dictionary, I’d rather not scrub all the values
<Radar> Where did I say anything about scrubbing? It works on my machine
<Radar> please provide an example which does not work
<darix> alsu: it might depend on your locale
<alsu> Radar: "\xE0\xA4\xB8".force_encoding('ASCII-8BIT') is what I’ve got burried in this dictionary. that came from the JSON parser, actually
<alsu> or, maybe the YAML parser. I forget.
Snowy has quit [Quit: ragequit]
rkazak has quit [Ping timeout: 264 seconds]
uglybandersnatch has joined #ruby
adamsilver has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> ok
<Radar> Show me code which I can use to reproduce a valid issue on my machine and then I can take a look
<Radar> until then it's just guessing
pawnbox has quit [Ping timeout: 244 seconds]
dikaio_ has quit [Quit: Textual IRC Client: www.textualapp.com]
freerobby has joined #ruby
cpruitt has quit [Quit: cpruitt]
uglybandersnatch has quit [Ping timeout: 252 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
djbkd has joined #ruby
baweaver has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 1.4]
<smathy> alsu, force_encoding just changes the encoding flag of the string, so "a utf-8 string".force_encoding("anything you like").force_encoding("utf-8") will always be valid, because you've not changed the string, just changed the encoding flag to something else, and then (back) to UTF-8.
djbkd_ has joined #ruby
<alsu> smathy: but the enoding is valid, according to “valid_encoding?”
<alsu> smathy: so why can’t the JSON serializer convert it?
<smathy> alsu, right, because by the time you're calling that, you're calling it on a UTF-8 string.
<majuscule> how can i force a hash to be created from a mapped array? aka, this_should_be_a_hash = [1,2].map do |i| Hash[ a => 1 ] end'
uglybandersnatch has joined #ruby
dopamean_ has joined #ruby
stunder has joined #ruby
<Radar> majuscule: Mind chucking that code up on gist.github.com?
<smathy> alsu, but, eg., if you do this then you'll see your error: "\xE0\xA4\xB8".force_encoding('windows-1252').encode("UTF-8")
jt__ has joined #ruby
<smathy> Sorry, that first encoding should have been ASCII-8BIT
<smathy> alsu, ie. "\xE0\xA4\xB8".force_encoding('ASCII-8BIT').encode("UTF-8")
x77686d has joined #ruby
Snowy has joined #ruby
<alsu> smathy: why is the JSON serializer trying to encode it to UTF-8? why not just write the escaped bytes?
<Radar> majuscule: thank you :)
grill has joined #ruby
<majuscule> i am realizing why that's dumb though :-)
<Radar> >> Hash[[1,2].map { |i| [i,1] }]
<ruby[bot]> Radar: # => {1=>1, 2=>1} (https://eval.in/545902)
<Radar> majuscule: ^
djbkd_ has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 244 seconds]
<majuscule> ooo super cool
<majuscule> thanks!
<djellemah> >> [1,2].map{|i| [i,1]}.to_h
<ruby[bot]> djellemah: # => {1=>1, 2=>1} (https://eval.in/545903)
<Radar> The code makes a 2D array and then Hash#[] converts it into a Hash
<smathy> alsu, you mean just write the backslash x etc.. ? Because \x is a special sequence in a ruby string.
B1n4r10 has quit [Ping timeout: 252 seconds]
<Radar> djellemah: I use Hash#[] because I'm a traditionalist :P
alexherbo2 has quit [Ping timeout: 276 seconds]
<smathy> alsu, I think this character is MEANT to be UTF-8 btw.
<djellemah> Radar: I noticed ;-p
Suntzu has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
<smathy> alsu, the three latin chars don't seem to make much sense to me: स
<alsu> smathy: I mean just write the JSON escape equivalent: \u00E0 etc
<smathy> alsu, vs what it is if treated as UTF-8: स
<Ox0dea> Radar: *Hash.[]
<Radar> Ox0dea: thank you. I am still booting this AM
baweaver has joined #ruby
mjc_ has quit [Quit: Connection closed for inactivity]
dhollinger has quit [Quit: WeeChat 1.4]
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<djellemah> >> Hash[1,2,3,4]
<ruby[bot]> djellemah: # => {1=>2, 3=>4} (https://eval.in/545904)
diegoaguilar has quit [Remote host closed the connection]
Spami_ has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Ping timeout: 276 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sergey_makagon has joined #ruby
LHdez has quit [Ping timeout: 244 seconds]
<Ox0dea> Which I guess is nice?
rodfersou has quit [Quit: leaving]
Spami_ has joined #ruby
dopie has quit [Ping timeout: 260 seconds]
<Ox0dea> >> Hash[[[1,2],[3,4]]] # Better than this monstrousness.
<ruby[bot]> Ox0dea: # => {1=>2, 3=>4} (https://eval.in/545905)
djbkd has quit [Remote host closed the connection]
<eam> >> Hash[*%w{omg a ha sh}]
<ruby[bot]> eam: # => {"omg"=>"a", "ha"=>"sh"} (https://eval.in/545906)
uglybandersnatch has quit [Ping timeout: 252 seconds]
polysics_ has quit [Remote host closed the connection]
drewo has joined #ruby
KensoDev has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
polysics has joined #ruby
bkxd has joined #ruby
yqt has quit [Ping timeout: 244 seconds]
_djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
<djellemah> >> [[1,2],[3,4]].to_h
<ruby[bot]> djellemah: # => {1=>2, 3=>4} (https://eval.in/545907)
<baweaver> &ri Enumerable#to_h
<eam> to_h really oughta process a flat list >=/
abyx has quit [Quit: This computer has gone to sleep]
<djellemah> that's what Hash[] is for, traditionally ;-)
baweaver has quit [Remote host closed the connection]
<eam> weird and unintuitive!
fexilal has quit [Ping timeout: 268 seconds]
_blizzy_ has joined #ruby
mistermo_ has quit [Ping timeout: 268 seconds]
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SCHAAP137 has joined #ruby
polysics has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 276 seconds]
choke has joined #ruby
Mon_Ouie has joined #ruby
Dimik has quit [Ping timeout: 246 seconds]
mistermo_ has joined #ruby
<alsu> Radar: here’s a simple way to express my question: File.binread(‘any.jpeg’).to_json
<alsu> why can’t the json serializer encode binary data without trying to make UTF-8 out of it?
<eam> alsu: because that's how json works
Acontius has quit [Quit: Connection closed for inactivity]
<eam> json must be utf-8
<eam> and yes, that means the json format fundamentally cannot represent some kinds of data in strings
_djbkd has quit [Remote host closed the connection]
<eam> you can uuencode your strings to get around it
<alsu> the *encoded* json must be utf-8. but it has escape sequences for byte values
ldnunes has quit [Quit: Leaving]
<eam> nope, json strings must be valid utf-8
chihhsin has quit [Ping timeout: 260 seconds]
quazimodo has quit [Ping timeout: 246 seconds]
<smathy> OMG, `File.binread(‘any.jpeg’).to_json` is what you were doing?!?!? Talk about a misleading presentation.
<alsu> no, that’s not what I’m doing. but it demonstrates my question
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<alsu> I’m not sure exactly where this ruby dictionary is coming from that it has ASCII-8BIT fields. ultimately, a different JSON encoder from a different language. some part of the ruby JSON parser or the ruby YAML parser decided it must be binary data, not UTF-8
davedev24 has quit [Ping timeout: 248 seconds]
<alsu> and turning it back into JSON is failing, which is absurb. it started as JSON
<smathy> alsu, how long are you planning on going on without showing actual code here?
n008f4g_ has quit [Ping timeout: 248 seconds]
<alsu> smathy: actually code won’t help. I need the original input string, which I don’t have
VeryBewitching has quit [Quit: Konversation terminated!]
diegoaguilar has joined #ruby
diegoaguilar has quit [Max SendQ exceeded]
davedev24 has joined #ruby
<smathy> alsu, no idea what you mean by "decided it must be binary data" - all data is binary.
<alsu> the code is effectively YAML.parse(JSON.parse(input).to_yaml).to_json
blackmesa has joined #ruby
<alsu> smathy: I mean, the YAML encoded version says “binary”, and when parsed it makes an ASCII-8BIT string instead of a UTF-8 string
Azure has joined #ruby
rolha has joined #ruby
<alsu> I don’t know why the YAML serializer thought it was binary. it doesn’t seem to make sense that JSON.parse would return anything as ASCII-8BIT, does it?
sorbo_ has joined #ruby
<smathy> alsu, "says “binary”" sounds like my grandfather explaining how the computer told him he had a virus. Make a gist, show your problem with a small sample of data, demonstrate the issue, explain which method is returning the string "binary", etc.. Then we'll have some hope of helping.
<alsu> smathy: yaml writes the word “binary” when encoding data. are you familiar with yaml?
davee_ has quit [Quit: Leaving]
johnmilton has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
dionysus69 has quit [Ping timeout: 268 seconds]
<shortdudey123> when i install the json rubygem 1.8.3, it installs the extentions to /usr/local but 1.7.3 installed them to /usr... that good? bad? indifferent? its causing problems for me trying to build the rubygems-json rpm
sorbo_ has quit [Ping timeout: 250 seconds]
n008f4g_ has joined #ruby
<shevy> shortdudey123 have a look at "gem env" output, also if you have several different ruby versions and different gem versions, thing can become confusing
dopie has joined #ruby
<smathy> shortdudey123, the gem doesn't decide where to install things, it's related to the location of the ruby you're running gem (or bundle) with.
daivyk has joined #ruby
<shortdudey123> gem env points to /usr, using the sae ruby version (2.0), and 1.7.3 vs 1.8.3
Madplatypus has joined #ruby
bronson has joined #ruby
aupadhye has quit [Quit: Leaving]
djbkd has joined #ruby
<shortdudey123> gem bin is at /usr/bin/gem
Azure has quit [Remote host closed the connection]
<shortdudey123> gem env shows /usr first and /usr/local 2nd
<shortdudey123> however, when doing rpmbuild, gem_extdir_mri is pointing to /usr and not /usr/local
m4dfry has quit [Quit: Page closed]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
sandstrom has joined #ruby
Azure has joined #ruby
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
Azure has quit [Remote host closed the connection]
yfeldblum has joined #ruby
diego2 has joined #ruby
Azure has joined #ruby
Azure has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
Azure has joined #ruby
Azure has quit [Remote host closed the connection]
ocbtec has quit [Quit: leaving]
tvon has joined #ruby
duckpuppy has quit [Ping timeout: 268 seconds]
Azure has joined #ruby
shadoi has quit [Quit: Leaving.]
diegoviola has quit [Ping timeout: 268 seconds]
Azure has quit [Remote host closed the connection]
rmulligan has joined #ruby
Gasher has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
Azure has joined #ruby
<smathy> alsu, no, find out what input is.
JStoker has quit [Ping timeout: 260 seconds]
<alsu> smathy: that could take days
fnux has joined #ruby
axl__ has joined #ruby
uglybandersnatch has joined #ruby
heyimwill has quit [Ping timeout: 260 seconds]
mistermo_ has quit [Ping timeout: 246 seconds]
<smathy> alsu, ok.
axl_ has quit [Ping timeout: 244 seconds]
axl__ is now known as axl_
EvilJStoker has quit [Ping timeout: 260 seconds]
chipotle has quit [Quit: cheerio]
krasnus has quit [Ping timeout: 260 seconds]
mistermo_ has joined #ruby
bahar has joined #ruby
bahar has joined #ruby
solocshaw has quit [Ping timeout: 250 seconds]
EvilJStoker has joined #ruby
rgs_ is now known as rgs
Chunlea has quit [Ping timeout: 264 seconds]
djbkd_ has joined #ruby
darkf has joined #ruby
gix- has joined #ruby
gix has quit [Disconnected by services]
JStoker has joined #ruby
<apeiros> did somebody already tell alsu that json is specified to be utf-8 only?
* apeiros only skimmed the backlog
<alsu> yes, smathy mentioned that.
DoubleMalt has quit [Remote host closed the connection]
<alsu> the JSON parser doesn’t seem to agree with that, though. it’s accepting input it cannot later encode
Aviio has joined #ruby
blackmes1 has joined #ruby
djbkd_ has quit [Ping timeout: 252 seconds]
<apeiros> o0
<apeiros> got an example for that?
Kimm has quit [Ping timeout: 276 seconds]
rubie has quit [Remote host closed the connection]
rubie has joined #ruby
<alsu> apeiros: pasted above, but I’m lacking the original input string. I’ll have to try to catch one in the wild
rehat has joined #ruby
Kimm has joined #ruby
<apeiros> the above is not an example for something JSON.parse accepts but JSON.dump fails on.
<rehat> is there a different gem for SQLite3 or is this the best one?
blackmesa has quit [Ping timeout: 268 seconds]
<alsu> apeiros: it would be if I had the input string
yfeldblum has quit [Remote host closed the connection]
<apeiros> "it would be" = "it is not"
<apeiros> I highly doubt your claim
<alsu> I promise I wouldn’t have come in here asking if it hadn’t occurred
<apeiros> I do believe you that you have a problem
<apeiros> but I also believe that you're misunderstanding what problem you're having
<alsu> the exception is pretty clear, as is the yaml I have a record of
sandstrom has quit [Quit: My computer has gone to sleep.]
stannard has quit [Remote host closed the connection]
<apeiros> because I doubt it is such that you have an input for which JSON.parse(input) succeeds, but JSON.dump(JSON.parse(input)) fails
<alsu> and the only way that yaml gets made is directly from the json parser output
<alsu> maybe the yaml serializer acts funny, I guess.
klka has joined #ruby
krobzaur has quit [Ping timeout: 252 seconds]
<apeiros> what version of ruby and what version of yaml are you using?
blackmes1 has quit [Ping timeout: 244 seconds]
diego2 has quit [Changing host]
diego2 has joined #ruby
diego2 is now known as diegoviola
abyx has joined #ruby
Kimm has quit [Ping timeout: 248 seconds]
<alsu> ruby 2.2.1p85, yaml appears to be provided by psych 2.0.8
<apeiros> and `"\xE0\xA4\xB8".to_yaml` does not give you "--- \"स\"\n"?
<alsu> it does.
jt__ has quit [Remote host closed the connection]
<alsu> but the yaml I have a record of is different. it looks like: "\xE0\xA4\xB8".force_encoding('ASCII-8BIT').to_yaml #=> "--- !binary |-\n 4KS4\n"
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<apeiros> "--- !binary |-\n 4KS4\n" is your precise yaml or are you making it up from parts?
<alsu> that’s a truncated bit. let me find a small but precise sample.
<apeiros> and in https://gist.github.com/anonymous/edacfafeb6d73573d951b28a2551d2c9 - there's truly no steps between JSON.parse(input) and to_yaml?
<alsu> None.
IrishGringo has joined #ruby
patrick_star has quit [Ping timeout: 252 seconds]
patrick_star_2 has joined #ruby
polishdub has quit [Quit: Leaving]
baweaver has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
bronson has joined #ruby
icey has quit [Quit: No Ping reply in 180 seconds.]
Chunlea has joined #ruby
ssiris has joined #ruby
kies has quit [Ping timeout: 260 seconds]
icey has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
<alsu> apeiros: "\xEF\xBF\xBD\x1F"
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CausaMortis has quit [Ping timeout: 246 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<alsu> ruby says it’s utf-8, and that it’s valid. to_yaml makes "--- !binary |-\n 77+9Hw==\n"
Cohedrin has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
<alsu> "\xEF\xBF\xBD\x1F".to_json works, but YAML.load("\xEF\xBF\xBD\x1F".to_yaml).to_json does not
jdawgaz has joined #ruby
polysics has joined #ruby
Cohedrin_ has quit [Read error: Connection reset by peer]
x77686d has quit [Quit: x77686d]
pawnbox has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
rolha_ has joined #ruby
bry4n_ has quit [Ping timeout: 264 seconds]
sorbo_ has joined #ruby
benlieb has joined #ruby
rolha_ has quit [Remote host closed the connection]
rolha has quit [Ping timeout: 244 seconds]
Cohedrin has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
polysics has quit [Ping timeout: 260 seconds]
threh has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
<apeiros> to_yaml iirc choooses binary representation when there's too many non-printable characters (like \u001f)
rubie has quit [Remote host closed the connection]
<apeiros> and the problem is that loading that yaml will cause the encoding to be set to binary, instead of the original utf-8
<apeiros> I'm not sure, but I think that actually qualifies as a bug in yaml.
sorbo_ has quit [Ping timeout: 248 seconds]
quazimodo has joined #ruby
ljames has joined #ruby
<apeiros> >> require "yaml"; "foobar\u001f\u001f".to_yaml # enough printable characters
<ruby[bot]> apeiros: # => "--- \"foobar\\x1F\\x1F\"\n" (https://eval.in/545911)
<apeiros> >> require "yaml"; "foobar\u001f\u001f\u001f".to_yaml # not enough printable characters
<ruby[bot]> apeiros: # => "--- !binary |-\n Zm9vYmFyHx8f\n" (https://eval.in/545912)
<alsu> is there a way to turn that off?
<apeiros> I'd have to read the docs the same as you
<eam> why not just force the encoding to what you want?
baweaver has joined #ruby
Cohedrin_ has joined #ruby
karioleez has quit [Remote host closed the connection]
<alsu> eam: it’s inside a huge nested structure. I’d have to walk the whole thing detecing strings and forcing their encoding
last_staff has quit [Quit: last_staff]
<apeiros> I'd check the yaml repository and see whether somebody else had that issue too
<apeiros> if not, file one
sarbs has quit [Ping timeout: 244 seconds]
Cohedrin_ has quit [Max SendQ exceeded]
nando293921 has quit [Ping timeout: 252 seconds]
Cohedrin_ has joined #ruby
krobzaur has joined #ruby
<alsu> hm. Syck and Psych both do this
damonkelley has joined #ruby
x77686d has joined #ruby
Cohedrin_ has quit [Max SendQ exceeded]
minimalism has joined #ruby
Cohedrin has quit [Ping timeout: 276 seconds]
drewo has quit [Ping timeout: 260 seconds]
Cohedrin has joined #ruby
jrafanie has joined #ruby
stunder has quit [Ping timeout: 260 seconds]
threh has quit [Ping timeout: 268 seconds]
uglybandersnatch has quit [Ping timeout: 260 seconds]
stunder has joined #ruby
GodFather has quit [Ping timeout: 268 seconds]
jrafanie has quit [Client Quit]
duckpuppy has joined #ruby
krasnus has joined #ruby
freerobby has quit [Quit: Leaving.]
al2o3-cr has joined #ruby
ekinmur has joined #ruby
sarbs has joined #ruby
B1n4r10 has joined #ruby
barajasfab has quit [Ping timeout: 240 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
heyimwill has joined #ruby
zenlot has joined #ruby
zenlot6 has quit [Ping timeout: 244 seconds]
duckpuppy has quit [Ping timeout: 250 seconds]
IrishGringo has quit [Ping timeout: 246 seconds]
abyx has joined #ruby
B1n4r10 has quit [Ping timeout: 252 seconds]
blackmes1 has joined #ruby
sarbs has quit [Ping timeout: 276 seconds]
kirun has quit [Quit: Client exiting]
Suntzu has joined #ruby
shinnya has joined #ruby
dvinciguerra_ has joined #ruby
alexherbo2 has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
dvinciguerra has quit [Ping timeout: 252 seconds]
djbkd_ has joined #ruby
sarbs has joined #ruby
sarbs has quit [Max SendQ exceeded]
sarbs has joined #ruby
Regulati_ has joined #ruby
m8 has quit [Quit: Sto andando via]
bkxd has joined #ruby
marxarelli has quit [Quit: Textual IRC Client: www.textualapp.com]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
RegulationD has quit [Ping timeout: 264 seconds]
djbkd_ has quit [Ping timeout: 246 seconds]
Es0teric has joined #ruby
rubie has joined #ruby
dvinciguerra__ has joined #ruby
jt__ has joined #ruby
Es0teric has quit [Client Quit]
bkxd has quit [Ping timeout: 250 seconds]
finisherr has joined #ruby
ChiefAlexander has joined #ruby
dvinciguerra_ has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
jdawgaz has joined #ruby
tubuliferous_ has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
rubie has quit [Remote host closed the connection]
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
rubie has joined #ruby
Es0teric has joined #ruby
Es0teric has quit [Max SendQ exceeded]
mistermocha has quit [Remote host closed the connection]
P4Titan has joined #ruby
blackgoat has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
solocshaw has joined #ruby
<P4Titan> Hello all. I have this code; how could I condense/write it better? http://pastie.org/10781278
jdawgaz has quit [Client Quit]
<Ox0dea> P4Titan: %w[- network friends].index(share_type).to_i
<Ox0dea> But probably don't.
<P4Titan> so
drewo has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord_ has joined #ruby
<alsu> bugs filed. apeiros, smathy, Radar: thanks for your help
baweaver has quit [Remote host closed the connection]
alsu has left #ruby [#ruby]
GitGud has joined #ruby
mistermocha has joined #ruby
<al2o3-cr> so simple, just like an italian mama
Yiota has joined #ruby
<shevy> lol
ramfjord has quit [Ping timeout: 250 seconds]
<smathy> P4Titan, looks like an enum to me.
<P4Titan> smathy: but I want to replace the contents in link_info
<P4Titan> and even if I were to substitute the constants w/ an enum, it would still be clunky
misterm__ has joined #ruby
<Radar> Are you saving this number to a database
<P4Titan> yep
<Radar> WTB question marks I have run out
<smathy> P4Titan, no idea what constants you're talking about.
<Radar> Why are you saving the number and not the string? Do you want to on-purpose confuse future developers?
<P4Titan> 1, 2, 0
mistermocha has quit [Read error: Connection reset by peer]
uglybandersnatch has joined #ruby
<Radar> and you'll have a whole heap of link_info[:share_type] == 1 type code in your codebase too, which is just smellllllly
<Radar> Source: done a ton of code reviews on apps that do exactly this and my god what dumpster fires.
<P4Titan> Radar: ok, I'll replace the bare numbers w/ an enum
d0nn1e has quit [Ping timeout: 244 seconds]
jdawgaz has joined #ruby
<P4Titan> but why should I contain the entire string when I only need some representation of it
<P4Titan> the string bears on more meaning that an enum
<P4Titan> yet is bigger, slower, etc.
<smathy> Bigger?!?!
<P4Titan> I simply wish to condense my case statement to something more elegant/clever
* Radar is boggling over here
krz has joined #ruby
<Radar> P4Titan: I have a tip for condensing it: don't write a case statement when you don't need one.
<Radar> P4Titan: 0 lines of code, 0 bugs.
<Radar> Store the string in the DB
<P4Titan> Tho may u give me a reason as to why?
<Radar> [10:12:22] <Radar>Source: done a ton of code reviews on apps that do exactly this and my god what dumpster fires.
<smathy> What do you think we're writing here? The head move routines for a hard drive?
<Radar> You will make life hard for future-you and future-other-people.
Dimik has joined #ruby
d0nn1e has joined #ruby
<Radar> You need to make it EXPLICIT in your codebase that when the share_type is "network" it really means "network"
<smathy> P4Titan, your reason, "bigger, slower" is absurd - that's our reason for picking the option that is easier to implement and understand.
<Radar> becuase nobody knows that 1 == "network" unless they've really looked hard into the problem before.
spider-mario has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
rbennacer has quit [Remote host closed the connection]
<shevy> he wants a tiny database!
Snowy has quit [Remote host closed the connection]
<P4Titan> I just feel that the marginal benefit of a more readable database doesn't convince me
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
jackjackdripper has quit [Ping timeout: 244 seconds]
<Radar> P4Titan: A smaller database doesn't convince me.
jackjackdripper has joined #ruby
<P4Titan> I will see if I can store enums in an Active Records databse
<Radar> oh wow you get a 0.0000000001 optimisation
<Radar> amazing
KensoDev has joined #ruby
Balzrael has quit [Remote host closed the connection]
<P4Titan> Radar: I fear your sarcasm does not impact *my* project. Moreover, I simply wish to learn some Ruby posing an interesting question which surely can be simplied in some clever manner, tickling ur inner rubyist brains.
<Radar> ok, glhf bye
<smathy> P4Titan, comprehensible, explicit values are not a marginal benefit, but no one's going to stop you, but we're the wrong people to ask for opinions on shitty workarounds to bad choices.
uglybandersnatch has quit [Ping timeout: 252 seconds]
<smathy> P4Titan, and while you're at it, you should definitely switch away from ruby if the slowness of using strings bothers you.
jackjackdripper has quit [Client Quit]
jackjackdripper has joined #ruby
<P4Titan> I would say that my general mentaility (for this project at least) is: if it can be better, why not make it better.
<P4Titan> Anyway, I appreciate your input and will take it into future consideration.
Cohedrin_ has joined #ruby
Cohedrin has quit [Ping timeout: 244 seconds]
Ormm has joined #ruby
FooMunki has quit [Quit: FooMunki]
astrobun_ has quit [Read error: Connection reset by peer]
vikaton has quit [Quit: Connection closed for inactivity]
early90spants has joined #ruby
GodFather has joined #ruby
pawnbox has joined #ruby
astrobunny has joined #ruby
saneax_AFK is now known as saneax
ChiefAlexander has quit [Quit: Leaving...]
yosafbridge has quit [K-Lined]
Yiota has joined #ruby
uglybandersnatch has joined #ruby
QualityAddict has quit [Quit: Konversation terminated!]
baweaver has joined #ruby
<rehat> so lost, I am reading a file of words into an array but for some reason I can't find the index of a string that is in the array. '==' doesn't seem to work
<havenwood> >> %w[a b c d].index 'c'
<Ox0dea> rehat: You... shouldn't need `==`?
<ruby[bot]> havenwood: # => 2 (https://eval.in/545924)
CloCkWeRX has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
<rehat> I tried just array_var.index("bat") but that returned nothing
<Canar> watching you ruby pros answer newbie questions has honestly advanced my ruby understanding so much... i haven't ever joined an irc channel that improved my understanding quite so much
pawnbox has quit [Ping timeout: 276 seconds]
<havenwood> rehat: Then you're batless.
<Ox0dea> rehat: Needs more bat.
<havenwood> Canar: :D
<Ox0dea> Or else you forgot to #chomp your lines.
<havenwood> rehat: Check: array_var.grep /bat/
klka has quit []
<havenwood> rehat: Or just sanity check: p array_var
<dostoyevsky> hmmmm... there is no unicode symbol for batman... how are you supposed to call him when you need him?
<dostoyevsky> with a jpg?
<rehat> do I need to do anything special with strings read from a file? I printed out the .class and is say String and there are no '\n' or '\r' in the puts. I made another array and hard coded the strings and index("bat") worked
DLSteve has joined #ruby
finisherr has left #ruby [#ruby]
<Canar> dostoyevsky: .svg so you don't get artefacting from scaling the symbol up to be 2 miles wide
mdelgadonyc has left #ruby ["Leaving"]
<baweaver> files have newlines
<Ox0dea> rehat: `puts` will conceal line endings from you; use `p` for debug printing.
<baweaver> &ri String#chomp
<rehat> ugh I found my problem, I'm a tard. I did gsub("\n", ' ') and it added a space to the end
Inside has joined #ruby
Inside has joined #ruby
<Ox0dea> Ew, why?
<baweaver> use chomp instead
<Ox0dea> Use #split with no arguments.
yosafbridge has joined #ruby
<Ox0dea> >> "foo \s\t\n bar \s\t\n baz".split
<ruby[bot]> Ox0dea: # => ["foo", "bar", "baz"] (https://eval.in/545936)
n_blownapart has joined #ruby
<rehat> baweaver: ahh chomp is nicer thanks
<baweaver> see Ox0dea's post above
<al2o3-cr> it's like leaving candy around a child, they gonna chomp, chomp, chomp
yfeldblum has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Inside has quit [Disconnected by services]
Inside_ has joined #ruby
pwnd_nsfw has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
Aviio has quit [Remote host closed the connection]
<al2o3-cr> shit, did i say candy i meant chips
krz has quit [Read error: Connection reset by peer]
<baweaver> This took a dark turn O_o
krz has joined #ruby
<al2o3-cr> not if you do em' at 180c
damonkelley has quit [Quit: WeeChat 0.4.2]
n_blownapart has quit []
chouhoul_ has quit [Remote host closed the connection]
<baweaver> aaand new topic
<al2o3-cr> hows ya father?
tomchapin has joined #ruby
Regulati_ has quit [Remote host closed the connection]
wethu has joined #ruby
ur5us has quit [Remote host closed the connection]
FooMunki has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
diegoaguilar has joined #ruby
vikaton has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]