havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
shadoi has quit [Quit: Leaving.]
atomical_ has joined #ruby
hxegon has quit [Read error: Connection reset by peer]
tubuliferous_ has quit [Ping timeout: 240 seconds]
nerfando has joined #ruby
atomical has quit [Ping timeout: 240 seconds]
nerfando has quit [Client Quit]
casadei has joined #ruby
kalopsian has joined #ruby
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Tref has joined #ruby
janmuffino has joined #ruby
janmuffino has quit [Max SendQ exceeded]
spider-mario has quit [Remote host closed the connection]
janmuffino has joined #ruby
hxegon has joined #ruby
janmuffino has quit [Max SendQ exceeded]
tectonic has joined #ruby
PlasmaStar has joined #ruby
baweaver has quit [Remote host closed the connection]
danieli has quit [Ping timeout: 240 seconds]
choke has quit [Ping timeout: 256 seconds]
casadei has quit [Ping timeout: 260 seconds]
weemsledeux has joined #ruby
DEA7TH has joined #ruby
ferr has joined #ruby
shadoi has joined #ruby
chipotle has quit [Quit: cheerio]
chouhoul_ has quit [Remote host closed the connection]
houhoulis has joined #ruby
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
sandstrom has quit [Quit: My computer has gone to sleep.]
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
Sucks has quit [Remote host closed the connection]
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
Sucks has joined #ruby
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
Makorak has joined #ruby
sandstrom has joined #ruby
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
danieli has joined #ruby
danieli has quit [Max SendQ exceeded]
SCHAAP137 has quit [Remote host closed the connection]
Blaguvest has quit [Remote host closed the connection]
chimche has quit [Quit: Leaving.]
SHyx0rmZ has quit [Read error: Connection reset by peer]
joelroa has joined #ruby
Makorak has quit [Ping timeout: 272 seconds]
<thatsmrmetalhead> removed ruby `1.9.3, took 2.3.0 with it apparently. Reinstalled 2.3.0 and now get 'no such file or directory' for ruby
chipotle has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
<Ox0dea> Learn Python instead.
symm- has quit [Quit: Leaving...]
<thatsmrmetalhead> ok, it's installed in /usr/local/lib/ruby/2.3.0/ - how do I make it point there?
last_staff has quit [Quit: last_staff]
symm- has joined #ruby
<Ox0dea> lib != bin
<havenwood> thatsmrmetalhead: What do you get for `echo $PATH` and `which -a ruby` then?
<thatsmrmetalhead> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
<thatsmrmetalhead> /usr/local/bin/ruby
<havenwood> thatsmrmetalhead: Sounds good.
<thatsmrmetalhead> respectively
<havenwood> thatsmrmetalhead: And?: ruby -v
<thatsmrmetalhead> now it's working...wtf?
<havenwood> thatsmrmetalhead: Install your gems and carry on!
<thatsmrmetalhead> thank you man.
<Ox0dea> thatsmrmetalhead: You got "No such file or directory" from an argument you passed to `ruby`.
<thatsmrmetalhead> does echo $path update it?
northfurr has joined #ruby
symm- has quit [Client Quit]
speaking1ode has joined #ruby
Guest88361 has joined #ruby
<havenwood> thatsmrmetalhead: No, it just prints the env var. Alternatively you could print it with: printenv PATH
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
QpQ4 has joined #ruby
<thatsmrmetalhead> alright... so, had two tabs open in terminal, one where I was installing ruby and one where I was resting in the directory I was trying to work in
<thatsmrmetalhead> first tab didn't update... did not know that could happen
<havenwood> thatsmrmetalhead: Turn it off and turn it back on again.
Vertroa has joined #ruby
AccordLTN has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
AccordLTN has quit [Client Quit]
j_mcnally has joined #ruby
yalcin has joined #ruby
nerfando has joined #ruby
sandstrom has joined #ruby
thatsmrmetalhead has quit [Ping timeout: 240 seconds]
nerfando has quit [Client Quit]
yalcin has quit [Client Quit]
thatsmrmetalhead has joined #ruby
akem has joined #ruby
pdoherty has joined #ruby
binaryplease1 has joined #ruby
binaryplease1 has quit [Client Quit]
joelroa has quit [Quit: Textual IRC Client: www.textualapp.com]
atomical has joined #ruby
binaryplease has quit [Ping timeout: 276 seconds]
Thomas-0725 has joined #ruby
tectonic has quit []
duckpupp1 has joined #ruby
atomical_ has quit [Ping timeout: 250 seconds]
ympeg has quit [Remote host closed the connection]
hannelita has quit [Remote host closed the connection]
grassass has joined #ruby
pawnbox has joined #ruby
edwinvdgraaf has joined #ruby
symm- has joined #ruby
Thomas-0725 has quit [Client Quit]
sftrabbit has quit [Quit: sftrabbit]
duckpupp1 has quit [Ping timeout: 245 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
Guest88361 has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
devbug has joined #ruby
Thomas-0725 has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
frog0909 has joined #ruby
sandstrom has joined #ruby
Thomas-0725 has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chimche has joined #ruby
cassioscabral has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
nettoweb has quit [Client Quit]
mistermocha has joined #ruby
LMity has joined #ruby
weemsledeux has joined #ruby
dfockler has quit [Quit: Leaving]
Tref has quit [Quit: tref]
frog0909_ has joined #ruby
Limix has quit [Quit: Limix]
Tref has joined #ruby
jbrhbr has joined #ruby
frog0909 has quit [Ping timeout: 260 seconds]
scoot has joined #ruby
mistermocha has quit [Ping timeout: 256 seconds]
yengas has joined #ruby
QpQ4 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hxegon is now known as hxegon_AFK
Thomas-0725 has joined #ruby
Darmani has quit [Ping timeout: 252 seconds]
LMity has quit [Ping timeout: 260 seconds]
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Thomas-0725 has quit [Client Quit]
chipotle has quit [Quit: cheerio]
sandstrom has quit [Quit: My computer has gone to sleep.]
howdoicomputer has joined #ruby
sandstrom has joined #ruby
Thomas-0725 has joined #ruby
psyq has quit [Quit: Conversation terminated]
akkad has quit [Excess Flood]
Vertroa has joined #ruby
aadam21_ has joined #ruby
casadei has joined #ruby
northfurr has quit [Quit: northfurr]
aadam21 has quit [Ping timeout: 276 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
Thomas-0725 has quit [Client Quit]
Vertroa has quit [Client Quit]
shadoi has quit [Quit: Leaving.]
QpQ4 has joined #ruby
SHyx0rmZ has joined #ruby
chouhoulis has joined #ruby
bihi has joined #ruby
janebootydoe has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 250 seconds]
akkad has joined #ruby
ekinmur has joined #ruby
Makorak has joined #ruby
CorySimmons has joined #ruby
chouhoulis has quit [Ping timeout: 245 seconds]
Rodya_ has quit [Quit: Leaving...]
bihi has quit [Ping timeout: 240 seconds]
Makorak_ has joined #ruby
bruce_lee has joined #ruby
Makorak has quit [Read error: Connection reset by peer]
Makorak_ has quit [Read error: Connection reset by peer]
Makorak has joined #ruby
chimche has quit [Quit: Leaving.]
northfurr has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
blackmes1 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
tectonic has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sandstrom has joined #ruby
dmr8 has quit [Quit: Leaving]
volty has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
arescorpio has joined #ruby
pwnd_nsfw has quit [Quit: Leaving]
kalopsian has joined #ruby
Thomas-0725 has joined #ruby
praveen has joined #ruby
Thomas-0725 has quit [Client Quit]
yengas has quit [Ping timeout: 260 seconds]
pwnd_nsfw has joined #ruby
tectonic has quit []
praveen has quit [Ping timeout: 260 seconds]
dopie has quit [Quit: Lost terminal]
n00bdev has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
dopie has joined #ruby
hannelita has joined #ruby
sandstrom has joined #ruby
tectonic has joined #ruby
gusTester has joined #ruby
Tref has quit [Quit: tref]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cmolenda_ has quit [Remote host closed the connection]
armyriad has joined #ruby
CorySimmons has quit [Quit: Bye!]
Makorak_ has joined #ruby
gusTester has left #ruby [#ruby]
jbrhbr has quit [Quit: Leaving.]
dlitvak has joined #ruby
caffeinic has joined #ruby
Makorak has quit [Ping timeout: 260 seconds]
Tref has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Ping timeout: 250 seconds]
n00bdev has quit []
mistermocha has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
chimche has joined #ruby
Thomas-0725 has joined #ruby
krz has joined #ruby
QpQ4 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
armyriad has quit [Ping timeout: 256 seconds]
caffeinic has quit [Remote host closed the connection]
sandstrom has joined #ruby
kalopsian has quit [Ping timeout: 260 seconds]
tectonic has quit []
iateadonut has joined #ruby
cassioscabral has joined #ruby
caffeinic has joined #ruby
akem has quit [Remote host closed the connection]
fourq is now known as fourq|away
armyriad has joined #ruby
baweaver has joined #ruby
perturbation has joined #ruby
fourq|away is now known as fourq
fourq is now known as fourq|away
fourq|away is now known as fourq
fourq is now known as fourq|away
tectonic has joined #ruby
fourq|away is now known as fourq
krz has quit [Ping timeout: 246 seconds]
mistermocha has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 240 seconds]
caffeinic has quit [Ping timeout: 246 seconds]
Bloomer has joined #ruby
akkad has quit [Excess Flood]
chouhoulis has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sandstrom has quit [Quit: My computer has gone to sleep.]
dorei has quit []
weemsledeux has joined #ruby
devbug has joined #ruby
hannelita has quit [Remote host closed the connection]
krz has joined #ruby
sandstrom has joined #ruby
ferr has quit [Ping timeout: 246 seconds]
akkad has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
markfletcher has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
_djbkd has quit [Quit: My people need me...]
yeticry has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
r0_0 has joined #ruby
<r0_0> wus up room, does anyone use nokogiri?
caffeinic has joined #ruby
weemsledeux has quit [Client Quit]
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r0_0> im having hella problems and went through all the documentation and also tried to use an older version of nokogirir (1.6.1)
Vertroa has joined #ruby
nwhirschfeld has joined #ruby
Vertroa has quit [Client Quit]
JuanS has joined #ruby
esauOp has quit []
<apeiros> r0_0: if you actually describe your problem, there's some chance somebody might be able to help.
kalopsian has joined #ruby
<Ox0dea> Nonsense.
<apeiros> :<
<r0_0> im using fedora 23 and tried to install the gem nokogiri and I always seem to get a runtime error
<r0_0> i tried -v 1.6.1 -- --use-system-libraries
<Cohedrin> what error
El3ktra has joined #ruby
El3ktra has quit [Changing host]
El3ktra has joined #ruby
<r0_0> checking for libxml/parser.h... *** extconf.rb failed ***
<Cohedrin> can you put the whole stack trace in something like pastie
<r0_0> but I have libxml
<Cohedrin> its hard for us to debug with select lines you're cping lol
<volty> probably you have to install libxml dev
Makorak_ has quit [Remote host closed the connection]
<Ox0dea> Make that libxml-devel, but yeah.
edwinvdgraaf has joined #ruby
<volty> try locate parser.h | grep libxml
<r0_0> Cohedrin: lol I know it, worry just frustrated cause I have through alot of stack overflow and nothing was working
sandstrom has quit [Quit: My computer has gone to sleep.]
<volty> no way, on one side you say you can't make it (compile), and on another you say you get runtime (stack) errors
<Ox0dea> r0_0: libxml-devel
blackmes1 has quit [Ping timeout: 250 seconds]
<volty> the only case where nokogiri does not work - as far as I know - is together with qtbindings
sandstrom has joined #ruby
<volty> s/is/is when/
edwinvdgraaf has quit [Ping timeout: 246 seconds]
<r0_0> removed libxml and installed libxml-devel and get a different error, going to post it in pastebin
<volty> you have to have both of them
<volty> do not paste till you have installed both
<Ox0dea> And then maybe there'll be nothing to paste.
freerobby has quit [Quit: Leaving.]
thatsmrmetalhead has quit [Ping timeout: 250 seconds]
<r0_0> installed both
<ruboto_> r0_0, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<r0_0> my apologies will go to gist
craysiii has quit [Read error: Connection reset by peer]
craysiii has joined #ruby
craysiii has quit [Max SendQ exceeded]
kalopsian has quit [Ping timeout: 264 seconds]
craysiii has joined #ruby
duckpupp1 has joined #ruby
<havenwood> r0_0: have you installed the ruby-devel package? it seems: You have to install development tools first.
<r0_0> yup I installed ruby-devel
<r0_0> maybe a re-install?
xet7 has quit [Ping timeout: 246 seconds]
<volty> all the same — coming from time to time with 'strange' problems :)
duckpupp1 has quit [Ping timeout: 240 seconds]
kies^ has joined #ruby
<volty> maybe an egg-breaking? :)
<volty> ops, re-egg-breaking
ruby13 has joined #ruby
<r0_0> damn re-installed still same error
<havenwood> r0_0: Have gcc installed I assume?
crdpink has joined #ruby
<r0_0> yuppers
crdpink2 has quit [Ping timeout: 240 seconds]
<r0_0> gcc 5.3
sandstrom has quit [Quit: My computer has gone to sleep.]
<havenwood> checking for libxml/parser.h... *** extconf.rb failed ***
smactive has quit [Remote host closed the connection]
<havenwood> r0_0: libxml2-dev
sandstrom has joined #ruby
Keltia has quit [Read error: Connection reset by peer]
<havenwood> r0_0: then zlib-devel and libxslt-dev are the only other beyond gcc and ruby-devel which we've already confirmed :)
Keltia has joined #ruby
<volty> havenwood: any idea why I had nokogiri without libxml2-dev installed ?
Rickmasta has quit [Ping timeout: 272 seconds]
YankNYC has quit [Quit: Connection closed for inactivity]
<havenwood> volty: Nokogiri ships its own bundled libs or you can use system. I don't recall details offhand.
TheHodge has quit [Quit: Connection closed for inactivity]
<volty> havenwood: ok, thx
<havenwood> volty: gem install nokogiri -- --use-system-libraries
ruby13 has quit [Quit: Bye]
<r0_0> ok looks like i was missing libxls-devel, trying again
<r0_0> damn
<havenwood> r0_0: Same error?
<volty> havenwood: I'll put this one in my notes — could be precious (will try to use it both ways, because with qt just crashes )
smactive has joined #ruby
<r0_0> yup lol
markfletcher has quit [Quit: markfletcher]
<r0_0> Ill try to use system libs
<havenwood> r0_0: libxml2 installed? try with --use-system libraries ^, aye
<r0_0> yup I have libxml2 and zlib
janebootydoe has joined #ruby
<r0_0> shitzu lol
<r0_0> same error
<havenwood> r0_0: libxml2 libxml2-devel libxslt libxslt-devel
A124 has quit [Read error: Connection reset by peer]
Thomas-0725 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Melpaws has quit [Quit: Leaving.]
casadei has quit [Ping timeout: 264 seconds]
casadei has joined #ruby
<r0_0> yup it looks like I gotem all like ash ketchum
QpQ4 has joined #ruby
A124 has joined #ruby
<havenwood> r0_0: sudo dnf install -y rubygem-nokogiri
<havenwood> r0_0: :P
<r0_0> lol
Vertroa has joined #ruby
<havenwood> r0_0: dnf group install "C Development Tools and Libraries"
<r0_0> doing the group install now
<r0_0> thanks for all the help by the way
<havenwood> That's a nice thing about Oga... It builds! https://github.com/YorickPeterse/oga#readme
<havenwood> r0_0: no prob
howdoicomputer has joined #ruby
vikaton has quit [Quit: Connection closed for inactivity]
paradisaeidae has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0.4/20160105164030]]
sandstrom has quit [Quit: My computer has gone to sleep.]
Limix has joined #ruby
<r0_0> havenwood: damn still a no go
<havenwood> r0_0: eek
Limix has quit [Client Quit]
freerobby has joined #ruby
<r0_0> well I might have to fight this another day lol
<havenwood> r0_0: what does the mkmf.log say?
kalopsian has joined #ruby
j_mcnally has joined #ruby
sandstrom has joined #ruby
<r0_0> havenwood: tried to do a locate on the it and can't find it lol
<havenwood> r0_0: Not? /usr/share/ruby/mkmf.rb
yqt has quit [Quit: KVIrc 4.0.4 Insomnia http://www.kvirc.net/]
<havenwood> hrm
howdoicomputer has quit [Ping timeout: 265 seconds]
Darmani has joined #ruby
<havenwood> oh, the log, right
<havenwood> >.>
<Darmani> Heyy kids<33
chipotle has joined #ruby
Makorak has joined #ruby
<r0_0> lol
<havenwood> r0_0: I'd swear they started printing the location of the log in the output and that wasn't just wishful thinking.
northfurr has joined #ruby
chouhoulis has joined #ruby
duckpupp1 has joined #ruby
preyalone has joined #ruby
hannelita has joined #ruby
TheNet has joined #ruby
TheNet has quit [Client Quit]
howdoi has joined #ruby
<Darmani> lmao mini earthquake just happened in SoCal.
<Darmani> One of the many benefits of living here
* Darmani sighs
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r0_0> Darmani: that sux
chouhoulis has quit [Ping timeout: 246 seconds]
<havenwood> r0_0: just a tiny shimmy, no worries!
<Darmani> @r0_0 it's great.
duckpupp1 has quit [Ping timeout: 246 seconds]
<Darmani> @havenwood - Did you feel that too? wtff.
praveen has joined #ruby
<Darmani> I'm sitting here trying to relax, watching some Netflix but the earth was like fuck that you're falling asleep. Wake up. Lol
<havenwood> Darmani: i always think somebody is banging on my wall
<havenwood> Darmani: it's startling
<r0_0> haha she angry
<Darmani> @havenwood lmao
volty has quit [Quit: Konversation terminated!]
hannelita has quit [Ping timeout: 255 seconds]
<havenwood> Darmani: I've yelled at the earthquake to stop it. And it id.
<havenwood> Happenstance.
stannard has joined #ruby
<havenwood> Before I realized what it was, of course.
<r0_0> havenwood: hey thanks for the help, going to fight this tommorrow, much appreciated
Melpaws has joined #ruby
UtkarshRay has joined #ruby
<havenwood> r0_0: Good luck!
r0_0 has left #ruby [#ruby]
sandstrom has quit [Quit: My computer has gone to sleep.]
praveen has quit [Ping timeout: 256 seconds]
tomdp has joined #ruby
sandstrom has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
stannard has quit [Ping timeout: 255 seconds]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aspire has joined #ruby
weemsledeux has joined #ruby
caffeinic has quit [Ping timeout: 246 seconds]
j_mcnall_ has joined #ruby
j_mcnally has quit [Ping timeout: 260 seconds]
<Darmani> @havenwood - Lmao that's the best course of action.
djbkd has quit [Remote host closed the connection]
<Darmani> @havenwood - So those homeless people on the street who are always yelling at the wall are actually keeping the earthquake from getting us
<Darmani> @havenwood - god bless their service. Lol
davedev24 has quit []
northfurr has quit [Quit: northfurr]
caffeinic has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
northfurr has joined #ruby
tuelz has quit [Ping timeout: 272 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
djbkd has joined #ruby
sandstrom has joined #ruby
chimche has quit [Quit: Leaving.]
Rodya_ has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<Ox0dea> May His Noodly Appendage touch them when they need it most.
KineticX has joined #ruby
<havenwood>
Rickmasta has joined #ruby
flughafen has quit [Ping timeout: 240 seconds]
framling has quit [Remote host closed the connection]
<Ox0dea> Ramen.
kalopsian has quit [Ping timeout: 246 seconds]
framling has joined #ruby
dlitvak has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
usershell has joined #ruby
chipotle has quit [Quit: cheerio]
AlphaAtom has quit [Quit: Textual IRC Client: www.textualapp.com]
citrusfizz has quit [Remote host closed the connection]
Tref has quit [Quit: tref]
dlitvak has quit [Remote host closed the connection]
Tref has joined #ruby
flughafen has joined #ruby
kp666 has joined #ruby
kalopsian has joined #ruby
gix has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
mfb2 has joined #ruby
mistermocha has joined #ruby
dcunit3d has joined #ruby
gix has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
aadam21_ has quit [Remote host closed the connection]
aadam21 has joined #ruby
colegatron has quit [Ping timeout: 264 seconds]
okbutwhy has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
pawnbox has quit [Remote host closed the connection]
baweaver has joined #ruby
pawnbox has joined #ruby
QpQ4 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aadam21 has quit [Ping timeout: 276 seconds]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mfb2 has quit [Remote host closed the connection]
defendguin has quit [Ping timeout: 276 seconds]
armyriad has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 260 seconds]
mfb2 has joined #ruby
QpQ4 has joined #ruby
krz has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
krz has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
hannelita has joined #ruby
hahuang61 has quit [Quit: WeeChat 1.3]
praveen has joined #ruby
dlitvak has joined #ruby
colegatron has joined #ruby
scoot has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
baweaver has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
mistermocha has quit [Remote host closed the connection]
Xiti` has joined #ruby
hahuang65 has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
praveen has quit [Ping timeout: 256 seconds]
sandstrom has joined #ruby
edwinvdgraaf has quit [Ping timeout: 250 seconds]
Xiti has quit [Ping timeout: 260 seconds]
northfurr has quit [Quit: northfurr]
northfurr has joined #ruby
northfurr has quit [Client Quit]
morfin has quit [Ping timeout: 265 seconds]
kalopsian has quit [Ping timeout: 245 seconds]
northfurr has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
casadei has quit [Remote host closed the connection]
c355e3b has quit [Quit: Connection closed for inactivity]
northfurr has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
chipotle has joined #ruby
JohnT has joined #ruby
nerium has quit [Quit: nerium]
dacresni has joined #ruby
<dacresni> hay
dapz has joined #ruby
dapz has left #ruby [#ruby]
<havenwood> dacresni: hi
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Makorak has quit [Remote host closed the connection]
<dacresni> oh hi
<dacresni> someone's here
freerobby has quit [Quit: Leaving.]
<dacresni> I'm trying to serve a github page from my own server
<dacresni> so i can serve branches other than master
<dacresni> are you familear with that
frog0909_ has quit [Ping timeout: 276 seconds]
<dacresni> ?
cpup has quit [Ping timeout: 272 seconds]
Rodya_ has quit [Quit: Leaving...]
sandstrom has quit [Quit: My computer has gone to sleep.]
makenoise has joined #ruby
mdih has joined #ruby
<havenwood> dacresni: i've used Jekyll a bit but I don't know what's breaking on your other branches
sandstrom has joined #ruby
cpup has joined #ruby
<dacresni> well the point is for testing
frog0909 has joined #ruby
<dacresni> but i just want to serve without using Bundle exec jekyll serve
<dacresni> I'm going to serve it with caddy, the go webserver
<dacresni> rahter, the webserver, written in go
<dacresni> so i would like for root to be able to execute it from the commandline
arescorpio has quit [Remote host closed the connection]
Tref has quit [Ping timeout: 240 seconds]
Tref has joined #ruby
okbutwhy has joined #ruby
pawnbox has quit [Ping timeout: 245 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
northfurr has joined #ruby
j_mcnall_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
Tref has quit [Quit: tref]
pawnbox has joined #ruby
makenois_ has joined #ruby
makenoise has quit [Ping timeout: 240 seconds]
praveen has joined #ruby
<dacresni> well havenwood thanks anyway
<dacresni> gtgg
dacresni has left #ruby [#ruby]
chipotle has quit [Quit: cheerio]
kalopsian has joined #ruby
janebootydoe has quit [Ping timeout: 246 seconds]
radgeRayden has quit [Ping timeout: 265 seconds]
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
cassioscabral has quit [Quit: cassioscabral]
dlitvak_ has joined #ruby
sandstrom has joined #ruby
gix has quit [Ping timeout: 245 seconds]
Vertroa has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
rkazak has quit [Quit: Sleep.....ing....]
gix has joined #ruby
djbkd has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 256 seconds]
aspire has quit [Quit: Leaving]
aadam21 has joined #ruby
perturbation has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
howdoicomputer has joined #ruby
krz has quit [Ping timeout: 256 seconds]
<pontiki> hi
<havenwood> hi
northfurr has quit [Quit: northfurr]
Tempesta has quit [Quit: See ya!]
frog0909_ has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
<Ox0dea> hi
<pontiki> and i got nothing
djbkd has quit [Remote host closed the connection]
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
djbkd has joined #ruby
frog0909 has quit [Ping timeout: 240 seconds]
simi has quit [Ping timeout: 265 seconds]
praveen has quit [Remote host closed the connection]
praveen has joined #ruby
mfb2 has quit [Remote host closed the connection]
chouhoulis has joined #ruby
kalopsian has quit [Ping timeout: 264 seconds]
hannelita has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dlitvak_ has quit [Remote host closed the connection]
smactive has quit [Remote host closed the connection]
ziprar has joined #ruby
ziprar has quit [Max SendQ exceeded]
chouhoulis has quit [Ping timeout: 265 seconds]
hannelita has quit [Ping timeout: 264 seconds]
praveen has quit [Remote host closed the connection]
n00bdev has joined #ruby
kalopsian has joined #ruby
zipace has quit [Ping timeout: 250 seconds]
tectonic has quit []
okbutwhy has joined #ruby
<shevy> :)
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
northfurr has joined #ruby
krz has joined #ruby
tuelz has joined #ruby
sandstrom has quit [Read error: Connection reset by peer]
aadam21 has quit [Ping timeout: 276 seconds]
justmytwospence has joined #ruby
sandstrom has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
<justmytwospence> hey, total ruby noobie here. I'd like to write a rake task that runs two processes simultaneously (one for livereload and one to regenerate static blog files). Is this possible?
tuelz has quit [Ping timeout: 264 seconds]
okbutwhy has joined #ruby
morfin has joined #ruby
sandstrom has quit [Client Quit]
argentdrake has joined #ruby
<Ox0dea> justmytwospence: "Processes" in the Linux sense?
darkf has joined #ruby
<pontiki> are you using jekyll?
sandstrom has joined #ruby
<pontiki> ¯\_(ツ)_/¯
houhoulis has quit [Remote host closed the connection]
cmolenda has joined #ruby
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
Darmani has quit [Ping timeout: 252 seconds]
AlphaAtom has quit [Client Quit]
<pontiki> justmytwospence: knock-knock
<justmytwospence> pontiki: yep
<pontiki> using guard-livereload?
<justmytwospence> I'm trying to simplify a workflow that includes `bundle exec guard` and `jekyll build --watch` together
<pontiki> instead of a rake task, better to use foreman
<justmytwospence> ooh didn't know about foreman
<justmytwospence> looks like just the thing
<pontiki> but with jekyll 3, even better than that, is put your jekyll build with incremental building inside the guardfile itself
<pontiki> without specifying the --watch option on the jekyll build
<justmytwospence> do you have any examples of such a configuration
<pontiki> nah, i just thought of it
<pontiki> i've been running a gulp setup for mine
elnur has joined #ruby
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
okbutwhy has joined #ruby
<justmytwospence> thanks pontiki, I've got several options to look into now
mistermocha has joined #ruby
ur5us has quit [Remote host closed the connection]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki> i'm not saying this is exemplary, but this is one of mine: https://github.com/tamouse/art_blog/blob/master/gulpfile.js
frog0909_ has quit [Ping timeout: 260 seconds]
puria has joined #ruby
<pontiki> but the foreman route is also good, if you've got two working commands, and you just want both running
zast has quit [Quit: Leaving.]
sandstrom has quit [Quit: My computer has gone to sleep.]
Sucks has quit [Remote host closed the connection]
KineticX has quit [Remote host closed the connection]
northfurr has quit [Quit: northfurr]
justmytwospence has quit [Remote host closed the connection]
dionysus69 has joined #ruby
sandstrom has joined #ruby
KineticX has joined #ruby
lxsameer has joined #ruby
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> You know, Arthur Weasley never did get a satisfying answer to his most penetrating philosophical inquiry.
frog0909 has joined #ruby
<Ox0dea> "Tell me, what exactly is the function of a rubber duck?"
KineticX has quit [Ping timeout: 240 seconds]
<pontiki> indeed
grassdog has joined #ruby
scottschecter has quit [Ping timeout: 245 seconds]
mdih has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 276 seconds]
Helheim has quit [Ping timeout: 260 seconds]
Makorak has joined #ruby
makenois_ has quit []
sarkis has quit [Ping timeout: 260 seconds]
axsuul has quit [Ping timeout: 240 seconds]
Makorak has quit [Ping timeout: 272 seconds]
elaptics`away is now known as elaptics
mistermocha has quit [Remote host closed the connection]
juddey has quit [Ping timeout: 265 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
n00bdev has quit []
krz has quit [Read error: Connection reset by peer]
ruby002 has joined #ruby
krz has joined #ruby
chouhoulis has joined #ruby
sandstrom has joined #ruby
hannelita has joined #ruby
<ruby002> where am i
<Ox0dea> You are here: X
<pontiki> right here
ur5us has joined #ruby
<Ox0dea> $ whoami
<pontiki> $ wherefor
<ruby002> whatis
JohnT has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
pdoherty has quit [Ping timeout: 260 seconds]
rkazak has joined #ruby
praveen has joined #ruby
speaking1ode has quit [Quit: Lost terminal]
thinkswan has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
hannelita has quit [Ping timeout: 264 seconds]
thinkswan has quit [Client Quit]
sarkis has joined #ruby
akem has joined #ruby
ferr has joined #ruby
yfeldblum has joined #ruby
whiteline has quit [Ping timeout: 260 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
praveen has quit [Ping timeout: 276 seconds]
sarkis has quit [Ping timeout: 240 seconds]
kp666 has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
ruby002 has quit [Ping timeout: 252 seconds]
<Ox0dea> Why did Stallman eat the toe jam?! That set the year of the Linux desktop back at least a decade.
sigurding has joined #ruby
ferr has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
<pontiki> i don't even know what that's supposed to mean
juddey has joined #ruby
sandstrom has joined #ruby
aadam21 has joined #ruby
QpQ4 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
<Ox0dea> Not for the faint of stomach.
choke has joined #ruby
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Xeago has joined #ruby
Lord_xeo has joined #ruby
okbutwhy has joined #ruby
chipotle has joined #ruby
djbkd has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
Xiti` has quit [Quit: Xiti`]
Xiti has joined #ruby
sarkis has joined #ruby
<pontiki> maybe i should avoid it then
lacuna has joined #ruby
trautwein has joined #ruby
blackgoat has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
sarkis has quit [Ping timeout: 250 seconds]
iateadonut1 has joined #ruby
iateadonut has quit [Ping timeout: 264 seconds]
sandstrom has joined #ruby
argentdrake has quit [Ping timeout: 264 seconds]
choke has quit [Read error: Connection reset by peer]
Lord_xeo has quit [Quit: Textual IRC Client: www.textualapp.com]
dpg_ has quit [Ping timeout: 272 seconds]
LMity has joined #ruby
kalopsian has quit [Ping timeout: 256 seconds]
norc has joined #ruby
<norc> Ox0dea. I want your patch.
arup_r has joined #ruby
dEPy has joined #ruby
chipotle has quit [Quit: cheerio]
joneshf-laptop has quit [Read error: Connection reset by peer]
argentdrake has joined #ruby
<Ox0dea> norc: It seems unlikely that you mean this one, but worth a shot: https://gist.github.com/0x0dea/766e7495da2252a4c4c6
ohaibbq has quit [Quit: Leaving...]
sarkis has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
howdoicomputer has joined #ruby
mitt3ns has joined #ruby
<norc> Ox0dea: Hah, that is hilarious.
akem has quit [Remote host closed the connection]
axsuul has joined #ruby
<Ox0dea> norc: apeiros wanted it for something and I figured I could play with it too.
symm- has joined #ruby
aadam21 has quit [Ping timeout: 276 seconds]
agent_white has quit [Ping timeout: 256 seconds]
Makorak has joined #ruby
mitt3ns is now known as agent_white
<norc> Ox0dea: I meant your patch for Enumerable methods. I started finding so many use cases for collection.any?(SomeClass)
sandstrom has joined #ruby
<apeiros> something = introspect BasicObjects ;-)
<norc> They actually had &.[] in it originally.
<Ox0dea> Well, not originally.
<norc> Yeah. Anyhow, I do look like a sad panda currently.
<norc> But I do not think Japanese folks will fall for that trick.
<Ox0dea> Not just `any?(SomeClass)` either!
sarkis has quit [Ping timeout: 240 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
Makorak has quit [Ping timeout: 272 seconds]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
howdoi has quit [Quit: Connection closed for inactivity]
codecop has joined #ruby
Anderson69s has joined #ruby
axsuul has quit [Ping timeout: 245 seconds]
chouhoulis has joined #ruby
<adaedra> Hello
scripore has quit [Quit: This computer has gone to sleep]
dpg_ has joined #ruby
hannelita has joined #ruby
chouhoulis has quit [Ping timeout: 255 seconds]
* shevy clicks adaedra
<adaedra> Access denied
kalopsian has joined #ruby
firstdayonthejob has joined #ruby
ta has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
yardenbar has joined #ruby
solars has joined #ruby
emilkarl has joined #ruby
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
emilkarl has quit [Client Quit]
usershel_ has joined #ruby
usershell has quit [Ping timeout: 246 seconds]
Gnut has joined #ruby
sarkis has joined #ruby
ajf- has joined #ruby
argentdrake has quit [Remote host closed the connection]
sarkis has quit [Ping timeout: 255 seconds]
aganov has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
SOLDIERz has joined #ruby
chipotle has joined #ruby
arup_r has joined #ruby
blackms has joined #ruby
<shevy> your button does not work!
tuelz has joined #ruby
blackms has quit [Remote host closed the connection]
blackms has joined #ruby
blaxter has joined #ruby
kerunaru has joined #ruby
Xeago has joined #ruby
gagrio has joined #ruby
tuelz has quit [Ping timeout: 240 seconds]
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
benhuda has joined #ruby
choke has joined #ruby
jrcharney has quit [Quit: WeeChat 1.4]
benhuda has quit [Quit: Textual IRC Client: www.textualapp.com]
sarkis has joined #ruby
jondot has joined #ruby
<choke> now we see if i keep getting disconnected from irc... stupid internet
sandstrom has quit [Quit: My computer has gone to sleep.]
vondruch has quit [Ping timeout: 255 seconds]
nunchuck has quit [Ping timeout: 260 seconds]
jas02 has joined #ruby
Z00t has joined #ruby
sarkis has quit [Ping timeout: 264 seconds]
<Ox0dea> Good morning, choke.
<choke> not quite midnight yet
<choke> but good morning to you
Oog has joined #ruby
<Ox0dea> ?ugt choke
<ruboto_> choke, it's morning, see http://www.total-knowledge.com/~ilya/mips/ugt.html
<choke> I'll resist however futile it is... it's night -- not morning.
sandstrom has joined #ruby
<Ox0dea> Some men just want to watch the world burn.
Xeago has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 260 seconds]
chussenot has joined #ruby
<choke> Nah, it's really not that complicated... if it's 4-5-6 am and I say good morning, it's because it's morning for me -- i don't need to care what it is for others... i come on and say "good morning everyone!" because I just woke up... I say good night or goodbye when i leave... it's all in context of my location, not everyone elses...
sandstrom has quit [Client Quit]
kalopsian has joined #ruby
iateadonut has joined #ruby
Z00t has quit [Remote host closed the connection]
djellemah has joined #ruby
Z00t has joined #ruby
<Ox0dea> Now *that's* complicated. Much simpler for it to just always be morning.
iateadonut1 has quit [Ping timeout: 265 seconds]
<choke> nah... if someone says morning, say morning back... if someone says afternoon say afternoon back... evening <-> evening... night <-> night
<choke> whatever is said, repeat back.. pretty simple ;)
symm- has quit [Ping timeout: 264 seconds]
<adaedra> said by the one who corrected first.
gusrub has quit [Quit: Leaving]
howdoi has joined #ruby
Makorak has joined #ruby
<adaedra> Morning, Ox.
<Ox0dea> Morning, Ada.
blackgoat has quit [Ping timeout: 250 seconds]
aadam21 has joined #ruby
chipotle has quit [Quit: cheerio]
<choke> morning adaedra ( i did say morning back, but i did inform not necessarily correct )
quaristice has joined #ruby
TomyWork has joined #ruby
<adaedra> and it's precisely to avoid long discussions about "nah it's ... here" that we use UGT.
tmtwd has joined #ruby
certainty has joined #ruby
sarkis has joined #ruby
<choke> meh -- this "ugt" is just over thinking the problem... i'll continue to use words in context of what time it is for me, 'cause it's what really makes sense.
<pontiki> then there's xkcd: https://xkcd.com/448/
lacuna has quit [Remote host closed the connection]
<adaedra> You can also use "Hello" and "Good bye" and never have any problem.
jbrhbr has joined #ruby
sarkis has quit [Ping timeout: 265 seconds]
KineticX has joined #ruby
axsuul has joined #ruby
<Ox0dea> "Hello" contains the name of a very spooky place and "goodbye" is derivative of "God be with ye".
<Ox0dea> Those could totally lead to problems in the company of a sufficiently insufferable pedant or something.
roshanavand has joined #ruby
<adaedra> That's pulling it far away.
arup_r has quit [Remote host closed the connection]
<Ox0dea> And the tide was way out.
hxegon_AFK has quit [Quit: BRB]
andikr has joined #ruby
<choke> maybe i'll use Dia dhuit and slan
krz has quit [Ping timeout: 246 seconds]
kalopsian has quit [Ping timeout: 256 seconds]
<adaedra> Bonjour, choke
chouhoulis has joined #ruby
<choke> Bonjour belle fleur
krz has joined #ruby
<choke> that's about the extent of my french understanding lol
kalopsian has joined #ruby
<Ox0dea> >​> Time.now.morning?
<adaedra> That's very specific
<adaedra> ruboto_ pls
<Ox0dea> ruboto_: Tell us!
<adaedra> ?botsnack
<ruboto_> nomnomnomnom
<TomyWork> adaedra but hell has all the awesome people in it
<Ox0dea> "Hell is other people."
hannelita has joined #ruby
<adaedra> ^
<Ox0dea> <3
<pontiki> so is heaven, and the same people
axsuul has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
<Ox0dea> How elegant.
ruby-lang359 has joined #ruby
arup_r has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
<adaedra> I prefer Sartre's version.
<pontiki> i'm keeping mine
<Ox0dea> See the cat? See the cradle?
hannelita has quit [Ping timeout: 264 seconds]
<adaedra> It's Norway, of course it's a nice place.
acke has joined #ruby
arup_r has quit [Client Quit]
agent_white has quit [Read error: Connection reset by peer]
SCHAAP137 has joined #ruby
Hounddog has joined #ruby
<adaedra> >> "What the hell ruboto"
<ruboto_> adaedra # => "What the hell ruboto" (https://eval.in/500340)
<adaedra> ¯\_(ツ)_/¯
<choke> I use that line every time someone tells me that me and my daughter are going to "hell" since she's gay and I support her anyway... always tell them: "Awesome, we could use a vacation and norway seems like a beautiful place."
vondruch has joined #ruby
<adaedra> heh.
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ta has quit [Remote host closed the connection]
einarj has joined #ruby
antgel has joined #ruby
certainty has quit [Ping timeout: 255 seconds]
agent_white has joined #ruby
mark3 has joined #ruby
certainty has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
<shevy> norway is full of ice and snow
Oog has quit []
<adaedra> awesome
sandstrom has joined #ruby
<adaedra> Or should I say, "åwæsøme"?
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
ur5us has joined #ruby
<pontiki> "Did we win the trip?!?! OMG!!"
kalopsian has quit [Ping timeout: 265 seconds]
aadam21 has quit [Ping timeout: 276 seconds]
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<pontiki> couuld be worse, could be this hell: http://images.huffingtonpost.com/2014-01-08-original2-thumb.jpg
zapata has joined #ruby
certainty has quit [Ping timeout: 272 seconds]
mdw has joined #ruby
asmodlol has quit [Ping timeout: 240 seconds]
mdw has quit [Client Quit]
praveen has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
praveen__ has joined #ruby
Zackio has quit [Read error: Connection reset by peer]
supergeek has joined #ruby
Zackio has joined #ruby
chipotle has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
aufi has joined #ruby
<choke> welp, the misses just got home so off to bed... goodnight all
roshanav_ has joined #ruby
praveen has quit [Ping timeout: 256 seconds]
bascht has quit [Quit: WeeChat 1.2]
roshanavand has quit [Read error: Connection reset by peer]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SOLDIERz has quit [Ping timeout: 265 seconds]
bascht has joined #ruby
bigkevmcd has joined #ruby
aspiers has joined #ruby
Makorak has quit [Read error: No route to host]
edwinvdgraaf has joined #ruby
supergeek has quit [Quit: WeeChat 1.4]
rodfersou has joined #ruby
roshanav_ has quit [Remote host closed the connection]
LMity has quit [Ping timeout: 255 seconds]
agent_white has quit [Ping timeout: 255 seconds]
asmodlol has joined #ruby
<shevy> pontiki haha what a great name
dn` has joined #ruby
<shevy> https://en.wikipedia.org/wiki/Hell,_Michigan "In the early 1930s, Pinckney, Michigan postmaster W. C. Miller began to receive requests from stamp and postmark collectors for cancellations: Hell had no post office"
Xeago has joined #ruby
ziprar has joined #ruby
<adaedra> choke: it's morning here.
ziprar is now known as zipace
roshanavand has joined #ruby
<adaedra> but good night.
kalopsian has joined #ruby
praveen__ has quit [Remote host closed the connection]
blackgoat has joined #ruby
harai54 has quit [Ping timeout: 276 seconds]
howdoicomputer has joined #ruby
bluOxigen_ has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
jondot has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
<pontiki> also good night, even if it is 3am
karapetyan has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has joined #ruby
howdoicomputer has quit [Ping timeout: 260 seconds]
KineticX has quit [Remote host closed the connection]
bluOxigen has joined #ruby
ajf- has joined #ruby
waka has quit [Remote host closed the connection]
waka has joined #ruby
bluOxigen_ has quit [Ping timeout: 245 seconds]
drptbl has joined #ruby
sftrabbit has joined #ruby
dcunit3d has quit [Quit: WeeChat 1.3]
blackgoat has quit [Ping timeout: 245 seconds]
<atmosx> hello
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ni291187 has joined #ruby
axsuul has joined #ruby
chouhoulis has joined #ruby
dcunit3d has joined #ruby
ni291187 has left #ruby [#ruby]
asteel has joined #ruby
<asteel> is
dcunit3d has quit [Client Quit]
<asteel> is self the counterpart to JavaScript "this"?
dcunit3d has joined #ruby
dcunit3d has quit [Client Quit]
<asteel> self = Ruby... this = JavaScript?
choke has quit [Ping timeout: 260 seconds]
drptbl_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
dcunit3d has joined #ruby
dcunit3d has quit [Client Quit]
hannelita has joined #ruby
drptbl has quit [Ping timeout: 265 seconds]
chouhoulis has quit [Ping timeout: 240 seconds]
pandaant has quit [Remote host closed the connection]
Gnut has quit [Ping timeout: 272 seconds]
<yorickpeterse> pretty much
asmodlol has quit [Ping timeout: 276 seconds]
jondot has joined #ruby
<asteel> pretty much or exactly the same?
ta has joined #ruby
TakumoKatekari is now known as Takumo
<adaedra> this is JS has some weird behaviors
hannelita has quit [Ping timeout: 255 seconds]
<asteel> but what about Ruby?
<adaedra> self, in Ruby, is always the object the current method is called on
gregf___ has joined #ruby
asmodlol has joined #ruby
DoubleMalt has joined #ruby
gregf___ has quit [Client Quit]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<asteel> so variable.method_b would have some function and then that function returns self self would ALWAYS be the thing that called the method?
axsuul has quit [Ping timeout: 265 seconds]
dcunit3d has joined #ruby
quaristice has joined #ruby
dcunit3d has quit [Client Quit]
chipotle has quit [Quit: cheerio]
Xeago has quit [Remote host closed the connection]
mdw has joined #ruby
TheHodge has joined #ruby
karapety_ has joined #ruby
karapetyan has quit [Read error: Connection reset by peer]
dcunit3d has joined #ruby
usershel_ has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
Xeago has joined #ruby
simi has joined #ruby
<shevy> asteel you call method_b on what object variable is there
quaristice has quit [Client Quit]
<asteel> I'm confused
dcunit3d has quit [Client Quit]
<asteel> how does self work?
<asteel> I just got the hang of this
usershell has joined #ruby
<asteel> can you explain it like you would to a 5 year old please?
blackmes1 has joined #ruby
aadam21 has joined #ruby
praveen has joined #ruby
dcunit3d has joined #ruby
tuelz has joined #ruby
<adaedra> asteel: when doing foo.bar, inside of bar, self is foo
<asteel> why do people use the confusing foo bar example
<adaedra> everything is an object in Ruby, there are no functions, only methods (so always bound to an object) and you are always in the context of an object
<shevy> it is simple
dc1 has joined #ruby
dcunit3d has quit [Client Quit]
<adaedra> those are the standard english metasyntactic variables
pawnbox has quit [Remote host closed the connection]
<shevy> asteel cat = Cat.new; cat.meow()
chipotle has joined #ruby
toretore has joined #ruby
praveen has quit [Ping timeout: 240 seconds]
<asteel> ok?
<shevy> ok
juddey has quit [Ping timeout: 264 seconds]
* asteel is still confused
pawnbox has joined #ruby
tuelz has quit [Ping timeout: 245 seconds]
<asteel> so phone.call self.ring means self is phone?
huyderman has joined #ruby
<adaedra> no, inside of call method it will be
dpg_ has quit [Ping timeout: 260 seconds]
domgetter has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<adaedra> when doing phone.call, you say "call the `call` method on the `phone` object", so the code inside `call` will be executing with `self` set to what is currently `phone`
Emmanuel_Chanel has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
dcunit3d has joined #ruby
karapety_ has quit [Remote host closed the connection]
<asteel> and that's always like that?
djbkd has quit [Remote host closed the connection]
vifino has quit [Quit: Who turned this off?! D:<]
dcunit3d has quit [Client Quit]
dEPy has quit [Ping timeout: 260 seconds]
dcunit3d has joined #ruby
karapetyan has joined #ruby
grassdog has quit [Quit: Be back later ...]
karapetyan has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
asteel has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
acke_ has joined #ruby
lacuna has quit [Remote host closed the connection]
<shevy> pretty legit person
kies^ has quit [Read error: Connection reset by peer]
<adaedra> ah, gone already?
Azure has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
Azure has joined #ruby
acke has quit [Ping timeout: 255 seconds]
Rickmasta has quit [Ping timeout: 240 seconds]
Spleeze has quit [Ping timeout: 240 seconds]
wnd has quit [Ping timeout: 256 seconds]
joonty has joined #ruby
wnd has joined #ruby
FernandoBasso has joined #ruby
lipoqil has joined #ruby
saltsa_ has joined #ruby
sluukkonen has quit [Ping timeout: 276 seconds]
timmow_ has quit [Ping timeout: 250 seconds]
saltsa has quit [Ping timeout: 250 seconds]
marens has quit [Remote host closed the connection]
Affix has quit [Ping timeout: 250 seconds]
gregf_ has joined #ruby
Spleeze has joined #ruby
Rickmasta has joined #ruby
Affix has joined #ruby
gregf_ has quit [Quit: leaving]
Affix is now known as Guest18754
rkazak has quit [Quit: Sleep.....ing....]
marens has joined #ruby
marens has quit [Changing host]
marens has joined #ruby
sluukkonen has joined #ruby
timmow has joined #ruby
gregf_ has joined #ruby
praveen has joined #ruby
colegatron has quit [Ping timeout: 276 seconds]
asmodlol has quit [Ping timeout: 265 seconds]
Helheim has joined #ruby
_main_ has joined #ruby
sepp2k has joined #ruby
asmodlol has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Client Quit]
dionysus69 has quit [Ping timeout: 265 seconds]
emilkarl has joined #ruby
aadam21 has quit [Ping timeout: 276 seconds]
Tempesta has joined #ruby
__main__ has quit [Ping timeout: 265 seconds]
_main_ is now known as __main__
djbkd has joined #ruby
dwfait has joined #ruby
huyderman has quit [Read error: Connection reset by peer]
okbutwhy has joined #ruby
huyderman has joined #ruby
karapetyan has joined #ruby
sergey_makagon has joined #ruby
ur5us has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 255 seconds]
colegatron has joined #ruby
vifino has joined #ruby
chouhoulis has joined #ruby
praveen has quit [Remote host closed the connection]
rdark has joined #ruby
krz has quit [Ping timeout: 255 seconds]
<shevy> hmm if we have a string "foobar", and store this in a .yml file, the proper way for this would be to become: "--- foobar\n" right?
karapetyan has quit [Remote host closed the connection]
arup_r has joined #ruby
hannelita has joined #ruby
jschmid has joined #ruby
<shevy> because strangely enough, I have something here where "foobar" becomes "--- foobar\n...\n" in a .yml file
<apeiros> "Three dots ( “...”) indicate the end of a document without starting a new one"
krz has joined #ruby
<apeiros> @ shevy
<shevy> aha, how weird
hanneli has joined #ruby
<apeiros> in a file that should not be necessary
<toretore> can you store just a string as a yaml doc?
dionysus69 has joined #ruby
chouhoulis has quit [Ping timeout: 264 seconds]
axsuul has joined #ruby
moeSeth has joined #ruby
<apeiros> >> require 'yaml'; YAML.load("hello")
<ruboto_> apeiros # => "hello" (https://eval.in/500390)
<apeiros> toretore: ^
<toretore> weird
hannelita has quit [Ping timeout: 255 seconds]
<ljarvis> >> RUBY_VERSION
<ruboto_> ljarvis # => "2.2.0" (https://eval.in/500391)
<ljarvis> :(
j_mcnally has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<shevy> ruboto_.upgrade!
platzhirsch has joined #ruby
djbkd has quit [Remote host closed the connection]
j_mcnally has quit [Client Quit]
axsuul has quit [Ping timeout: 256 seconds]
Xeago has quit [Remote host closed the connection]
ljames has joined #ruby
<apeiros> ljarvis: it's implemented and will come online today
ldnunes has joined #ruby
<apeiros> but there's still a crucial part missing in the new ruboto :(
DirtyFInn has joined #ruby
hanneli has quit [Remote host closed the connection]
quaristice has joined #ruby
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
solocshaw has joined #ruby
lsmola has joined #ruby
framling has quit [Remote host closed the connection]
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has joined #ruby
grassdog has joined #ruby
GBrawl has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
usershel_ has joined #ruby
GBrawl has quit [Client Quit]
usershell has quit [Ping timeout: 246 seconds]
grassdog has quit [Ping timeout: 260 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
cmolenda has quit [Remote host closed the connection]
puria has quit [Ping timeout: 276 seconds]
Jackneill has joined #ruby
platzhirsch has left #ruby [#ruby]
<ljarvis> AI?
A124 has quit [Quit: '']
<shevy> hehehe
jmignault has quit [Ping timeout: 240 seconds]
cassioscabral has joined #ruby
hannelita has joined #ruby
dlitvak has joined #ruby
<adaedra> A soul?
Z00t has quit [Ping timeout: 264 seconds]
dc1 has quit [Quit: WeeChat 1.3]
dc1 has joined #ruby
dcunit3d has quit [Quit: WeeChat 1.3]
dc1 has quit [Client Quit]
dcunit3d has joined #ruby
<shevy> lol
nettoweb has joined #ruby
howdoicomputer has joined #ruby
aadam21 has joined #ruby
puria has joined #ruby
cassioscabral has quit [Ping timeout: 265 seconds]
webhat_ is now known as webhat
kalopsian has quit [Ping timeout: 260 seconds]
cmolenda has joined #ruby
kalopsian has joined #ruby
praveen has joined #ruby
hanneli has joined #ruby
howdoicomputer has quit [Ping timeout: 240 seconds]
dlitvak_ has joined #ruby
Coldblackice has quit [Ping timeout: 246 seconds]
dlitvak has quit [Ping timeout: 276 seconds]
hannelita has quit [Ping timeout: 264 seconds]
hannelitaa has joined #ruby
Bloomer has quit [Remote host closed the connection]
hanneli has quit [Ping timeout: 264 seconds]
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
chouhoulis has joined #ruby
dwfait has quit [Remote host closed the connection]
prestorium has joined #ruby
symbol_ has joined #ruby
blackmes1 has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
dwfait has joined #ruby
stamina has joined #ruby
FooMunki has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
dwfait has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 250 seconds]
xet7 has joined #ruby
pawnbox has quit [Remote host closed the connection]
bluOxigen has joined #ruby
pawnbox has joined #ruby
d0nn1e has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
axsuul has joined #ruby
casadei has joined #ruby
symbol_ has quit [Quit: WeeChat 1.1]
kalopsian has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
ascarter_ has joined #ruby
axsuul has quit [Ping timeout: 260 seconds]
tulak has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
Blaguvest has joined #ruby
roshanav_ has quit [Remote host closed the connection]
cornerma1 has joined #ruby
aadam21 has quit [Ping timeout: 276 seconds]
tuelz has joined #ruby
praveen has quit [Remote host closed the connection]
casadei has quit [Read error: Connection reset by peer]
casadei has joined #ruby
cmolenda has quit []
cornerman has quit [Ping timeout: 245 seconds]
cornerma1 is now known as cornerman
c355e3b has joined #ruby
CloCkWeRX has joined #ruby
Xeago has joined #ruby
tuelz has quit [Ping timeout: 256 seconds]
stevenxl has quit [Ping timeout: 272 seconds]
skade has joined #ruby
lacuna has quit [Remote host closed the connection]
jondot has joined #ruby
roshanavand has joined #ruby
dling has quit [Read error: Connection reset by peer]
dling has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
ferr has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
praveen has joined #ruby
chussenot has quit [Quit: chussenot]
aadam21 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
dwfait has joined #ruby
platzhirsch has joined #ruby
ascarter_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Melpaws has quit [Remote host closed the connection]
Cohedrin has joined #ruby
lucasb has joined #ruby
bruce__lee has joined #ruby
hannelitaa has quit [Remote host closed the connection]
ajf- has joined #ruby
pulgolino has joined #ruby
Xeago has quit [Remote host closed the connection]
lacuna has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
Xeago has joined #ruby
rodfersou has quit [Ping timeout: 264 seconds]
Cohedrin has quit [Ping timeout: 255 seconds]
bruce_lee has quit [Ping timeout: 272 seconds]
Xeago_ has joined #ruby
ajf- has quit [Client Quit]
kalopsian has joined #ruby
sigurding has quit [Quit: sigurding]
bluOxigen_ has joined #ruby
hannelita has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
pdoherty has joined #ruby
rodfersou has joined #ruby
praveen has quit [Remote host closed the connection]
zh2683 has joined #ruby
robbyoconnor has joined #ruby
zh2683 has left #ruby ["ERC (IRC client for Emacs 24.5.1)"]
roshanavand has joined #ruby
sandstrom has joined #ruby
_whitelogger has joined #ruby
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
aryaching has joined #ruby
<lucasb> maybe /\#{5}/ ?
tvw has joined #ruby
postmodern has quit [Quit: Leaving]
<siaw> lucasb: i’ll try
<DirtyFInn> That seems to work
<siaw> lucasb: yes it does work. thanks a lot :)
chouhoulis has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
chouhoulis has quit [Ping timeout: 256 seconds]
<toretore> /#####/
_whitelogger_ has joined #ruby
_whitelogger has quit [Ping timeout: 240 seconds]
voker57 has joined #ruby
voker57 has quit [Changing host]
voker57 has joined #ruby
<siaw> i’m reading a list of files with links. but when the files are read in the terminal ruby shows me a extra bunch of space that i want to to get rid of. like this "http://goo.gl/KUcXzm "
nerfando has joined #ruby
johnny56 has joined #ruby
<siaw> but i want it to ignore the extra space and returen "http://goo.gl/KUcXzm
<siaw> how do i achieve this?
dionysus69 has quit [Ping timeout: 256 seconds]
<chris2> url.strip
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aupadhye has joined #ruby
nerfando has quit [Max SendQ exceeded]
nerfando has joined #ruby
axsuul has quit [Ping timeout: 255 seconds]
johnny56_ has quit [Ping timeout: 264 seconds]
Elysia has quit [Remote host closed the connection]
Elysia has joined #ruby
scripore has joined #ruby
devbug has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
sigurding has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<sandstrom> Is there a performance benefit to freezing strings that are defined as constants? Or is that only when the strings are 'inline'
jondot has joined #ruby
<yorickpeterse> There might be a small gain, but that depends on how the strings are used
<apeiros> there's (with current rubies) never a performance benefit
<yorickpeterse> If they're defined as contants there's still the overhead of constant lookups
<apeiros> there's a memory benefit with ruby 2.2+ if you use *literally* the form "foo".freeze
<apeiros> and that's unrelated to what they're assigned to
waka has quit [Remote host closed the connection]
<sandstrom> Ah, okay (I thought them being a constant might make a difference)
sftrabbit has quit [Quit: sftrabbit]
<sandstrom> (Because being a constant, they shouldn't be allocated more than once regardless)
<apeiros> variables are orthogonal to objects
<apeiros> an object is not a constant
<apeiros> the constant is a constant, and it may reference an immutable object
<sandstrom> Yes, but my understanding was that e.g. `1000.times { "foo".freeze }` would only allocate once, but that `my_var = 'foo'; 1000.times { my_var }` (similar to it being a constant) also allocates once, frozen or not
jackcom has joined #ruby
bruce__lee has quit [Changing host]
bruce_lee has joined #ruby
bruce__lee is now known as bruce_lee
<apeiros> the term for "foo" is literal
<apeiros> and yes, "foo".freeze would only allocate once in 2.2+
linc01n has quit [Ping timeout: 256 seconds]
<sandstrom> I know, but isn't that already the case with `my_var = 'foo'; 1000.times do { my_var }` ?
<shevy> bruce_lee! what are you doing here on #ruby, off with you to enter the #dragon !
B1n4r10 has joined #ruby
<apeiros> sandstrom: in the 1000.times part it won't allocate anything. so it depends on how often you run the my_var = 'foo' part.
ajf- has joined #ruby
aadam21_ has joined #ruby
<jackcom> shevy: hello :_
aadam21 has quit [Ping timeout: 276 seconds]
<sandstrom> apeiros Got it, thanks discussing this with me! :)
<shevy> 1000.times do { my_var } would be powerful new syntax if it would work :)
inukshuk_ has joined #ruby
linc01n has joined #ruby
inukshuk_ has quit [Client Quit]
dcunit3d has quit [Ping timeout: 240 seconds]
Xeago_ has quit [Remote host closed the connection]
quaristice has joined #ruby
solenoids has quit [Ping timeout: 256 seconds]
dwfait has joined #ruby
gagrio has quit [Ping timeout: 272 seconds]
B1n4r10 has quit [Ping timeout: 256 seconds]
roshanav_ has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
troulouliou_div2 has joined #ruby
aadam21_ has quit [Remote host closed the connection]
harai54 has joined #ruby
gagrio has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
lubekpl has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GinoManWorks_ has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
tuelz has joined #ruby
praveen has joined #ruby
moeSeth has quit [Quit: Connection closed for inactivity]
harai54 has quit [Ping timeout: 272 seconds]
lucasb_ has joined #ruby
howdoicomputer has joined #ruby
<siaw> need some help. i have to files. one with tweets and place holders other with links on each line. i want to replace each placeholder in the tweets with one link from the links.txt file. i’m doing something like this which is not working https://gist.github.com/siaw23/929e7c479910631ac7af any help?
lxsameer has quit [Quit: Leaving]
antgel has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
krz has joined #ruby
antgel has joined #ruby
rob_ has joined #ruby
lucasb has quit [Ping timeout: 240 seconds]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
praveen has quit [Ping timeout: 256 seconds]
<rob_> anyone use vim and rubocop with rbenv? i've installed 2.3.0 and rubocop but i get this error: parser/current is loading parser/ruby22, which recognizes 2.2.x-compliant syntax, but you are running 2.3.0.
chipotle has quit [Quit: cheerio]
solenoids has joined #ruby
<rob_> ive tried upgrading parser gem, vim-rubocop and rubocop
jmignault has joined #ruby
roshanavand has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 246 seconds]
dlitvak_ has quit [Remote host closed the connection]
Z00t has joined #ruby
<Bish> siaw: well, since you do gsub, every match will be replaced with the same link
<Bish> in first iteration of while
<siaw> Bish: i figured that. i don’t want all matches to be replaced. i want to replace EACH match with something else
<siaw> Bish: any options?
<Bish> one sec
bkxd_ has joined #ruby
<siaw> ok
bkxd has quit [Ping timeout: 240 seconds]
<Bish> >> count=0;"#####".gsub(/#/) { |x| x = links[count+=1] }
<ruboto_> Bish # => undefined local variable or method `links' for main:Object (NameError) ...check link for more (https://eval.in/500439)
<Bish> >> count=0;links = (0..5).to_a;"#####".gsub(/#/) { |x| x = links[count+=1] }
<ruboto_> Bish # => "12345" (https://eval.in/500441)
<Bish> this is what you want,i guess
yfeldblum has quit [Ping timeout: 250 seconds]
<Bish> ( in this case i replace single # )
lucasb_ has quit [Ping timeout: 240 seconds]
<siaw> Bish: and what’s the count doing?
<Bish> counting up, everytime something gets replace
<Bish> so it takes the next element of the array, next time
<siaw> Bish: ok
<Bish> similiar to your i, just smaller :p
chipotle has joined #ruby
lucasb has joined #ruby
<siaw> Bish: BUT i want to replace each ##### with a different LINK
<Bish> well if you watch carefully, that's what i am doing in my code
<Bish> every # gets replaced with a DIFFERENT number
<Bish> yet being the same match
<siaw> Bish: let me try
decoponio has joined #ruby
<siaw> Bish: you have to bits of code
<siaw> are you talking about this one
<siaw> count=0;links = (0..5).to_a;"#####".gsub(/#/) { |x| x = links[count+=1] }
chouhoulis has joined #ruby
dorei has joined #ruby
Xeago has joined #ruby
joonty has quit [Ping timeout: 240 seconds]
webus has joined #ruby
saneax_AFK is now known as saneax
joonty has joined #ruby
saneax is now known as Guest37908
roshanavand has joined #ruby
dlitvak has joined #ruby
<Bish> >> links = %w(http://google1.de http://twitter.com http://somelink.com); count = 0; "##### ##### #####".gsub(/\#{5}/) { |x| x=links.pop }
<Bish> this does exactly what you want, as you can see
aryaching has quit [Ping timeout: 264 seconds]
blackgoat has joined #ruby
<Bish> the count is not even used in this case
aryaching has joined #ruby
<Bish> the trick is that you let a block do the replacing, rather than a static expression
<siaw> Bish: yeah its clearer now
dionysus69 has joined #ruby
<Bish> note: you do not even have to set "x"
<lucasb> >> a = %w(oh hai there); 'omg # such # much #'.gsub(/#/) { a.shift }
<ruboto_> lucasb # => "omg oh such hai much there" (https://eval.in/500451)
<lucasb> ^^ another example for siaw
chouhoulis has quit [Ping timeout: 276 seconds]
<Bish> :3
<Bish> learned the beauty of blocks, when wanted to have a hash of hashes
<Bish> >> x = Hash.new(Hash.new); x['yo']['dubidu'] = 3;x;
<ruboto_> Bish # => {} (https://eval.in/500452)
<Bish> >> x = Hash.new(Hash.new); x['yo']['dubidu'] = 3;x
<ruboto_> Bish # => {} (https://eval.in/500453)
<Bish> ?
blackgoat has quit [Client Quit]
<Bish> either way, you get the point :3
roshanavand has quit [Ping timeout: 255 seconds]
dlitvak has quit [Ping timeout: 264 seconds]
Xeago has quit [Remote host closed the connection]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sftrabbit has joined #ruby
Xeago has joined #ruby
emilkarl has joined #ruby
<ljarvis> yeah that's not how it works
atomical has joined #ruby
<ljarvis> but i see your point
<Bish> yeah i learned it the hard way, but i am wondering why i am not getting an output
agit0 has joined #ruby
Bloomer has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
<ljarvis> >> h = Hash.new(Hash.new); h[:foo] = { bar: 1 }
<ruboto_> ljarvis # => {:bar=>1} (https://eval.in/500457)
<ljarvis> >> h = Hash.new(Hash.new); h[:foo] = { bar: 1 }; h
<ruboto_> ljarvis # => {:foo=>{:bar=>1}} (https://eval.in/500458)
roshanavand has joined #ruby
<ljarvis> your version just returns a hash that you set a value for, but it doesn't return that hash
<ljarvis> you dont mutate the existing version, but a new empty hash
<ljarvis> and then you discard that
<apeiros> >> x = Hash.new(Hash.new); x['yo']['dubidu'] = 3;x.default # @Bish
<ruboto_> apeiros # => {"dubidu"=>3} (https://eval.in/500463)
<Bish> wow, that's also new for me
<apeiros> to illustrate what ljarvis said
<Bish> yeah no i get it, thank you
marr has joined #ruby
<Bish> i thought read access would've set it, too
<apeiros> thankfully it does not. but Hash.new with a block can.
<lucasb> but, there's a way to create an infinity autovivifying hash? like h[:k1][:k2][:k3] = 42 would return a nested hash
<ljarvis> yes
<Bish> lucasb: yes, when you define default_proc in the proc-default value for the "child-hash"
<apeiros> h = Hash.new { |h,k| h[k] = Hash.new(&h.default_proc) }
<apeiros> lucasb: ^
<ljarvis> hash = Hash.new { |h, k| h[k] = Hash.new(&h.default_proc) }
<Bish> ^
<ljarvis> dammit
rdark has quit [Ping timeout: 245 seconds]
* ljarvis is too slow
<Bish> one of the coolest things you can do in ruby imho
<ljarvis> disagree
elaptics is now known as elaptics`away
<ljarvis> one of the worst things*
<apeiros> heh
<apeiros> I'm leaning towards ljarvis' "disagree"
<lucasb> oh, cool. the trick is to reuse the same default block, then. thanks!
<Bish> i didn't say it's good practice
<apeiros> it's cool that you can do it
<ljarvis> actually that's not true, I agree it's "cool" -- but it's not a good idea imo
whiteline has joined #ruby
<Bish> yep, that's what i meant
scripore has quit [Quit: This computer has gone to sleep]
<apeiros> but IMO if you do it, you're having a huge red flag in your code screaming "make me a proper class"
<ljarvis> aye
roshanavand has quit [Ping timeout: 240 seconds]
<apeiros> I guess we're all on the same page :D
<Bish> but i admit, i have used it for helper scripts.
<ljarvis> well that's ok, I have done a lot worse for helper scripts
<ljarvis> a *lot* worse
<Bish> as long as ruby doesn't segfault, it's gud.
<Bish> 16gb ram usage, np
<norc> include >> TypeError: wrong argument type Class (expected Module) -- I never thought Id see the day that this error message has a reasonable use case!
<ljarvis> why?
dcunit3d has joined #ruby
<norc> I was refactoring a mixin into a parent class, and reverted the change but forgot to delete the class (it had the same name). Rails autoloading meant it then tried to include the left over class.
<ljarvis> ah :)
<ljarvis> I actually get that message quite often because I name things class by habit
<ljarvis> and then try to include it
<ljarvis> because composition ftw
DEA7TH has joined #ruby
DEA7TH is now known as ProbabilityDistr
ProbabilityDistr is now known as DEA7TH
troulouliou_div2 has quit [Remote host closed the connection]
JDiPierro has joined #ruby
roshanavand has joined #ruby
<norc> Im wondering why you cannot include a class though.
<norc> I mean it kind of makes sense that inheriting from module is not very sensible.
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
asmodlol has quit [Ping timeout: 264 seconds]
johnny56_ has joined #ruby
<ljarvis> why would incuding a class be sensible? they're instantiated by design
<siaw> Bish: should this be working? https://gist.github.com/siaw23/929e7c479910631ac7af
johnny56_ has quit [Client Quit]
<siaw> lucasb: should this be working? https://gist.github.com/siaw23/929e7c479910631ac7af
roshanavand has quit [Ping timeout: 260 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
<siaw> lucasb: trying to replace each ##### with a different link from the links.txt file
<ljarvis> siaw: does it work?
johnny56_ has joined #ruby
<siaw> no it doesn't
<siaw> :(
<ljarvis> ok, so what happens instead?
<ljarvis> help us out here
<siaw> the ##### placeholder is remove completely, replace with nothing
<siaw> it just removes the #####
<norc> ljarvis: Im currently pondering on this. The way Im looking at this is composing a class out of another classes methods.
<ljarvis> siaw: does links_array look OK?
chimche has joined #ruby
<ljarvis> norc: sounds complex
nerfando has joined #ruby
<siaw> ljarvis: it’s an array of strings
arup_r has quit [Remote host closed the connection]
aupadhye has quit [Ping timeout: 255 seconds]
johnny56_ is now known as johnny56
<ljarvis> siaw: so, when you dump it before line 13 it looks as it's supposed to look?
chimche has quit [Client Quit]
asmodlol has joined #ruby
<siaw> ljarvis: oops. it’s an empty array
griffindy has joined #ruby
<Bish> who would've seen that one coming!?
chimche has joined #ruby
<ljarvis> siaw: there's your problem. Welcome to debugging
<Bish> siaw: try "pry" for such things, it's great.
<apeiros> siaw: `File.open(name_file.to_s + '.txt').read` bad habit. leaves dangling filehandles (might be closed whenever)
<ljarvis> dump variables might appear primitive but it's one of the best tools
<apeiros> siaw: use `File.read(name_file)` instead
<ljarvis> or, in this case; File.readlines(...).map(&:strip)
<siaw> apeiros: thanks
<apeiros> ljarvis: damit, now you were faster
<ljarvis> about time!
<apeiros> though, I actually wonder whether .read.split would be faster
sgambino has joined #ruby
<apeiros> never tried :)
<Bish> wouldn't .each(:strip!) be more efficent?
<ljarvis> huh
<ljarvis> no Bish
<Bish> atleast for GC
<apeiros> can benchmark
roshanavand has joined #ruby
<apeiros> would have to include gc stress in the benchmark too
<apeiros> ljarvis: I could imagine that to be more efficient. it has theoretically less to do. just change the length of the string.
chipotle has quit [Quit: cheerio]
<apeiros> depending on the reallocation algorithm, it might not even have to reallocate.
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> hmm
bluOxigen has joined #ruby
<ljarvis> i mean really you should just go ahead and build a complete lexer/parser combination
<ljarvis> it's the obvious solution
<siaw> ljarvis: this is NOT doing the trick :(
synthroid has joined #ruby
<ljarvis> siaw: did you debug it?
<ljarvis> also, why now pop instead of shift?
failshell has joined #ruby
cdg has joined #ruby
elaptics`away is now known as elaptics
<ljarvis> also your variable naming is off a bit.. "links_text_file" -- for something that is an array
<ljarvis> just call it links
Plazma_ is now known as Plazma
bluOxigen_ has quit [Ping timeout: 245 seconds]
hakunin has quit [Read error: Connection reset by peer]
<lucasb> maybe you must also File.readlines('tweets.txt'), and then iterate those lines
hakunin has joined #ruby
ponga has joined #ruby
aupadhye has joined #ruby
<ljarvis> no they're all on one line
<Bish> wouldn't be using .gsub! be more efficent *trollface*
arup_r has joined #ruby
<lucasb> otherwise you'll get a huge tweet. maybe when twitter get that 10k char limit :)
gagrio has quit [Ping timeout: 256 seconds]
DEA7TH is now known as ProbabilityDist
ramortegui has joined #ruby
<Bish> siaw: there is nothing wrong with your snippet, you really should use pry
<siaw> Bish: ok
<Bish> you can set a debugging point in your code, and simply observe what goes wrong
<ljarvis> i don't think pry is necessary here but if it teaches debugging then that's great
<siaw> i have pry
<siaw> but how do i run a ruby file in Pry?
davedev24 has joined #ruby
<Bish> you can do Pry.binding at any line ( correct me, plx ), and the program will stop execution at that line
dwfait has quit [Remote host closed the connection]
<Bish> and then you can use it like the usual pry repl
mfb2 has joined #ruby
<siaw> Bish: what? :D
<siaw> Pry.binding goes inside the code?
Jardayn has joined #ruby
<siaw> it’s funny, it’s just 2 lines of code
<Bish> yes, and your programm will stop at that point
<Bish> and let you observe
arup_r has quit [Ping timeout: 260 seconds]
<Bish> and you will see empty arrays etc
tvw has joined #ruby
<Mon_Ouie> binding.pry
<Bish> Mon_Ouie: thank you :D i knew i would get that wrog
<Bish> yeah just what Mon_Ouie says
<Bish> it's "binding.pry" not "Pry.binding"
Thomas-0725 has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Bish> well it shows you, where your script stopped
<Bish> and now you're able to "navigate" your running program
<Bish> type "ls"
<Bish> or "puts links"
<Bish> or just "links"
chipotle has joined #ruby
B1n4r10 has joined #ruby
<Bish> yeah it shows you that links and tweets do exists, atleast as variables (yellow in locals)
ESpiney has joined #ruby
<siaw> when i type tweets, it gives nil
davedev2_ has joined #ruby
<domgetter> you can run pretty much any ruby code you want. try 2 + 2
<Bish> well, that's no surprise, since you're in the line before it gets filled
JakFrist has joined #ruby
pdoherty has quit [Ping timeout: 272 seconds]
davedev__ has joined #ruby
duckpupp1 has joined #ruby
<siaw> Bish: so what help did Pry do me? still no pregress :D
<Bish> well.. you're able to see if variables you set exist
<siaw> Bish: they do :)
chipotle has quit [Ping timeout: 240 seconds]
<Bish> you just said tweets is nil, you don't know if it will be correct
davedev24 has quit [Ping timeout: 240 seconds]
arup_r has joined #ruby
<siaw> Bish: that was because of where i put “binding.pry” i think
jacyzon has joined #ruby
<Bish> exactly, put it one line lower, and you will see whats in there
<Bish> another thing you could do is "....gsub(/#####/) { |x| p x; links.shift }
<Bish> so you will get every match printed
<Bish> if there is no print => the block never gets executed
davedev2_ has quit [Ping timeout: 250 seconds]
<siaw> Bish: those are the tweets actually but no replacements
davedev24 has joined #ruby
<Bish> that's good, i guess
<Bish> jup, because it's before the replacedment
sftrabbit has quit [Quit: sftrabbit]
<siaw> Bish: how do i replace the placeholders then? :(
<Bish> well, wait what, i see goo.gl links in there
<Bish> isn't that what you wanted?
tvw has quit [Ping timeout: 255 seconds]
<siaw> Bish: holy crap!!!
sftrabbit has joined #ruby
<Bish> you really submit screenshots you're not even looking at? geez u gotta work on your effot
<siaw> Bish: i looked at them and didn’t notice
<siaw> !!
<siaw> really!
Guest37908 is now known as saneax_AFK
<Bish> siaw: but i tell you, why you THINK it didn't work
Thomas-0725 has quit [Quit: Textual IRC Client: www.textualapp.com]
<Bish> you did p x some stuff x y z
<siaw> Bish: but i still have a question
<siaw> Bish: can you see the \”
gagrio has joined #ruby
<Bish> yeah i do
<siaw> it’s escpaing something right?
ekinmur has joined #ruby
<Bish> yes, line breaks
<Bish> oh no, in this case, quotes
<Bish> sorry
TomPeed has joined #ruby
ekinmur has quit [Client Quit]
<siaw> Bish: ok. you i got confused cause i thought linke break were \n
<Bish> but it only gets SHOWN escaped
<Bish> the \ aren't actually in the string
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish> they're just there because you used p/inspect
tvw has joined #ruby
davedev__ has quit [Ping timeout: 240 seconds]
<Bish> if you do "puts tweets" you won't see those
<siaw> yup i know
<siaw> Bish: thanks a lot :)
<Bish> no problem
troulouliou_div2 has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
kobain has joined #ruby
chouhoulis has joined #ruby
dlitvak has joined #ruby
axsuul has joined #ruby
blackoperat has joined #ruby
praveen has joined #ruby
<Bish> what do you guys do, when having to save data of unknown size / kind in the database?
<ljarvis> Bish: could you elaborate?
chouhoulis has quit [Ping timeout: 246 seconds]
<Bish> yeah for example... a config hash, where values would be sometimes strings sometimes fixnum
<Bish> and you have a mysql database, otherwisethis would't't be hard to decide.
dlitvak has quit [Ping timeout: 264 seconds]
siaw has quit [Quit: siaw]
<Bish> right now im storing stuff to filesystem as a json string, which isn't very pretty
praveen has quit [Remote host closed the connection]
praveen has joined #ruby
<Bish> inb4, use json support of mysql 5.6
axsuul has quit [Ping timeout: 250 seconds]
DirtyFInn has quit []
<adaedra> use mysql support of json 5.6
quaristice has joined #ruby
<Bish> and how does the table look? single row table?
ponga has quit []
<adaedra> more seriously,I think you are too vague. It depends on different factors.
<Bish> well i want the user of a webapp to create this thing, and i do not know how it looks
c0ncealed has quit [Quit: going dark...]
<Bish> so it will be basicially a hash with settings in it
c0ncealed has joined #ruby
phreakocious has quit [Ping timeout: 260 seconds]
<ljarvis> also why rule out json? it's pretty much built for this
sankaber has joined #ruby
<Bish> i do not rule it out, i use it, but on fs
<ljarvis> right, and why not db?
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
aryaching has quit [Ping timeout: 276 seconds]
<Bish> well, i didn't take in account that 5.6 actually is shipped stable right now
<lucasb> why not create table json_snippets? each row, one snippet :)
<Bish> snippet? well, what fields does that table have?
<lucasb> id, user, and text?
codecop has quit [Remote host closed the connection]
<Bish> well, forgot to specify.. i don't know the column names
phreakocious has joined #ruby
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
<apeiros> different question - what's wrong with storing it in the fs?
malconis has joined #ruby
dlitvak has joined #ruby
<Bish> well, as i said the user does it, so it gets written from time to time
dlitvak has quit [Read error: Connection reset by peer]
<Bish> maybe at the same time, that's why i put a mutex before that
polishdub has joined #ruby
tulak has joined #ruby
<Bish> it works good, but feels dirty
dlitvak has joined #ruby
chimche has quit [Quit: Leaving.]
sarkis has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
phreakocious has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
whippythellama has joined #ruby
tubuliferous_ has joined #ruby
roshanavand has quit [Remote host closed the connection]
tubuliferous_ has quit [Read error: Connection reset by peer]
retnah has quit [Quit: Leaving]
radgeRayden has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
aadam21 has joined #ruby
roshanavand has joined #ruby
dwfait has joined #ruby
volty has joined #ruby
tulak has quit [Remote host closed the connection]
tulak has joined #ruby
mjc_ has quit [Quit: Connection closed for inactivity]
trautwein has quit [Quit: Textual IRC Client: www.textualapp.com]
carraroj has joined #ruby
stannard has joined #ruby
trautwein has joined #ruby
chry has joined #ruby
Xeago has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
karapetyan has quit [Read error: Connection reset by peer]
asmodlol has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
trautwein has quit [Client Quit]
rippa has joined #ruby
dmr8 has joined #ruby
chipotle has joined #ruby
techietrash_ has quit [Changing host]
techietrash_ has joined #ruby
techietrash_ is now known as techietrash
chimche has joined #ruby
aryaching has joined #ruby
atomical has quit [Ping timeout: 264 seconds]
joneshf-laptop has joined #ruby
karapetyan has joined #ruby
mikecmpbll has joined #ruby
frem has joined #ruby
chimche1 has joined #ruby
harai54 has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
andrew95 has joined #ruby
dn` has quit [Ping timeout: 264 seconds]
axl_ has joined #ruby
chimche has quit [Ping timeout: 272 seconds]
harai54 has quit [Ping timeout: 250 seconds]
shinnya has joined #ruby
asmodlol has joined #ruby
solars has quit [Ping timeout: 272 seconds]
howdoicomputer has joined #ruby
GGMethos has quit [Ping timeout: 264 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
RTG` has quit [Ping timeout: 246 seconds]
RTG` has joined #ruby
robbyoconnor has quit [Ping timeout: 246 seconds]
<Bish> stupid question, is there some pretty way to "rename" a variable for a block
<Bish> like x.with { |y| }
<Bish> so x is called y inside the block?
<Bish> ofc, i could hack that somewhay, but maybe there is something already
howdoicomputer has quit [Ping timeout: 246 seconds]
andrew95 has quit [Ping timeout: 252 seconds]
<ljarvis> Bish: #tap
<ljarvis> >> a = [1,2,3]; a.tap { |b| b << 4 }
<ruboto_> ljarvis # => [1, 2, 3, 4] (https://eval.in/500490)
The_Phoenix has joined #ruby
<ljarvis> tap yields *and* returns the caller, just fyi
<ljarvis> &ri tap
ljames has quit []
dlitvak has quit [Ping timeout: 265 seconds]
quaristice has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
<ljarvis> c = a.tap { |b| ... } for example would be valid
phreakocious has joined #ruby
dlitvak has joined #ruby
chipotle_ has joined #ruby
<Bish> another stupid question
<Bish> i cannot use blocks to create "blocks"
<Bish> like bleh.each do\n{...\n}
<Bish> that is a matter of rubysyntax right?
atomical has joined #ruby
dlitvak_ has joined #ruby
rdark has joined #ruby
dlitvak has quit [Ping timeout: 264 seconds]
<lucasb> maybe call lambda or proc? or use pointy/stabby block?
chouhoulis has joined #ruby
chipotle has quit [Ping timeout: 265 seconds]
aspire has joined #ruby
<Bish> mh?
arup_r has quit [Remote host closed the connection]
praveen has quit []
<lucasb> lambda {}, proc {}, -> {}, all three create blocks, right? I don't if was this what you meant
<lucasb> *i don't know
kies^ has joined #ruby
<Bish> no i just meant syntax-wise.. i want the block to begin in the next line
KineticX has joined #ruby
<apeiros> lucasb: no, all three create a Proc instance (by using a block)
<apeiros> blocks != Proc instances, even if you can consider it to be an implementation detail.
<lucasb> indeed, that description is more accurate
chouhoulis has quit [Ping timeout: 240 seconds]
ajf- has joined #ruby
<apeiros> notable is that lambda{} and proc{} do not create the same kind of Proc instance
quaristice has joined #ruby
mrtomme has quit [Ping timeout: 246 seconds]
carraroj has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros> lambda{||} == ->(){}, but lambda{} != proc{} (.lambda? will differ, and the behavior too)
Z00t has quit [Ping timeout: 256 seconds]
<apeiros> and I believe Proc.new {} == proc {}
<apeiros> all of this is for 1.9+, pre 1.9, it was different yet again
mdw has quit [Ping timeout: 276 seconds]
mrtomme has joined #ruby
<ljarvis> :)
zotherstupidguy has joined #ruby
norc has quit [Ping timeout: 252 seconds]
<mfb2> Hello everyone -- n00b question: I'm trying to declare an object array, but ruby keeps treating the elements as strings for some reason
<Bish> replacements['fields'].tap do |s| <= modifications to this don't get to the original
<mikecmpbll> mfb2: code? :)
<Bish> (s is a string and i am using s+=)
<mfb2> ^^ code
<mikecmpbll> mfb2: so `datasource` is a string?
yb_drowe has joined #ruby
<volty> ARGV members are strings
<mfb2> No -- it is a class, getting that into the gist as well
<mfb2> yes -- I'm attempting to use a factory-like pattern to generate the appropriate subclass based on the args passed to the script
<mikecmpbll> mfb2: datasources will be an array of whatever `datasource` is.
KineticX has quit []
<mikecmpbll> that code doesn't show any debugging about why you think they're strings.
<mfb2> Just updated the gist with the datasource.rb class
aegis3121 has joined #ruby
<Mon_Ouie> Also determine_datasources returns ARGV
<ljarvis> Bish: no, += doesn't mutate
<ljarvis> Bish: << does
<mikecmpbll> Mon_Ouie : oh yeah
<mikecmpbll> :D
arup_r has joined #ruby
<ljarvis> well
<ljarvis> that's not true exactly
<ljarvis> but for this scenario it is :D
<mfb2> OH-- that's it
<Bish> ljarvis: mutate? i checked object_ids, and they were the same, it think
<mfb2> yep, it's returning ARGV
<ljarvis> Bish: basically, << will work here
<mfb2> that was what I believe I was missing!!
<Bish> yeah but i always gotta understand
<mfb2> Yep that was totally it -- thank you!!!!! :-)
pandaant has joined #ruby
<Bish> >> x = "p";y = x+="yo";[x.object_id,y.object_id]
<ruboto_> Bish # => [540088250, 540088250] (https://eval.in/500511)
<mfb2> #ruby is filled with awesome nice people
<Bish> >> x = "p";y = x+="yo";[x.object_id,y.object_id,x,y]
<ruboto_> Bish # => [540876780, 540876780, "pyo", "pyo"] (https://eval.in/500512)
iateadonut has left #ruby [#ruby]
ProbabilityDist has quit [Ping timeout: 255 seconds]
nerfando has joined #ruby
danron has joined #ruby
GGMethos has joined #ruby
nerfando has quit [Max SendQ exceeded]
<Mon_Ouie> But the original string reference to be x hasn't but mutated and has a different object id
<Bish> yeah i figured
<Mon_Ouie> (Try printing x.object_id before the second line)
nerfando has joined #ruby
<Bish> >> x = "p";original_id=x.object_id;y = x+="yo";[x.object_id,y.object_id,x,y,original_id]
<ruboto_> Bish # => [547119020, 547119020, "pyo", "pyo", 547119040] (https://eval.in/500520)
<Bish> i see i see
mchu has joined #ruby
arup_r has quit [Ping timeout: 272 seconds]
govg has joined #ruby
roger_rabbit has joined #ruby
shredding has joined #ruby
GGMethos has quit [Excess Flood]
karapetyan has quit []
acke_ has quit [Remote host closed the connection]
karapetyan has joined #ruby
j_mcnally has joined #ruby
Z00t has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
phreakocious has quit [Ping timeout: 276 seconds]
El3ktra has quit [Ping timeout: 276 seconds]
arup_r has joined #ruby
phreakocious has joined #ruby
hxegon has joined #ruby
<volty> what should be the supposed sense of Enumerable.select without block ?
circ-user-bTzyK has joined #ruby
<volty> (or could)
circ-user-bTzyK has quit [Client Quit]
jackcom has left #ruby [#ruby]
karapetyan has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 264 seconds]
<Mon_Ouie> >> [0, 1, 5, 3].select.with_index { |x, i| x == i }
theta888 has joined #ruby
<ruboto_> Mon_Ouie # => [0, 1, 3] (https://eval.in/500541)
<Mon_Ouie> volty: ^ it returns an Enumerator
yb_drowe has quit [Quit: Zzzzzzz....]
circ-user-hOXbS has joined #ruby
ferr has joined #ruby
lubekpl has joined #ruby
DEA7TH has joined #ruby
<volty> I know what it returns. I am just asking what would you need it for.
<volty> >> [0, 1, 5, 3].to_enum.with_index
<ruboto_> volty # => #<Enumerator: #<Enumerator: [0, 1, 5, 3]:each>:with_index> (https://eval.in/500542)
Sucks has joined #ruby
hakunin has quit [Remote host closed the connection]
<Mon_Ouie> I showed an example, chaining it with #with_index is an example of what enumerators can be used for
danron has quit [Ping timeout: 264 seconds]
sftrabbit has quit [Quit: sftrabbit]
<volty> yap, thx, but I was asking just about Enumerable.select without block. To me it seems redundant because you select nothing (no filtering there)
atomical_ has joined #ruby
<volty> (nothing = all pass)
Vertroa has joined #ruby
skade has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
<lucasb> the enumerator returned still works as a selector, so one use could be to delay the selection further in the code
El3ktra has joined #ruby
<volty> lucasb: they all pass, no selection without block
circ-user-hOXbS has quit [Quit: circ-user-hOXbS]
sepp2k has quit [Quit: Leaving.]
<volty> where to post code/proposal ?
<lucasb> [1,2,3].select.each {|x| x.odd? } #<-- this still selects the odd ones
atomical has quit [Ping timeout: 276 seconds]
skade has joined #ruby
<volty> >> [1,2,3].select.each { |x| x.odd? }.class
<ruboto_> volty # => Array (https://eval.in/500548)
lacuna has joined #ruby
<volty> imho it's bit messy
Xeago has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
chrisandrewcl has joined #ruby
<theta888> I'm having a hell of a time trying to match an IPv4 address in a string, I've been trying to use the regex from safari books site
rkazak has joined #ruby
<adaedra> ?rubular
<ruboto_> I don't know anything about rubular
psy_ has joined #ruby
dlitvak_ has quit [Ping timeout: 260 seconds]
<adaedra> !fact mk rubular You can experiment ruby regular expressions with rubular.com
colegatron has quit [Ping timeout: 240 seconds]
<ruboto_> adaedra, I will remember that rubular is You can experiment ruby regular expressions with rubular.com
<adaedra> theta888: ^
<theta888> thanks! I'll give that a try
<domgetter> and at https://regex101.com/ they give nice little explanations of pieces of a regex
mdw has joined #ruby
chouhoulis has joined #ruby
sftrabbit has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has quit []
carraroj has quit [Ping timeout: 260 seconds]
ferr has quit [Ping timeout: 246 seconds]
graphettion has joined #ruby
aufi has quit [Quit: Konversation terminated!]
ror15 has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
llfwf33 has joined #ruby
<ljarvis> theta888: I think IPAddr could help with that?
pdoherty has joined #ruby
<ror15> Why am I getting this error? undefined method `<' for false:FalseClass
kappy has quit [Quit: Lost terminal]
<adaedra> ?code
<ruboto_> We can't help you without your code, please post it to https://gist.github.com
<theta888> ljarvis I looked into that, not quite what i need
RTG` has quit [Ping timeout: 264 seconds]
<lucasb> theta888: idk if that's what you want: '127.0.0.1' =~ Regexp.new((['\d{1,3}'] * 4).join('\.'))
<theta888> im parsing log files and need to print any IPs
aganov has quit [Remote host closed the connection]
rkazak has quit [Ping timeout: 255 seconds]
RTG` has joined #ruby
<theta888> thanks lucasb that's perfect!
lubekpl has joined #ruby
guardian has quit [Quit: Coyote finally caught me]
guardian has joined #ruby
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stevenxl has joined #ruby
stevenxl has joined #ruby
dlitvak has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axsuul has quit [Ping timeout: 276 seconds]
<volty> yesterday I was playing with enumeration on conditions. https://gist.github.com/anonymous/b8eec52d81be94eac7e0
gregf has joined #ruby
crankharder has joined #ruby
<volty> enum_block could be called inject_block, maybe
bensarz has joined #ruby
smactive has joined #ruby
<volty> hints / suggestion ?
<volty> s
roshanavand has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
gagrio has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
GGMethos has joined #ruby
<adaedra> ror15: what's correct_guess and correct_answer? What is the full error? Also, if you put a file extension (i.e. .rb) in the filename field, you get syntax coloring, which is nicer to read.
stevenxl has quit [Client Quit]
<adaedra> er, just correct_answer actually.
stevenxl has joined #ruby
stevenxl has joined #ruby
<Mon_Ouie> volty: Do you know about Enumerable#lazy?
djbkd has joined #ruby
ferr has joined #ruby
<volty> Mon_Ouie: yes, going to re-read. What about enum_block ?
B1n4r10 has quit [Ping timeout: 246 seconds]
<ror15> Updated the gist
smactive has quit [Ping timeout: 265 seconds]
<adaedra> ror15: your correct_answer method return a boolean (true/false), which have no < or > operations. You can't compare booleans.
<Mon_Ouie> Not sure what you're looking for. It can be rewritten using each_with_object though.
<volty> Mon_Ouie: no, it cannot, I tried it yesterday
<Mon_Ouie> each_with_object(y, &block)
<volty> yes, but when you have an open resource, to pass from within a block, it doesn't work
<ror15> Oh I see. how do I get it to pass a test where @correct_answer = guess == answer
<ror15> I'm not sure how to write the method
<Mon_Ouie> Any example?
JDiPierro has quit []
colegatron has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<volty> the example is there, under comments (TagLib::FileRef ...)
<adaedra> ror15: I'm not sure to see what you want to do.
<ror15> adaedra: I'd like correct_answer to be true when guess == answer
djbkd has quit [Ping timeout: 240 seconds]
<ror15> adaedra: But then be able to put a less than, greater than comparison to correct_guess and guess
<volty> Enumerator.lazy.select { .... } eliminates the need for lazy_select, but Enumerable.select without block is not coherent (imho)
maikowblue has joined #ruby
<Mon_Ouie> Why not?
roshanavand has joined #ruby
<volty> I answered above - because when chaining you lose the Enumerator (lazy enumeration) and get Array
yb_drowe has joined #ruby
sftrabbit has joined #ruby
<Mon_Ouie> You can do lazy.select.with_index if you want lazy enumeration
aadam21_ has joined #ruby
sandstrom has joined #ruby
<Mon_Ouie> Oh nevermind, you cannot
yb_drowe has quit [Max SendQ exceeded]
mistermocha has joined #ruby
lucasb has quit [Quit: leaving]
<volty> It's what I said. Look, never mind. I am not in mood to argue. I need that piece of enum_block. If there are smart coders that need it, or think it could be useful to include in Enumerable (call it inject_block), nice, if not nothing
<Mon_Ouie> You can do enum_for(:select).with_index though, not sure why it's not done automatically
karapetyan has joined #ruby
northfurr has joined #ruby
aadam21 has quit [Ping timeout: 240 seconds]
A124 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
skade has quit [Ping timeout: 276 seconds]
einarj has quit [Remote host closed the connection]
Gnut has joined #ruby
[Butch] has joined #ruby
gambl0re has quit [Read error: Connection reset by peer]
SCHAAP137 has quit [Remote host closed the connection]
carraroj has joined #ruby
karapetyan has quit [Ping timeout: 250 seconds]
northfurr has quit [Client Quit]
hxegon has quit [Quit: PEACE OUT]
<volty> >> [1,2,3,4].enum_for(:select).with_index.each { |v| v.even? }.class
<ruboto_> volty # => Array (https://eval.in/500550)
<Mon_Ouie> Forgot #lazy
<volty> but I was talking about Enumerable.select without block, MAN
roshanavand has joined #ruby
ferr has quit [Ping timeout: 256 seconds]
<volty> show me an example where you use Enumerable.select and get, after giving it later a condition block, you end up with an Enumerator
<Mon_Ouie> >> [1,2,3,4].lazy.enum_for(:select).with_index.each { |v| v.even? }.class
<volty> again
<volty> !
<volty> bye !!!
<Mon_Ouie> >> [1,2,3,4].lazy.enum_for(:select).with_index.each { |v| v.even? }.class
<ruboto_> Mon_Ouie # => Enumerator::Lazy (https://eval.in/500551)
musl has joined #ruby
<volty> I just hope that somebody doesn't accuse me of overreacting when answering by rhyme to trollers & provokers
<mchu> hey guys what does the “ ||= “ mean in
<mchu> current_chapter ||= current_user.chapter if current_user
<ljarvis> volty: what are you talking about?
<Mon_Ouie> mchu: It sets current_chapter to current_user.chapter if current_chapter is currently set to nil or false
<volty> ljarvis: nothing, if you didn't already get it
roshanavand has quit [Ping timeout: 240 seconds]
lucasb has joined #ruby
<mchu> thank you
<volty> a ||= b == a = a || b
Rickmasta has joined #ruby
<Mon_Ouie> Not when a is actually something like 'a.foo'
skade has joined #ruby
slawrence00 has joined #ruby
elaptics is now known as elaptics`away
<havenwood> volty: rather: a || a = b
jbrhbr has joined #ruby
p8m has joined #ruby
jondot has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has quit [Ping timeout: 240 seconds]
sepp2k has joined #ruby
<volty> havenwood: right, thx
<volty> sorry
nettoweb has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak_ has joined #ruby
roshanavand has joined #ruby
<havenwood> volty: no need for apology, just a nit!
davedev24 has joined #ruby
<havenwood> volty: Fun to compare with RubyVM::InstructionSequence.
<adaedra> ror15: what do you want to compare? You can't compare booleans.
<lucasb> I don't get it. what's the difference between 'a = a || b' and 'a || a = b' ?
<ror15> adaedra: I took out the boolean comparison since that isn't a thing. Comparing guess and answer now works. I was just thinking about it incorrectly. Thanks for the input:)
dlitvak has quit [Ping timeout: 276 seconds]
<lucasb> intuitively they look the same to me, but I think I'm missing some detail
<Mon_Ouie> lucasb: Consider the case where a is actually some_object.some_field
<havenwood> lucasb: With the former `a` is always reassigned even it it exists.
symm- has joined #ruby
<Mon_Ouie> In that case, with some_object.some_field = some_object.some_field || b'… ^
babblebre has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev24 has quit [Ping timeout: 255 seconds]
<Mon_Ouie> A common case where this can be noticed is when you have a Hash with a default value (like Hash.new(0))
roshanavand has quit [Ping timeout: 260 seconds]
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
AckZ has quit []
mdw has quit [Quit: Sleeping Zzzzz]
<lucasb> so... the only difference is that 'obj.attr = obj.attr' may have some side effect? since attributes assignment are really method calls?
northfurr has joined #ruby
<volty> >> class Test; attr_accessor :x; end; t = Test.new; t.x || t.x = 3; t.x
<ruboto_> volty # => 3 (https://eval.in/500554)
<Mon_Ouie> Yes
<volty> >> class Test; attr_accessor :x; end; t = Test.new; t.x = t.x || 3; t.x
<ruboto_> volty # => 3 (https://eval.in/500555)
<volty> i messed something
<lucasb> ah, ok. thanks Mon_Ouie, havenwood!
TomyWork has quit [Ping timeout: 246 seconds]
aegis3121 has joined #ruby
<volty> >> class Test; attr_accessor :x; end; t = Test.new; .t.x = 3; t.x = t.x || 3; t.x
<ruboto_> volty # => /tmp/execpad-47729dba9caf/source-47729dba9caf:2: syntax error, unexpected '.', expecting keyword_end ...check link for more (https://eval.in/500556)
<volty> (diff by real example)
quaristice has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has joined #ruby
<volty> >> class Test; attr_accessor :x; end; t = Test.new; t.x = 3; t.x = t.x || 3; t.x
<ruboto_> volty # => 3 (https://eval.in/500558)
northfurr has quit [Client Quit]
mistermocha has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 260 seconds]
<bruce_lee> \(^_^)/ @all
<mchu> what does this error mean?
<volty> mah, nevermind. got tired
<mchu> undefined method `empty?' for 1:Fixnum
<aegis3121> it means the method "empty?" isn't defined for the FixNum class.
<ljarvis> mchu: it means 1 -- an instance of Fixnum does not implement the method "empty?"
jacyzon has quit [Quit: Connection closed for inactivity]
<havenwood> >> 42.empty?
<ruboto_> havenwood # => undefined method `empty?' for 42:Fixnum (NoMethodError) ...check link for more (https://eval.in/500559)
roshanavand has joined #ruby
<Mon_Ouie> Which in turns means you have an integer where you were expecting some other kind of object
<aegis3121> In pure Ruby #empty? is only defined for Array (I believE)
<ljarvis> ENV and Hash both define it
<mchu> Mon_Ouie: so.. im getting an integer instead of an object?
<Sou|cutter> or Hash or Set
<aegis3121> Okay, those too :)
<ljarvis> and other stuff in stdlib
<ljarvis> but yeah
B1n4r10 has joined #ruby
<aegis3121> Collections
roshanavand has quit [Remote host closed the connection]
<ljarvis> :)
<bruce_lee> I'm new to ruby, how can I find out the width of the current terminal? I tried "require 'terminal-size'", but this doesn't work when pipe something to my ruby-script
<aegis3121> (roughly)
roshanavand has joined #ruby
Xeago has joined #ruby
<bruce_lee> anybody a hint?
<ljarvis> aegis3121: and String (which is arguably a collection)
<ljarvis> bruce_lee: Terminfo
<Mon_Ouie> No, Integers are a kind of objects, but you can't ask if an integer is #empty?
<havenwood> aegis3121: String, Array, Hash, Thread::Queue, OptionParser::CompletingHash, OptionParser::OptionMap
<ljarvis> bruce_lee: or shell out to unix
<aegis3121> You can ask one if its nil
<volty> havenwood: RubyVM::InstructionSequence sometime in the future, now I am trying to tweak some smoke (lib) for c++ extensions and qtbindings. btw, for info, i reinstalled nokogiri with system libs, but it always crashes when used with qtbindgins. the good is that it crashes only at the exit, when the qt application gets destroyed.
<aegis3121> >> 1.nil?
<ruboto_> aegis3121 # => false (https://eval.in/500560)
<aegis3121> havenwood thanks!
brendan- has joined #ruby
<bruce_lee> ljarvis: what is "shell out to unix"? I'm on fedora...
echelon has joined #ruby
<bruce_lee> fedora 19
<echelon> hey, if json is a std lib, why does it say to do a gem install here.. http://flori.github.io/json/
<havenwood> >> require 'io/console'; STDIN.winsize
<ruboto_> havenwood # => Inappropriate ioctl for device (Errno::ENOTTY) ...check link for more (https://eval.in/500561)
<lucasb> bruce_lee: maybe ENV['COLUMNS'], but I think that's not reliable, since it may not be set in some environments
solars has joined #ruby
saneax_AFK is now known as saneax
<havenwood> bruce_lee: ^
axsuul has joined #ruby
j_mcnall_ has joined #ruby
<ljarvis> ah forget about io/console
<havenwood> bruce_lee: STDIN.winsize
j_mcnally has quit [Ping timeout: 250 seconds]
<ljarvis> i remember it's pretty nice
saneax is now known as Guest8334
<echelon> do i need to do gem install json, to use json, or should it already packaged with ruby
<echelon> be*
<bruce_lee> ok, these are a lot of hints, I need to duckDuckGo them, thanks @everybody
<Mon_Ouie> It's part of stdlib so it should be installed already
einarj has joined #ruby
BTRE has quit [Quit: Leaving]
<mchu> so im getting an error the “undefined method ‘empty?
<mchu> for 1:fixnum for this line
<mchu> %a{href: incidents_chapter_root_path(current_chapter)}
<mchu> im very confused
<havenwood> bruce_lee: Alternatively: require 'readline'; Readline.get_screen_size
mistermocha has joined #ruby
dwfait has quit [Remote host closed the connection]
aegis3121 has quit [Ping timeout: 272 seconds]
mistermocha has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
mistermocha has joined #ruby
andikr has quit [Remote host closed the connection]
wldcordeiro has quit [Ping timeout: 240 seconds]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bubbys has quit [Ping timeout: 276 seconds]
JohnT has joined #ruby
<lucasb> bruce_lee: Alternatively still: require 'curses'; Curses.cols # :)
amclain has joined #ruby
synthroid has quit [Remote host closed the connection]
harai54 has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
n0xff has joined #ruby
drptbl_ has quit [Quit: My MAC has gone to sleep. zZz..]
aadam21_ has quit [Remote host closed the connection]
<ljarvis> inb4 alternatively
harai54 has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: Leaving]
Snowy has quit [Remote host closed the connection]
aadam21 has joined #ruby
aadam21 has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aadam21 has joined #ruby
aadam21 has quit [Read error: Connection reset by peer]
Vertroa has joined #ruby
Snowy has joined #ruby
mark3 has quit [Remote host closed the connection]
<bruce_lee> my script works if executed like "./test.rb" but it doesn't work if piped like "echo fisch | test.rb", the script: https://gist.github.com/anonymous/8b6495910a037a27ab84
shredding has quit [Ping timeout: 276 seconds]
aadam21 has joined #ruby
howdoicomputer has joined #ruby
<bruce_lee> sorry, only "puts STDIN.winsize" works if called like "./test.rb"
karapetyan has joined #ruby
nettoweb has joined #ruby
<volty> of course, there's no win in a pipe
Vertroa has quit [Client Quit]
dhollinger has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
Vertroa has joined #ruby
<bruce_lee> "require 'terminal-size'" works too, but not if piped
nettoweb has quit [Max SendQ exceeded]
skade has quit [Read error: Connection reset by peer]
tuor has joined #ruby
<volty> bruce_lee: you should try to trick it. call an external script that doesn't read from pipe
zotherstupidguy has quit [Quit: WeeChat 1.3]
nettoweb has joined #ruby
Snowy has quit [Ping timeout: 245 seconds]
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis> bruce_lee: just use tput if you have it available
<ljarvis> bruce_lee: p `tput cols`
<ljarvis> that'll work with tty attached or not
howdoicomputer has quit [Ping timeout: 246 seconds]
karapetyan has quit [Ping timeout: 272 seconds]
bensarz has quit [Quit: Textual IRC Client: www.textualapp.com]
bensarz has joined #ruby
bubbys has joined #ruby
<bruce_lee> ljarvis: thanks, tput works if piped, it returns: "142\n"
<ljarvis> yep
chry has quit [Quit: WeeChat 1.3]
edwinvdgraaf has quit [Ping timeout: 240 seconds]
dwfait has joined #ruby
<volty> but, just curious, will it work if the output is redirected too?
pengin has quit [Remote host closed the connection]
wldcordeiro has joined #ruby
llfwf33 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bruce_lee> how to get the height of a terminal if piped?
BTRE has joined #ruby
dwfait has quit [Remote host closed the connection]
okbutwhy has joined #ruby
<bruce_lee> "require 'terminal-size'" gives me the height, but not if piped
<bruce_lee> :)
<ljarvis> bruce_lee: the same command... but "rows" and not cols
<ljarvis> c'mon
<ljarvis> er
<ljarvis> now rows
<ljarvis> not
<Mon_Ouie> tput: unknown terminfo capability 'rows'
<bruce_lee> volty: the following command returns me the width: echo fisch | test.rb | cat
<Mon_Ouie> tput lines :p
codecop has joined #ruby
<ljarvis> lines
<ljarvis> yeah
<ljarvis> bleh
<ljarvis> i always forget that
p337rB has joined #ruby
zast has joined #ruby
underplank has joined #ruby
<bruce_lee> I was confused, I got it, \(^_^)/, thanks @everybody
<ljarvis> im so glad that doesn't work
<ljarvis> (@everybody)
RTG` has quit [Ping timeout: 260 seconds]
jbrhbr has quit [Quit: Leaving.]
krz has quit [Quit: WeeChat 1.2]
webus has quit [Ping timeout: 260 seconds]
Bloomer has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
underplank has quit [Client Quit]
davedev24 has joined #ruby
codecop has quit [Ping timeout: 260 seconds]
carraroj has quit [Ping timeout: 245 seconds]
webus has joined #ruby
scripore has joined #ruby
underplank has joined #ruby
sonOfRa has quit [Quit: Bye!]
siaw has joined #ruby
sonOfRa has joined #ruby
mdw has joined #ruby
ferr has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
BTRE has quit [Remote host closed the connection]
duckpupp1 has quit [Ping timeout: 272 seconds]
bweston92 has quit [Quit: Leaving]
BTRE has joined #ruby
davedev2_ has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Ping timeout: 255 seconds]
dmr8 has quit [Ping timeout: 240 seconds]
synthroid has joined #ruby
agit0 has joined #ruby
<shevy> bruce_lee is back coding things and smashing things!
<atomical_> yay
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
dwfait has joined #ruby
lacuna has quit [Remote host closed the connection]
<mchu> hey guys, what does this error mean? “ undefined method `+' for nil:NilClass ”
dwfait has quit [Remote host closed the connection]
<apeiros> mchu: it means you do `nil + …`
<ljarvis> :/
<apeiros> (where nil may be the value in a variable or the result of an expression)
<ljarvis> these error messages are quite explanatory
ror15 has joined #ruby
davedev24 has joined #ruby
<apeiros> ljarvis: given the frequency such questions come up seem to indicate the contrary :-|
<apeiros> but we could make a page "common ruby exceptions explained"
andikr has joined #ruby
<apeiros> in ruby-community
<mchu> my apologies
<ljarvis> yeah I guess, I feel like they're explanatory once you've learned how objects and methods work
mrgrieves has quit [Ping timeout: 276 seconds]
<ljarvis> mchu: basically, x + 1 is the same as x.+(1) -- + is just a method. You're calling that method on nil, which doesn't support it
underplank has quit [Ping timeout: 246 seconds]
UtkarshRay has quit [Ping timeout: 264 seconds]
benlieb has joined #ruby
<mchu> oh i see. yeah i was just a confused why the `+’
<ljarvis> >> 1.+(1)
dlitvak_ has quit [Ping timeout: 272 seconds]
<ruboto_> ljarvis # => 2 (https://eval.in/500594)
<apeiros> ljarvis: a lot of people have trouble understanding that the `nil:NilClass` is essentially "#{subject.inspect}:#{subject.class}"
<apeiros> +additionally
sigurding has quit [Quit: sigurding]
<ljarvis> ah ok
<ljarvis> interesting
sh1rt has joined #ruby
davedev24 has quit [Ping timeout: 255 seconds]
<apeiros> at least IME
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
<ljarvis> I agree that Ruby exceptions could be better, but they're not too bad either
<ljarvis> Elixir does this well imo
Vertroa_ has joined #ruby
<apeiros> I find ruby exceptions quite good given the medium
<ljarvis> Prolog does it best :)
<ljarvis> yep
jschmid has quit [Ping timeout: 240 seconds]
<apeiros> but you have to take a couple of minutes when you "meet" them the first time and understand, how they're structured.
<apeiros> and plenty of people sadly fail there.
<apeiros> or as you said, lack the understanding of ruby's object & method model
codecop has joined #ruby
Vertroa has quit [Ping timeout: 265 seconds]
sergey_makagon has quit []
<volty> imho it has more to do with understanding the classifications in general, before oo aspects in general — enough to think that you cannot send :fly to an elephant, or :dive to a flower
<ljarvis> clearly someone hasn't seen Dumbo
<apeiros> nor groot
<apeiros> though groot is more a tree than a flower :)
<volty> yes but Dumbo is a [particular] specialization :)
<volty> alteration
<ljarvis> def elephant.fly; ...
<volty> like
<volty> >> NilClass.send(:define_method, '+' ) { |other|[self, other] }; p nil + 3
<ruboto_> volty # => [nil, 3] ...check link for more (https://eval.in/500595)
<volty> mchu: do not do that :)
aryaching has quit [Ping timeout: 260 seconds]
blackoperat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
JakFrist has joined #ruby
mrgrieves has joined #ruby
davedev24 has joined #ruby
jondot has joined #ruby
jbrhbr has joined #ruby
<volty> a 'portable' tput : require 'io/console'; puts (STDIN.winsize + [''])[%w/lines cols \\/.index(ARGV[0]) || 2]
sdothum has joined #ruby
dlitvak has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
sh1rt has quit [Remote host closed the connection]
<shevy> ewww
howdoicomputer has joined #ruby
echelon has left #ruby [#ruby]
pietr0 has joined #ruby
djbkd has joined #ruby
chimche1 has quit [Quit: Leaving.]
lacuna has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
<volty> ops extra //, require 'io/console'; puts (STDIN.winsize + %w//)[%w/lines cols/.index(ARGV[0]) || 2]
davedev24 has joined #ruby
SenpaiSilver has joined #ruby
antgel has quit [Ping timeout: 256 seconds]
<ljarvis> wat
<jbrhbr> happy monday
dlitvak has quit [Remote host closed the connection]
<volty> sorry, wrong, %w// -> ['']
stamina has quit [Ping timeout: 260 seconds]
blaxter has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 276 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
<shevy> it's too ugly!
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
<lucasb> why append an empty array?
einarj has quit [Remote host closed the connection]
duckpupp1 has joined #ruby
<volty> lucasb: it was a mistake, should be ['']
troulouliou_div2 has quit [Quit: Leaving]
<lucasb> ah, ok
<volty> shevy: try to beautify :)
jas02 has quit [Quit: jas02]
<volty> put some asterisk around ? :)
lacuna has quit [Read error: Connection reset by peer]
agentmeerkat has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
lacuna has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
ta has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
davedev24 has joined #ruby
TheMoonMaster is now known as blake
robbyoconnor has joined #ruby
robbyoconnor has quit [Client Quit]
robbyoconnor has joined #ruby
chimche has joined #ruby
sh1rt has joined #ruby
sh1rt has quit [Changing host]
sh1rt has joined #ruby
whippythellama has quit [Ping timeout: 264 seconds]
ror15 has left #ruby [#ruby]
roshanavand has quit [Ping timeout: 260 seconds]
axsuul has quit [Read error: Connection reset by peer]
aphprentice has joined #ruby
axsuul has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
pawnbox has quit [Read error: Connection reset by peer]
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has joined #ruby
RTG` has joined #ruby
phantummm has joined #ruby
ajf- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axsuul has quit [Read error: Connection reset by peer]
guacamole has joined #ruby
axsuul has joined #ruby
TomyLobo has joined #ruby
Z00t has quit [Ping timeout: 246 seconds]
<zacts> what is the name of the github tutorial for ruby?
<zacts> for learning ruby
akkad has quit [Excess Flood]
Xeago has quit [Remote host closed the connection]
<C0deMaver1ck> ruby koans?
bluOxigen has quit [Ping timeout: 264 seconds]
dlitvak has joined #ruby
jxs_ has joined #ruby
akkad has joined #ruby
bronson has joined #ruby
Vertroa_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Remote host closed the connection]
Vertroa has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
howdoicomputer has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
agit0 has quit [Quit: zzzZZZ….]
arup_r has quit []
davedev24 has joined #ruby
solars has quit [Ping timeout: 250 seconds]
chimche has quit [Quit: Leaving.]
Hounddog has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
gheegh has quit [Ping timeout: 246 seconds]
tulak has quit []
stevenxl has quit [Ping timeout: 240 seconds]
Mirry has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
chimche has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
ta has joined #ruby
axsuul has joined #ruby
duckpupp1 is now known as duckpuppy
stannard has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 260 seconds]
mostlybadfly has joined #ruby
mikecmpbll has joined #ruby
davedev2_ has joined #ruby
davedev24 has quit [Ping timeout: 255 seconds]
llfwf33 has joined #ruby
dionysus69 has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
axsuul has joined #ruby
howdoicomputer has joined #ruby
lemur has joined #ruby
lemur has quit [Remote host closed the connection]
sgambino has joined #ruby
sarkis has quit [Ping timeout: 255 seconds]
jbrhbr has quit [Quit: Leaving.]
lemur has joined #ruby
davedev2_ has quit [Ping timeout: 250 seconds]
dlitvak has joined #ruby
zast has quit [Remote host closed the connection]
jeff_laplante has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
llfwf33 has quit [Client Quit]
axsuul has joined #ruby
axsuul has quit [Max SendQ exceeded]
stannard has joined #ruby
axsuul has joined #ruby
gambl0re has joined #ruby
postmodern has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
tvw has quit [Remote host closed the connection]
mntnman has joined #ruby
sarkis has joined #ruby
firstdayonthejob has joined #ruby
dlitvak has quit [Remote host closed the connection]
jbrhbr has joined #ruby
futilegames has joined #ruby
tvw has joined #ruby
ta has quit [Remote host closed the connection]
stamina has joined #ruby
mchu has quit [Quit: mchu]
jxs_ has quit [Ping timeout: 246 seconds]
benlieb has quit [Quit: benlieb]
dlitvak has joined #ruby
benlieb has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
blackmes1 has joined #ruby
aibot has quit [Remote host closed the connection]
sh1rt has quit [Quit: WeeChat 1.3]
aibot has joined #ruby
lemur has quit [Remote host closed the connection]
ajf- has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
lemur has joined #ruby
Xeago_ has joined #ruby
tvw has quit [Ping timeout: 255 seconds]
ajf- has quit [Client Quit]
allcentury has joined #ruby
jgpawletko has joined #ruby
lemur has quit [Remote host closed the connection]
<zacts> nice
<zacts> cool nick too
axsuul has quit [Read error: Connection reset by peer]
Renich has joined #ruby
davedev24 has joined #ruby
djbkd has joined #ruby
axsuul has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
Xeago has quit [Ping timeout: 276 seconds]
zeroDivisible has joined #ruby
tvw has joined #ruby
<shevy> haha
axsuul has joined #ruby
aryaching has joined #ruby
Gnut has quit [Ping timeout: 264 seconds]
howdoicomputer has quit [Ping timeout: 250 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bb010g has joined #ruby
FernandoBasso has quit [Quit: Leaving]
axsuul has quit [Read error: Connection timed out]
axsuul has joined #ruby
Gnut has joined #ruby
pdoherty has quit [Ping timeout: 264 seconds]
kalopsian has joined #ruby
djbkd has quit [Ping timeout: 264 seconds]
harai54 has joined #ruby
shadoi has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
davedev24 has quit [Ping timeout: 255 seconds]
bensarz has quit [Quit: Textual IRC Client: www.textualapp.com]
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
kalopsian has quit [Ping timeout: 250 seconds]
lemur has joined #ruby
whippythellama has joined #ruby
dlitvak has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
harai54 has quit [Ping timeout: 240 seconds]
duckpuppy has quit [Ping timeout: 240 seconds]
domgetter has joined #ruby
Renich has quit [Ping timeout: 272 seconds]
Xeago_ has quit [Ping timeout: 250 seconds]
harai54 has joined #ruby
Renich has joined #ruby
malice has joined #ruby
siaw has quit [Quit: siaw]
iamnix has joined #ruby
argentdrake has joined #ruby
stevenxl has joined #ruby
<argentdrake> Hello fellow rubysmiths!
emilkarl has joined #ruby
davedev24 has joined #ruby
lipoqil has quit [Quit: Connection closed for inactivity]
huyderman has quit [Ping timeout: 250 seconds]
dlitvak_ has joined #ruby
blackmes1 has quit [Ping timeout: 250 seconds]
<shevy> hey that is a silver drake right
ta has joined #ruby
pawnbox has quit [Remote host closed the connection]
<malice> Hello! I am trying to write some Ruby code - I'm beginner. Here's my code: http://ix.io/nkF
<malice> Each time I try calling x(2), repl.it freezes. Why? What's wrong with the code?
gregf has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
DoubleMalt has quit [Remote host closed the connection]
chrisandrewcl has quit [Read error: Connection reset by peer]
dmr8 has joined #ruby
mrgrieves has quit [Remote host closed the connection]
<apeiros> malice: uh, nested defines probably don't work the way you expect them to
<apeiros> you shouldn't really ever have a def within a def.
<apeiros> and repl.it probably freezes because you use print and not puts. print does not append a newline. and ruby buffers output to full lines.
Lucky__ has joined #ruby
j_mcnall_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> malice: I'd recommend you install ruby locally along with pry. much more comfortable.
nfk|laptop has joined #ruby
dlitvak_ has quit [Remote host closed the connection]
<atomical_> malice: why are you using an instance variable inside a function?
pengin has joined #ruby
<malice> apeiros: I am used to Lisp environment which is very responsive and interactive; I tried using Emacs and irb, but it is way behind
TheHodge has quit [Quit: Connection closed for inactivity]
pengin has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
<malice> atomical_: I wanted the w to be able to access www
<atomical_> is this method part of a class?
<malice> tbh I am translating the code from Python to Ruby, and I just hoped that this would work the way I expect it to work.
Renich has quit [Ping timeout: 264 seconds]
tjohnell has joined #ruby
<malice> code in english ofc
blackmes1 has joined #ruby
<malice> e.g. Python uses tuples, but I think that Ruby's Arrays are as good
ferr has quit [Ping timeout: 272 seconds]
<malice> But I also thought that I could use the nested functions
<tjohnell> Anyone here ever been deep in the Faraday library code?
Renich has joined #ruby
<apeiros> malice: a nested def will not define a private function in ruby
griffindy has joined #ruby
<apeiros> it'll just define a method in the same scope the current method is
failshell has joined #ruby
<apeiros> i.e. you'll have the same effect if you place the def outside (just that it a) will be defined even without running the outer method, and b) doesn't get redefined on each call)
Z00t has joined #ruby
sigurding has joined #ruby
usershel_ has quit [Read error: Connection reset by peer]
<malice> apeiros: So the closest solution I can get is to define a method, and create some "main" function to run all the code, but define variables as member variables?
iamnix is now known as ianix
jbrhbr has quit [Quit: Leaving.]
lemur has quit [Remote host closed the connection]
<apeiros> malice: you could use procs. but really, it's the old "don't write fortran in cobol" adage
cdg has quit [Remote host closed the connection]
usershell has joined #ruby
jbrhbr has joined #ruby
cdg has joined #ruby
<malice> apeiros: tbh defining class looks the most natural way out from the problem in here
SenpaiSilver has quit [Quit: Leaving]
<apeiros> classes are usually the way in ruby
<malice> :)
<malice> Thanks for your help!
podman has joined #ruby
psyq has joined #ruby
<apeiros> from a glance at your python, you can omit the OrderedDict - Hash in ruby is ordered
<lucasb> apeiros: just a note: I think the outer method *must* be run, before the inner method will be defined (right?)
kerunaru has joined #ruby
<apeiros> and the rest - class FooParser, then add all the python functions there, and mark some of them private
mchu has joined #ruby
<apeiros> lucasb: correct
tectonic has joined #ruby
ur5us has joined #ruby
<apeiros> just parsing the outer method won't define the inner.
<apeiros> same as an `if false; def foo; …; end; end` won't define foo
howdoicomputer has joined #ruby
<malice> apeiros: Well I thought so at the beginning, but it uses internals of hash, and for now I just want to re-write the code(and I want the code to work)
<argentdrake> I'm having trouble with hashes, I've generated 1 mil random nums, and I want to put them into a hash using their random nums as keys, if the key already exists, I would like to increment the value at the key so that I may count how many times a number occured. Code available if needed, just figured it was a simple request.
kalopsian has joined #ruby
<malice> so when I get there I will probably get rid of OrderedHash
sftrabbit has joined #ruby
juddey has joined #ruby
<apeiros> argentdrake: always gist what you've done so far, what it does, and what you expected it to do instead ;-)
cdg has quit [Ping timeout: 265 seconds]
pdoherty has joined #ruby
<apeiros> argentdrake: but counting hashes are a common problem and the solution is usually `counter = Hash.new(0); …; counter[item] += 1; …`
nettoweb has joined #ruby
<argentdrake> apeiros: Thank you, i'll look into that ^^
<malice> argentdrake: trie could be more optimal in this case
<apeiros> hm, 2.3 does not have count_by, was that announced for 3.0?
<argentdrake> malice: Never heard of trie, i'll have to look that up
<malice> argentdrake: Not sure if that's in ruby, but should be easy to implement.
Puffball has quit [Remote host closed the connection]
<apeiros> malice: there's no native one in ruby, and a ruby implementation will almost certainly not be wroth it
<lucasb> this closure idiom can be emulated by defining local variables inside a method and return a proc, can't it?
finisherr has joined #ruby
<apeiros> lucasb: emulated where? in what language?
<malice> apeiros: I do not know Ruby well, and it looks like you do; so if you say so, I trust that you know better than me.
Puffball has joined #ruby
vF3hNGxc47h8 has joined #ruby
<lucasb> in Ruby. I mean, iiuc, in Python and Perl, this is common to do. The idiom that malice was trying to do.
<apeiros> malice: objects in ruby are somewhat big and method call overhead kills you. so unless you have an actual algorithmical advantage and a problem which scales, it's rarely worth it
mdw has joined #ruby
<apeiros> -al, apparently :-|
<pizzaops> jackcom: Have you heard of “the internet”?
mfb2 has quit [Remote host closed the connection]
lacuna has quit [Read error: Connection reset by peer]
<apeiros> I wish there were a proper variety of native datastructures in stdlib :-/
lacuna has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<adaedra> apeiros: do a pr.
<cscheib> win 12
mdw has quit [Read error: Connection reset by peer]
<apeiros> adaedra: that'd require me to implement those first natively and sanely :)
<cscheib> grr
<apeiros> and you know how much time I have…
solenoids has quit [Ping timeout: 240 seconds]
<apeiros> would be fun, though
TheAnachron has joined #ruby
<TheAnachron> Hey guys
<TheAnachron> I seem to have some mess with my ruby gems
spider-mario has joined #ruby
mdw has joined #ruby
<TheAnachron> some are in ~/.gem/ruby/2.3.0/gems, some are still in 2.2.0
<TheAnachron> That must have happened on the last ruby/gem update I made.
<adaedra> It's normal.
<TheAnachron> What's the best way to fix this?
<TheAnachron> If I try to run "sup" it will say: Command not found.
<adaedra> Re-install the gems you need in 2.3.
<TheAnachron> ok thanks, I'm kinda new to ruby
<TheAnachron> So I'm quite sure this is a noobish question :P
<adaedra> Gems are tied to ruby ABI version.
<TheAnachron> So can I just delete the old 2.2.0 folder?
mwlang has joined #ruby
<adaedra> If you don't use 2.2 anymore, sure.
momomomomo has joined #ruby
<apeiros> TheAnachron: depending on what you used to install/update ruby, you can actually ask it to update all gems for the new ruby. e.g. with rvm's upgrade command.
<TheAnachron> okay!
<TheAnachron> It seems like my build cancels too now :/
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xeago has joined #ruby
<TheAnachron> ERROR: Error installing sup: ERROR: Failed to build gem native extension.
<TheAnachron> rake failed, exit code 1
<TheAnachron> Wow, thats not very helpful :/
skingsbu has joined #ruby
chipotle_ has quit [Quit: cheerio]
JakFrist has joined #ruby
chipotle has joined #ruby
j_mcnally has joined #ruby
<TheAnachron> apeiros: I've tried to update with gem update but that won't work on this level, since its ruby dependent I guess
<TheAnachron> apeiros: so gem can only update within the same ruby version, right?
<apeiros> gem knows nothing about your other ruby versions, so you're correct, that can't work.
<apeiros> gem update is to update a gem installed for the currently used ruby
<TheAnachron> apeiros: not completely right, if I do "gem env" it actually knows which ruby version I am on :P
<TheAnachron> apeiros: but I am guessing it wont make use of it anywhere in the code.
<apeiros> TheAnachron: I didn't say it knew nothing about your *current* ruby
<apeiros> I said it knows nothing about your *other* rubies.
<TheAnachron> alright.
<TheAnachron> I've come to conclusion to reinstall the dependencies of sup first before trying to install that one again
<TheAnachron> Maybe there was some issues with them which did not pop up
<TheAnachron> going for xapian-ruby
<TheAnachron> Now that worked! Wooohoo.
<TheAnachron> I'm happy again.
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nfk|laptop> i'm using kate right now but is there anything better for editing ruby source code?
<nfk|laptop> open source only, please
weemsledeux has joined #ruby
<pizzaops> So, I’m trying to match against the is_a? value of an object, but when I try to do object.is_a? == ExpectedClass, I get Uninitialized Constant etc etc. In this case the class type is not anywhere in the code so I’m not just missing a require, it’s dynamically generated from the properties of an object.
<TheAnachron> nfk|laptop: Atom, Brackets, LimeText ... Vim
<pizzaops> Is there any way around this?
<pizzaops> FWIW object.is_a? == object.class works
<nfk|laptop> TheAnachron, vim is even worse, especially syntax highlighting wise
<nfk|laptop> as for the rest, thanks, looking into them now
dwefe has joined #ruby
<pizzaops> nfk|laptop: you know you can customize that right...
<TheAnachron> nfk|laptop: how is vim worse in syntax highlighting????
agit0 has joined #ruby
<pizzaops> VIM has fantastic syntax highlighting.
<nfk|laptop> pizzaops, effort
<TheAnachron> nfk|laptop: gain.
<nfk|laptop> i have better things to do than try haggling with vim
sarkis has quit [Ping timeout: 240 seconds]
<pizzaops> “haggling"
aegis3121 has joined #ruby
<pizzaops> Just install Janus if you want to be lazy, and you’ll get what you want.
<TheAnachron> He really is a GUI power user :p
gregf has joined #ruby
<pizzaops> It’s a curlbash, and adds a ton of features to v im.
<nfk|laptop> would struggling or fighting sound better?
<adaedra> This smells editors war.
<pizzaops> adaedra: we’re not telling them to use VIM, just that vim doesn’t have bad syntax highlighting :)
<Ox0dea> nfk|laptop: Could you at least take a moment to justify your as yet unsubstantiated claim that Vim's syntax highlighting is bad?
<pizzaops> I don’t care what nfk|laptop uses.
lemur has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<adaedra> pizzaops: thanks for the confirmation.
futilegames has left #ruby [#ruby]
stevenxl has quit [Quit: leaving]
<nfk|laptop> TheAnachron, i was doing file management with coreutils and writing tutorials on CLI 12 years ago and now I'm old enough to be using a graphical text editor, keep your 1337 opinions to yourself
mfb2 has joined #ruby
dlitvak has joined #ruby
<TheAnachron> nfk|laptop: I use both Vim and Sublime Text 3.
<TheAnachron> nfk|laptop: Just because I suggest you as VIM of ONE of the OPTIONS you dont need to say such things ok!
<pizzaops> oh god. time to mute nfk|laptop
art-solopov has joined #ruby
<adaedra> Ok everyone, move that to -offtopic and come back to ruby.
ta has quit [Remote host closed the connection]
<TheAnachron> I never left ruby <3 :D
<pizzaops> I’m so glad I can’t see whatever’s being said, now.
mdw has quit [Read error: Connection reset by peer]
<Ox0dea> pizzaops: You're missing out.
<pizzaops> I think I’ll be fine :D
yqt has joined #ruby
mdw has joined #ruby
Xeago has quit [Remote host closed the connection]
<nfk|laptop> totally, i'm laughing so much my laptop is shaking
<adaedra> sigh.
solenoids has joined #ruby
<adaedra> I forgot this channel was full of 12 years old.
<pizzaops> I’ve got a Ruby question we could discuss, if anybody’s interested...
<adaedra> What are you waiting for?
<nfk|laptop> hey, that means i would have been writing those tutorials being 0 years old
<pizzaops> I asked it earlier and nobody responded, and I didn’t want to spam it again.
<shevy> :D
duckpuppy has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
<pizzaops> But basically, I’m working with a library that dynamically generates object types, from whatever this particular REST API has available
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
ror15 has joined #ruby
<pizzaops> and I’m trying to test objects in an array for their class, e.g. item.is_a? == ObjectType
axsuul has joined #ruby
<pizzaops> But I can’t figure out how to get passed the fact that the ObjectType doesn’t exist in the raw code, it’s dynamically generated
malconis has joined #ruby
<lucasb> argentdrake: still here? do you wanted something like this? 10.times.map { rand 1..5 }.each_with_object(Hash.new(0)) {|e,h| h[e] += 1 }
momomomomo has quit [Quit: momomomomo]
<pizzaops> so I get uninitialized constant
sarkis has joined #ruby
guacamol_ has joined #ruby
guacamol_ has quit [Client Quit]
<lucasb> for all: how do I shorten this code? each_with_object(Hash.new(0)) {|e,h| h[e] += 1 }
jondot has quit [Quit: Textual IRC Client: www.textualapp.com]
<adaedra> pizzaops: are you comparing two objects' classes?
<pizzaops> nope
<pizzaops> Specifically I have an object, and simply want to test if it is a certain class at all
<lucasb> it just returns the number of occurrences for each element
<pizzaops> I have an array, and I need to get only the objects of type Type out of it.
darkf has quit [Quit: Leaving]
guacamole has quit [Ping timeout: 260 seconds]
p337rB has quit [Remote host closed the connection]
<pizzaops> I could call inspect on the class type to get around the uninitialized constant but that feels bad
<adaedra> Not gonna be easy if the class has not be bound to a constant
benhuda has joined #ruby
<Mon_Ouie> array.grep(Type)
<pizzaops> Mon_Ouie: that’s going to return uninitialized constant.
guacamole has joined #ruby
<pizzaops> The class type is dynamically generated.
momomomomo has joined #ruby
<Ox0dea> pizzaops: Then you'll have to use #const_get.
<Mon_Ouie> That doesn't matter, as long as you have the class object.
<adaedra> If you have another object of this class, you can use object.class .
blackgoat has joined #ruby
<adaedra> You should have a way to identify objects from the same source.
<pizzaops> Mon_Ouie: there probably is a way but I don’t know it
<art-solopov> pizzaops: Can you generate an is_type? method in the generated class? Then you can array.select { |e| e.try(:is_type?) }
<ror15> Why is my until loop in currect_guess not running the method guess? https://gist.github.com/TuckerWatts/6523e91688f1800c1386
<pizzaops> It’s a library I’m using so I can’t really change it.
<pizzaops> I mean I litearlly can.
<adaedra> Do you have, at any moment, the class object?
<pizzaops> adaedra: not that I know of
<pizzaops> I mean probably yes, but not that *I* know of.
nfk|laptop has quit [Ping timeout: 255 seconds]
<art-solopov> pizzaops: Is it a commonly available library or something internal?
<pizzaops> art-solopov: it’s rbvmomi
n00bdev has joined #ruby
<pizzaops> It’s available, but not very commonly used.
lacuna has quit []
Gnut has quit [Ping timeout: 240 seconds]
<pizzaops> It’s vmware’s quasi-maintained ruby library for the vSphere REST API.
<lucasb> ror15: You have both a variable and a method called 'guess'
lacuna has joined #ruby
lacuna has joined #ruby
dwefe is now known as \50Centa
<Mon_Ouie> How do you know which class you want to get the instances of if you don't have a handle on the class itself?
Gnut has joined #ruby
<pizzaops> Because I have the objects I’m testing
<ror15> lucasb: Ugh thank you so much
<pizzaops> and I can call .is_a? on them
<pizzaops> and .class
\50Centa is now known as \aes
finisherr has quit [Read error: Connection reset by peer]
<adaedra> yes, but you need something to compare against
\aes has left #ruby ["NedaMise"]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie> That doesn't explain how you know which class is the one you want
<adaedra> I can say a duck is a duck because somehow I know what a duck is
<adaedra> If I don't have a way of knowing what a duck is, I can't identify ducks
<adaedra> That's what you're doing
<pizzaops> Looking at the array, I can see which object is a network card, and I can call .class on it.
mrmargolis has joined #ruby
<Ox0dea> pizzaops: For starters, you're not even using #is_a? corectly there.
<Ox0dea> *correctly
<pizzaops> Ox0dea: I know that
<art-solopov> pizzaops: Well, your class has a name, so you can compare against that.
<pizzaops> that’s just from earlier
<pizzaops> art-solopov: yeah I know i cna do string comparison
<pizzaops> I was just wondering if I was missing some way to get the actual class
finisherr has joined #ruby
<adaedra> pizzaops: well, if you can identify a network card, you can then map "network card" to network_card.class
<pizzaops> Yeahhhhh I can’t assume I’ll have an initial “network card” object to test against though
<Ox0dea> pizzaops: If you remove the `.class` from Line 3, it should work...
<pizzaops> there could be a vpshere cluster with no existing vms for example
ferr has joined #ruby
jxs_ has joined #ruby
<pizzaops> Ox0dea: I know, ignore that bit
<pizzaops> I was just showing how I could get the class in general, on [2]
<Ox0dea> ...
<pizzaops> ...
<adaedra> Again, you have to get something to compare against.
<art-solopov> pizzaops: Do you know where the classes are defined? Maybe you need to include a module?
who42 has joined #ruby
<pizzaops> art-solopov: they aren’t explicitly defined, they’re generated from the API itself.
<pizzaops> That’s the problem
sarkis has quit [Ping timeout: 260 seconds]
skade has joined #ruby
rodfersou has quit [Quit: leaving]
<pizzaops> E.g. there is no instance of “VirtualIDEController” anywhere in the codebase.
ympeg has joined #ruby
<Ox0dea> There needn't be.
<adaedra> So you have to identify one object of a kind before getting the class to compare to.
Ebok has joined #ruby
<Ox0dea> pizzaops: Your pry session shows that that class exists and is available at the top level, so it's not namespaced under some module.
<Ox0dea> >> module M; class C; self end end
<ruboto_> Ox0dea # => M::C (https://eval.in/500667)
<adaedra> Ah, didn't see the pry session
ldnunes has quit [Quit: Leaving]
<art-solopov> pizzaops: The only thing I can think of outside of the string comparison is checking respond_to?.
momomomomo has quit [Quit: momomomomo]
acke has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
BTRE has joined #ruby
<pizzaops> art-solopov: that might work!
<Ox0dea> Saints preserve us.
PedramT has joined #ruby
sarkis has joined #ruby
<pizzaops> Ah, yep. I can find network cards via .respond_to(‘macAddress’). That’s perfect.
futilegames has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
dlitvak has quit [Remote host closed the connection]
sandstrom has joined #ruby
<dmr8> +
Vertroa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<adaedra> -
polishdub has quit [Quit: Leaving]
n00bdev has quit []
momomomomo has joined #ruby
jxs_ has quit [Ping timeout: 250 seconds]
<shevy> *
<Ox0dea> /
<pizzaops> Call map on array of hardware devices, with block of `device unless device.respond_to?('macAddress') == false`
<Ox0dea> pizzaops: #select, surely?
<aegis3121> ^
<pizzaops> That’s definitely a better idea :)
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
<Mon_Ouie> do_it unless (something == false) == true
pawnbox has joined #ruby
<pizzaops> .select + `device.respond_to?('macAddress’)` does the job
phreakocious has quit [Ping timeout: 246 seconds]
<pizzaops> Appreciate the help, folks.
<Ox0dea> >> ObjectSpace.each_object(Class).select { |c| c.methods.include? :select }
<ruboto_> Ox0dea # => [File, IO, Gem::Specification] (https://eval.in/500669)
<Ox0dea> pizzaops: Er, which of those .selects do you intend to call? :P
andikr has quit [Read error: Connection reset by peer]
nerfando has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<malice> How can I do something like (0..x).each{|x|...} in Ruby?
<pizzaops> malice: Unless I’m missing something, you pretty much have it right there?
TheHodge has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<Ox0dea> >> sum = 0; 10.times { |n| sum += n }; sum # malice
<ruboto_> Ox0dea # => 45 (https://eval.in/500670)
Xeago has joined #ruby
futilegames has quit [Quit: futilegames]
<pizzaops> You can also do (0..10).each do |num|
<Ox0dea> Range#each on a Range whose #begin is 0 is a little malodorous.
zachk has joined #ruby
<malice> pizzaops: and end do with "end" symbol?
<aegis3121> do....end or { }
<aegis3121> whichever suits your style/needs more
<malice> I prefer end, thanks! :)
<pizzaops> Indeed. That was definitely just the first line
<adaedra> whichever suits your style/needs more – not exactly, they are a bit different.
emilkarl has quit [Quit: Textual IRC Client: www.textualapp.com]
<aegis3121> Sure, particularly with terms of precedence.
<adaedra> `foo bar { }` and `foo bar do end` will do different things.
gambl0re has quit [Remote host closed the connection]
<aegis3121> But I would say, most of the time, for someone learning it new, it's easier to think of things at their simplest.
* aegis3121 shrugs
gambl0re has joined #ruby
steffkes has quit [Ping timeout: 256 seconds]
<lucasb> {} for one line, do...end for multi lines, simple rule :)
<aegis3121> That's also a pretty accepted style, though I've heard others :)
xet7 has quit [Quit: Leaving]
futilegames has joined #ruby
<pizzaops> Whichever one is more like Perl.
* pizzaops ducks
<Ox0dea> lucasb: What do you do when a refactoring changes which you should use?
phreakocious has joined #ruby
<lucasb> Ox0dea: I... I don't understand :)
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
jxs_ has joined #ruby
steffkes has joined #ruby
JakFrist has joined #ruby
futilegames has quit [Client Quit]
<Ox0dea> It's the same trouble you get into when leaving the braces off single-statement blocks in C, only not near as consequential.
JakFrist has quit [Client Quit]
usershell has quit [Read error: Connection reset by peer]
zachk has quit [Ping timeout: 250 seconds]
tjohnell has quit [Ping timeout: 252 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
lxsameer has quit [Quit: Leaving]
prestorium has quit [Quit: Leaving]
user083 has quit [Quit: leaving]
howdoico1 has joined #ruby
usershell has joined #ruby
<lucasb> Ox0dea: ah, ok. now I understand what you meant. If it's my code, I'll always follow that rule, changing from braces to keyword and vice versa when I need one or more lines. If it's somebody else code, then... I have to live with it.
usershell has quit [Remote host closed the connection]
aadam21_ has joined #ruby
howdoicomputer has quit [Ping timeout: 276 seconds]
zachk has joined #ruby
zachk has quit [Changing host]
zachk has joined #ruby
zachk has quit [Excess Flood]
psyq has quit [Quit: Conversation terminated]
scrndddy has joined #ruby
<lucasb> Interesting, I haven't seen that, but his rule makes sense. thanks for the link, Ox0dea.
aadam21 has quit [Ping timeout: 260 seconds]
<Ox0dea> Sure thing.
<scrndddy> hey there. i'm deciding which technology to build an API in and looking at both ruby(grape) and some node frameworks. i'm pretty comfortable in both languages at this point. i know i shouldn't be worried about performance at this point, but is ruby really going to be that much slower than node? i've seen some pretty ugly benchmarks. will i be able to practically scale a ruby app down the road without my head exploding?
agentmeerkat has joined #ruby
argentdrake has quit [Remote host closed the connection]
DoubleMalt has joined #ruby
<apeiros> scrndddy: if you have to worry about ruby being too slow, you pretty much will have the same issue with node. the difference isn't *that* big.
mdw has joined #ruby
Vertroa has joined #ruby
dlitvak has joined #ruby
<apeiros> or put differently: chances that bad code fucks up your performance is magnitudes more likely than the actual performance difference.
sandstrom has quit [Quit: My computer has gone to sleep.]
axsuul has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
FernandoBasso has joined #ruby
axsuul has joined #ruby
justmytwospence has joined #ruby
axsuul has quit [Max SendQ exceeded]
<scrndddy> apeiros: hmm i see
justmytwospence has quit [Client Quit]
axsuul has joined #ruby
<scrndddy> apeiros: what about the blocking aspect of ruby vs node being async?
justmytwospence has joined #ruby
<scrndddy> in the end running ruby multithreaded should make up for that in theorym correct?
<scrndddy> theory*
mdw has quit [Ping timeout: 276 seconds]
kith has quit [Quit: kith]
howdoico1 has quit [Ping timeout: 250 seconds]
malconis has joined #ruby
hannelita has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 256 seconds]
lacuna has quit [Read error: Connection reset by peer]
tomchapin has joined #ruby
malconis has quit [Client Quit]
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
mntnman has quit [Quit: WeeChat 1.3]
tectonic has quit []
<apeiros> scrndddy: you can code async in ruby just fine. that's not a language property.
Dimik has joined #ruby
sandstrom has joined #ruby
<apeiros> node lacking threading otoh can be rather bugging.
<apeiros> though I think I heard there's efforts in that regard.
bMalum has quit [Read error: Connection reset by peer]
cdg_ has joined #ruby
tectonic has joined #ruby
<scrndddy> it's like the more i look into it the more confused i become about which techology to use
dhollinger has quit [Quit: WeeChat 1.3]
benlieb has quit [Quit: benlieb]
<apeiros> scrndddy: it won't matter much. you'll probably be able to do it with either.
user083 has joined #ruby
tomjoro has joined #ruby
aegis3121 has quit [Ping timeout: 260 seconds]
jschmid has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
BSaboia has joined #ruby
axsuul has joined #ruby
momomomomo has quit [Quit: momomomomo]
phantummm has quit [Ping timeout: 250 seconds]
benlieb has joined #ruby
dhollinger has joined #ruby
kerunaru has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
griffindy has joined #ruby
justmytwospence has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
axsuul has joined #ruby
malconis has joined #ruby
Channel6 has joined #ruby
Darmani has joined #ruby
<Darmani> Hey kids<33
dlitvak_ has joined #ruby
PedramT has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 260 seconds]
jbrhbr has quit [Quit: Leaving.]
Vertroa_ has joined #ruby
PedramT has joined #ruby
malconis has quit [Client Quit]
JuanS has left #ruby [#ruby]
Vertroa has quit [Ping timeout: 265 seconds]
malice has quit [Remote host closed the connection]
davedev2_ has joined #ruby
<lucasb> [false, true].sample(10) only returns 2 elements :( and .cycle or .cycle.to_a doesn't work. I think have to use a map somehow.
tomchapi_ has joined #ruby
* Darmani waves to lucasb
tomchapin has quit [Ping timeout: 272 seconds]
<lucasb> o/ Darmani
davedev24 has quit [Ping timeout: 250 seconds]
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
momomomomo has joined #ruby
Plazma has left #ruby [#ruby]
usershell has joined #ruby
<domgetter> lucasb: try cycle.take(10)
einarj has joined #ruby
<domgetter> >> ["a", "b"].cycle.take(10)
<ruboto_> domgetter # => ["a", "b", "a", "b", "a", "b", "a", "b", "a", "b"] (https://eval.in/500673)
malconis has joined #ruby
<apeiros> >> Array.new(10) { [false, true].sample }
<ruboto_> apeiros # => [false, true, false, false, false, true, false, true, false, false] (https://eval.in/500674)
<lucasb> domgetter: oh, right, forgot about .take(N). thanks!
aegis3121 has joined #ruby
Jackneill has quit [Ping timeout: 265 seconds]
<lucasb> apeiros, I used something almost the same: 10.times.map { [true,false].sample }
<lucasb> apeiros: but, thanks too
saltsa_ is now known as saltsa
<apeiros> lucasb: IMO Array.new(n) is more intention revealing than 10.times.map
<apeiros> (coincidentally it's also shorter :-p)
<lucasb> yes, I agree
Vertroa_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheAnachron has left #ruby [#ruby]
JohnT has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
<Ox0dea> It's not shorter.
axsuul has quit [Ping timeout: 240 seconds]
<Ox0dea> >> ['Array.new(10)', '10.times.map'].map(&:size)
<ruboto_> Ox0dea # => [13, 12] (https://eval.in/500675)
rkazak has joined #ruby
<apeiros> uh, did I miscount? possible
<Ox0dea> Possible?
<lucasb> damn, one character! :)
<Ox0dea> The numbers, Mason! How can they lie?
FernandoBasso has quit [Remote host closed the connection]
usershell has quit [Ping timeout: 265 seconds]
benlieb has quit [Read error: Connection reset by peer]
<apeiros> mason?
benlieb has joined #ruby
FooMunki has quit [Quit: FooMunki]
<Ox0dea> lucasb: Why not take the bits of a random number? :)
benlieb has quit [Client Quit]
blackoperat has joined #ruby
bronson has quit []
babblebre has quit [Quit: Connection closed for inactivity]
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<lucasb> Ox0dea: I was thinking more like for arrays with arbitrary elements, not just true/false :)
okbutwhy has joined #ruby
PedramT_ has joined #ruby
<Ox0dea> Fair enough.
<Ox0dea> >> class Integer; def bits; Array.new bit_length, &method(:[]) end end; 17.bits
<ruboto_> Ox0dea # => [1, 0, 0, 0, 1] (https://eval.in/500676)
<Ox0dea> There's a really neat definition of #bits if you ever need it.
jokke has quit [Quit: WeeChat 1.3]
blackoperat has quit [Client Quit]
art-solopov has quit [Quit: Konversation terminated!]
<lucasb> Ox0dea: interesting idea, thanks :)
<lucasb> except that 17.bits doesn't sound right
PedramT has quit [Ping timeout: 246 seconds]
<Ox0dea> I can't imagine a better name.
fmcgeough has joined #ruby
einarj has quit [Remote host closed the connection]
howdoico1 has joined #ruby
tomchapi_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has quit []
<lucasb> ah, now I get it. yes #bits is the right name, but the array is reversed. it just needs a .reverse method attached.
<Ox0dea> Check your big-endian privilege.
ur5us has quit [Remote host closed the connection]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<Ox0dea> You'd want n[0] == n.bits[0], of course, so the result does have the right endianness.
adam^ has quit [Quit: ZNC - http://znc.in]
<Mon_Ouie> I find it amusing that the example that was used was a binary palindrome
dpg_ has joined #ruby
PhantomSpank has joined #ruby
<lucasb> .oO( hey, that palindrome is reversed! )
Coldblackice has joined #ruby
steffkes has quit [Ping timeout: 260 seconds]
Vertroa has joined #ruby
PedramT_ has quit [Ping timeout: 276 seconds]
<Ox0dea> Somebody no-op that man!
jschmid has quit [Ping timeout: 272 seconds]
smo` has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
r0_0 has joined #ruby
<r0_0> hey room, is there a good alternative to nokogiri
mchu has quit [Quit: mchu]
felltir has joined #ruby
<Ox0dea> r0_0: Oga.
chipotle has quit [Quit: cheerio]
<r0_0> Oga koolness will give it a try
PedramT has joined #ruby
mchu has joined #ruby
mlakewood has joined #ruby
r0_0 has quit [Client Quit]
maletor has joined #ruby
chipotle has joined #ruby
<mlakewood> Is there known problems with using rbenv/bundler in a shared folder in vagrant?
<mlakewood> using virtualbox
porlan has joined #ruby
fourq is now known as fourq|away
<mlakewood> I’ve also asked in the vagrant channel, but thought I would ask here just in case this was a known issue.
<maletor> Is there a way to convert a number to a natural. As numbers < 0 go to 0.
roshanavand has quit [Ping timeout: 260 seconds]
fourq|away is now known as fourq
fourq is now known as fourq|away
fourq|away is now known as fourq
fourq is now known as fourq|away
fourq|away is now known as fourq
PedramT has quit [Ping timeout: 276 seconds]
<volty> convert frogs into princes, and vice versa?
vF3hNGxc47h8 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
ur5us has joined #ruby
<Ox0dea> >> [-42, 0].max # maletor
<ruboto_> Ox0dea # => 0 (https://eval.in/500685)
aupadhye has quit [Quit: Leaving]
<lucasb> aka #abs
<Ox0dea> >> -42.abs
<ruboto_> Ox0dea # => 42 (https://eval.in/500686)
<maletor> duh. thanks
rdark has quit [Ping timeout: 255 seconds]
<maletor> no this is different than abs
<lucasb> I didn't read right :)
<maletor> :)
<Ox0dea> Maybe some day.
PedramT has joined #ruby
solocshaw has quit [Ping timeout: 272 seconds]
<Ox0dea> `[min, foo, max].sort[1]` in the meantime.
smactive has joined #ruby
<maletor> cool but i don't need a max
<maletor> it'd be unclear if i specified Float::INFINITY for instnace
<Ox0dea> Maybe some day.
fmcgeough has quit [Quit: fmcgeough]
<maletor> my max is unbounded (except by practical limits of memory)
mlakewood has quit [Ping timeout: 264 seconds]
mlakewood has joined #ruby
nerfando has joined #ruby
ellistaa has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ellistaa> i have a class that inherits from API and when it try to call request in API using super from the inherited class my instance variables aren’t being instantiated. can someone tell me how to get them instantiated?
rkazak has quit [Ping timeout: 265 seconds]
lucasb has quit [Quit: leaving]
smactive has quit [Ping timeout: 256 seconds]
PedramT has quit [Ping timeout: 264 seconds]
nerfando has quit [Client Quit]
synthroid has quit []
PedramT has joined #ruby
<volty> ellistaa: the constructors get called twice - once till super, then all over again // but it's tricky and can't remember well now. can you post that bit of offending code ?
lubekpl has joined #ruby
<ellistaa> k
skingsbu has quit [Quit: Textual IRC Client: www.textualapp.com]
spooq has joined #ruby
<ellistaa> this https://gist.github.com/ellismarte/c92253d975548d724dfb#file-drsearch-rb-L32-L33 calls line 13 in the other file and @base_uri is printing nil
mlakewood has quit [Ping timeout: 240 seconds]
hannelita has joined #ruby
nofxx has joined #ruby
nofxx has joined #ruby
<volty> i don't see super in the initialize, try to insert it. It seems your object hasn't been allocated.
<alyssadaemon> volty: It’s at the end of gather_info which is called the end of initialize
mrtomme has quit [Ping timeout: 246 seconds]
ferr has quit [Ping timeout: 246 seconds]
sonOfRa has quit [Remote host closed the connection]
inkky has quit [Quit: No Ping reply in 180 seconds.]
inkky has joined #ruby
mrtomme has joined #ruby
ferr has joined #ruby
karapetyan has joined #ruby
<volty> i am suggesting to try to call super within the initialize
<ellistaa> oh ok
<volty> qtbindings calls the constructor twice to avoid similar problems
failshell has quit [Remote host closed the connection]
<ellistaa> : D
<ellistaa> volty: thanks that worked :)
<volty> ellistaa: yw :)
sonOfRa has joined #ruby
hannelita has quit [Ping timeout: 255 seconds]
chimche has quit [Quit: Leaving.]
<Ox0dea> What is the opposite of "debug"?
siaw has joined #ruby
<adaedra> Code.
<volty> a genius error-free code
<volty> ops, pardon, a monster error-free code
mostlybadfly has quit [Quit: Connection closed for inactivity]
ducklobster has joined #ruby
moei has quit [Quit: Leaving...]
<Radar> Ox0dea: develop
weemsledeux has quit [Ping timeout: 245 seconds]
skade has joined #ruby
decoponio has quit [Quit: Leaving...]
PedramT_ has joined #ruby
<Radar> While some might think that "develop" means to produce more code, it also has a secret, second meaning: produce more bugs.
phantummm has joined #ruby
<volty> developing comprises debugging too, only wishful thinking doesn't need debugging
PedramT has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
<Ox0dea> Debugging is the process of removing bugs; I'm looking for the word that means deliberately emplacing them.
hannelita has joined #ruby
moei has joined #ruby
chimche has joined #ruby
<shevy> lol
<Ox0dea> :P
PedramT_ has quit [Read error: Connection reset by peer]
<shevy> intelligent design!
<Ox0dea> Shots fired?
PedramT has joined #ruby
<shevy> well it's two words so it does not meet the requirement
<volty> ah something like injecting NilClass.send(:define_method, 'nil?') { rand(10) != 0 ? true : false }
SenpaiSilver has joined #ruby
maletor_ has joined #ruby
smactive has joined #ruby
SenpaiSilver has quit [Client Quit]
<bnagy> backdooring
DoubleMalt has quit [Remote host closed the connection]
SenpaiSilver has joined #ruby
<Ox0dea> That doesn't necessitate that the underhanded code be "buggy", though.
okbutwhy has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<shevy> bnagy that conjures up the image of NSA to me now!
<bnagy> Ox0dea: no, but bugdoors are a subset of backdoors
pawnbox has quit [Ping timeout: 245 seconds]
<bnagy> I don't know what the word is for deliberately placing useless bugs :/
<shevy> you may have to coin a new word altogether because I don't think the opposite of no bugs exists yet as a state
<shevy> bnagy sloppyness!!!
maletor has quit [Ping timeout: 250 seconds]
<bnagy> that suggests an unintended outcome, or at least a lack of intent
<volty> intentional buggy coding requires mastering as much as good coding - imho
nfk|laptop has joined #ruby
<drbrain> Ox0dea: sabotage?
colegatron has quit [Ping timeout: 265 seconds]
<Ox0dea> drbrain: Certainly, but I'm wondering if there's a more technical alternative.
<shevy> bugotage!
<nfk|laptop> Ox0dea, oh, as for what i don't like about vim, it's visually revolting would be my main issue
<bnagy> meep meep trolling alert
<nfk|laptop> i mean, toxic cyan comments?
solocshaw has joined #ruby
<nfk|laptop> and kate currently has exactly 0 color schemes that would not have some or many issues
jokke has joined #ruby
<Ox0dea> volty: https://eval.in/459192
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kt2 has joined #ruby
PhantomSpank has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
<volty> Ox0dea: nice, i was playing with TrueClass with much less result :)
<Ox0dea> volty: I have another!
PhantomSpank has joined #ruby
<ducklobster> hi all, i am trying to extend the Hash class to accept a named parameter but can't seem to get the syntax right
<ducklobster> is what i am trying to do even possible? any suggestions/help would be great
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<shevy> ducklobster just a syntax error
<shevy> just satisfy the ruby parser and it should work
duckpuppy has quit [Ping timeout: 265 seconds]
<bnagy> ducklobster: don't extend or subclass core classes (suggestion)
<Ox0dea> volty: https://eval.in/464670
FooMunki has joined #ruby
<bnagy> it almost always ends in tears
<Ox0dea> That one's not malicious, though.
<Ox0dea> It's... glorious?
<ducklobster> bnagy: i didn't actually subclass, i am just trying to mimic the []= syntax
<ducklobster> shevy: i guess i don't understand the []= syntax in the method definition
<ellistaa> does anything look wrong with this line of code: response = HTTParty.get(@base_uri + endpoint + '.json', :query => options, :headers => {:user_key => @user_key})
<volty> Ox0dea: nice code, going to save it in snippets.rb :)
<shevy> ducklobster the []= is not where your error is at, just read the error message
ta has joined #ruby
mlakewood has joined #ruby
underplank has joined #ruby
maikowblue has quit [Ping timeout: 276 seconds]
<shevy> for instance if you add one { and one } then that error goes away
mfb2 has quit [Remote host closed the connection]
freerobby has joined #ruby
aadam21_ has quit [Remote host closed the connection]
mfb2 has joined #ruby
domgetter has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
lemur has quit [Remote host closed the connection]
aadam21 has joined #ruby
<Ox0dea> ducklobster: It's not possible.
<volty> ducklobster: []= accepts only two params
<ducklobster> shevy: but that is just passing a 3rd parameter
[Butch] has quit [Quit: I'm out . . .]
<shevy> oh so it's cheating, that's naughty
mfb2 has quit [Remote host closed the connection]
<ducklobster> Ox0dea, volty: gotcha
mfb2 has joined #ruby
<Ox0dea> volty: You can define #[]= to take as many params as you'd like.
<volty> you can pass the rest into an array
<ducklobster> but it won't take a named parameter
mchu has quit [Quit: mchu]
PedramT has quit [Ping timeout: 272 seconds]
<ducklobster> is #[]= a special case that allows for [value1] = value2, value3, ...?
Z00t has quit [Ping timeout: 246 seconds]
<Ox0dea> ducklobster: https://eval.in/500700
PedramT has joined #ruby
<Ox0dea> You could probably get pretty crazy with this, but are you sure you want to?
mdw has joined #ruby
mistermocha has quit [Ping timeout: 240 seconds]
<shevy> sounds like a dare!
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> Ox0dea knows crazy
<shevy> haha
<Ox0dea> Guilty.
jbrhbr has joined #ruby
<ducklobster> haha we will see how this goes :P
<ducklobster> thanks for the help all
<Radar> Or more like crazy knows Ox0dea and is AFRAID.
<Ox0dea> <3
<Radar> <3
<Ox0dea> Crazy and I have a mutual understanding at this point.
ESpiney has quit [Quit: Leaving]
B1n4r10 has quit [Ping timeout: 272 seconds]
<Ox0dea> ducklobster: You definitely can't put a keyword argument in the brackets; the interpreter turns it into an explicit Hash.
maletor_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomPeed has joined #ruby
maletor has joined #ruby
colegatron has joined #ruby
mfb2 has quit [Ping timeout: 272 seconds]
<drbrain> >> def []= index, a:, b:; p index => [a, b] end; self[1] = { a: 2, b: 3 }
<ruboto_> drbrain # => {1=>[2, 3]} ...check link for more (https://eval.in/500702)
dlitvak_ has quit [Ping timeout: 245 seconds]
<drbrain> LOL
casadei has quit [Remote host closed the connection]
casadei has joined #ruby
<shevy> hmmm
<Ox0dea> That's kinda neat.
lemur has joined #ruby
ropeney has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
stamina has quit [Quit: WeeChat 1.3]
<shevy> ducklobster look what you did now
<Ox0dea> ducklobster: https://eval.in/500704
<Ox0dea> No joy. :(
<Ox0dea> You have to explicitly invoke #[]= like a "normal" method if you want the arguments treated "normally".
mfb2 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
atumzin has quit [Ping timeout: 245 seconds]
guacamol_ has joined #ruby
skade has joined #ruby
dlitvak has joined #ruby
guacamole has quit [Ping timeout: 246 seconds]
guacamole has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
lacuna has quit [Read error: Connection reset by peer]
lacuna has joined #ruby
mchu has joined #ruby
nerfando has joined #ruby
FernandoBasso has joined #ruby
lemur has quit [Remote host closed the connection]
nerfando has quit [Max SendQ exceeded]
atumzin has joined #ruby
phantummm has quit [Ping timeout: 250 seconds]
nerfando has joined #ruby
nerfando has quit [Max SendQ exceeded]
ianix has quit [Ping timeout: 260 seconds]
guacamo__ has joined #ruby
guacamol_ has quit [Ping timeout: 276 seconds]
mistermocha has joined #ruby
nerfando has joined #ruby
webus has quit [Ping timeout: 240 seconds]
lacuna has quit [Read error: Connection reset by peer]
mfb2 has quit [Remote host closed the connection]
underplank has quit [Quit: underplank]
pawnbox has joined #ruby
lacuna has joined #ruby
lacuna has quit [Changing host]
lacuna has joined #ruby
mfb2 has joined #ruby
djbkd has joined #ruby
guacamole has quit [Ping timeout: 265 seconds]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ellistaa> im getting an Connection refused - connect(2) for nil port 80 (Errno::ECONNREFUSED) … does this look invalid https://gist.github.com/ellismarte/c92253d975548d724dfb#file-api-rb-L1
aryaching has quit []
<adaedra> you can use URI.join to assemble URLs.
dhollinger has quit [Quit: WeeChat 1.3]
<adaedra> Otherwise, I'd say there is no web server on the address you're trying to join.
scripore has joined #ruby
<ellistaa> adaedra: ty
underplank has joined #ruby
KineticX has joined #ruby
yfeldblum has joined #ruby
kalopsian has quit [Ping timeout: 250 seconds]
codecop has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 260 seconds]
ta has quit [Ping timeout: 246 seconds]
Channel6 has quit [Ping timeout: 240 seconds]
mfb2 has quit [Ping timeout: 276 seconds]
YourKicks has joined #ruby
djbkd has quit [Ping timeout: 250 seconds]
aegis3121 has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
nerfando has quit [Ping timeout: 272 seconds]
r0_0 has joined #ruby
<r0_0> Hey all I fixed my problem
Cohedrin has joined #ruby
<r0_0> just have to install rpm-build :P
guacamole has joined #ruby
<volty> fixed what ?
fwefe has joined #ruby
<r0_0> couldn't get nokogiri gem installed
<volty> ah, yes, from the last night. and what should have rpm-build solved?
guacamo__ has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
<r0_0> no idea bro but I was going through the rails docs and saw that was a dep.
jmignault has quit [Quit: quittin' time, Ralph]
weemsledeux has joined #ruby
<r0_0> my fault bro or maam* sry
mfb2 has joined #ruby
zenlot1 has joined #ruby
<volty> nothing to do with your prob, rpmbuild is to fedora is what gembuild is for ruby. irrelevant
PedramT_ has joined #ruby
PedramT_ has quit [Client Quit]
<adaedra> surely got gcc with it
<volty> s/for/to/
simi has quit [Ping timeout: 245 seconds]
graphettion has quit [Remote host closed the connection]
<volty> ya, but his (supposed) problem was that the install script wasn't able to find libxml/parser.h
zenlot has quit [Ping timeout: 240 seconds]
dlitvak has quit [Remote host closed the connection]
PedramT has quit [Read error: Connection reset by peer]
stannard has quit [Remote host closed the connection]
<r0_0> volty: what does s/for/to/ mean?
renier has joined #ruby
mfb2_ has joined #ruby
<r0_0> adaedra: I had gcc already
<volty> substitute 'for' with 'to' in the preceding phrase
roshanavand has quit [Ping timeout: 256 seconds]
babblebre has joined #ruby
kerunaru has joined #ruby
mfb2 has quit [Ping timeout: 246 seconds]
<r0_0> oh like vim lol
<r0_0> I saw that last night I was like wtf is that?
momomomomo has quit [Quit: momomomomo]
<volty> s/strange problems/strange trolls/ :)
<Ox0dea> s/vim/ed/
fwefe has quit [Remote host closed the connection]
<r0_0> volty: you are a strange cat
stannard has joined #ruby
<Ox0dea> r0_0: You lack historical context!
<volty> r0_0: I have a good sense of smell
<r0_0> lol
govg has quit [Ping timeout: 260 seconds]
mfb2_ has quit [Remote host closed the connection]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackcom has joined #ruby
govg has joined #ruby
<jackcom> shevy: hello
mfb2 has joined #ruby
<jackcom> sleeping
mrmargolis has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<r0_0> all good well thanks for helping anyway Ox0dea and volty, I really appreciate it
CloCkWeRX has joined #ruby
<Ox0dea> r0_0: Glad you got it sorted.
<volty> yw, come again, with even stranger problems :)
<r0_0> haha for sure
tvw has quit [Remote host closed the connection]
<r0_0> late
r0_0 has left #ruby [#ruby]
<jackcom> ruby programmer is kind? volty and Ox0dea ?
Snowy has joined #ruby
<Ox0dea> jackcom: Fuck. Off.
<jackcom> :(
<Ox0dea> Alternatively, set about actually learning Ruby and come back with legitimate questions.
mfb2 has quit [Ping timeout: 246 seconds]
<jackcom> i learned ruby, but i don’t do my code yet. so i can’t apply it to real code. Ox0dea
stannard has quit [Remote host closed the connection]
<volty> kind with kind, rude with pompous
roshanavand has joined #ruby
<jackcom> yeah, who is rude? volty
felltir has quit [Remote host closed the connection]
kalopsian has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<volty> I've been derailed by Ox0dea's argument code. Going to take a rest and write few useful lines of code. :)
framling has joined #ruby
Xeago has quit [Remote host closed the connection]
chimche has quit [Quit: Leaving.]
siaw has quit [Quit: siaw]
mfb2 has joined #ruby
<Ox0dea> Argument code?
Xeago has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<jackcom> ok volty thanks
sftrabbit has quit [Quit: sftrabbit]
mahk has quit [Ping timeout: 260 seconds]
<volty> Ox0dea: joking, wordplay (about your class C; def []=(*args ..... )) // jackcom: w
chimche has joined #ruby
domgetter has joined #ruby
underplank has quit [Ping timeout: 240 seconds]
<domgetter> Here's a solution to wanting to repeatedly sample an array: https://gist.github.com/domgetter/dd238e1dc4a78922176d
bronson has joined #ruby
mfb2 has quit [Ping timeout: 272 seconds]
<Ox0dea> I question whether that should live on Object, but it's nifty.
failshell has joined #ruby
wedw has joined #ruby
mchu has quit [Quit: mchu]
dlitvak has joined #ruby
<domgetter> I don't think it goes in Enumerable, since it can be used on more than just enumerable things. The only other candidates are BasicObject and Kernel, but those seem worse...
Xeago has quit [Ping timeout: 245 seconds]
lacuna has quit [Remote host closed the connection]
acke has joined #ruby
pawnbox has joined #ruby
<cscheib> how would you guys do this (very simple) exercise differently? It took me way longer than it should have to complete this, which means I need to practice a lot more, heh. https://gist.github.com/cscheib/e069b2a92cf453aed8e5
mfb2 has joined #ruby
lacuna has joined #ruby
lemur has joined #ruby
lubekpl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> cscheib: That could just be `Hash.new(0)`.
<cscheib> that notation doesn't share the object?
<Ox0dea> It does, but 0 is a singleton.
<cscheib> ah ok
<Ox0dea> Also, you're never mutating, just re-assigning.
<cscheib> true
<cscheib> I have just run into the same-object issue and programmed my brain to avoid it with vigilance
mfb2_ has joined #ruby
cpup has quit [Ping timeout: 264 seconds]
TomyLobo has quit [Ping timeout: 240 seconds]
wedw has left #ruby ["NedaMise"]
kies^ has quit [Ping timeout: 265 seconds]
failshell has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 264 seconds]
acke has quit [Ping timeout: 260 seconds]
smo` has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mfb2 has quit [Ping timeout: 276 seconds]
Oog has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
binaryplease has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<domgetter> cscheib: since you don't need the original words, just their lengths, after the split you could .map(&:length) and then shove the different lengths into the hash without having to ask the word in that block, but its up to you
gambl0re has quit []
kalopsian has quit [Ping timeout: 256 seconds]
siaw has joined #ruby
siaw has quit [Client Quit]
Keltia has quit [Changing host]
Keltia has joined #ruby
<cscheib> domgetter: slick. good call
scripore has quit [Quit: This computer has gone to sleep]
<Ox0dea> >> 'this is a test'.split.group_by(&:size).map { |k, v| [k, v.size] }.to_h # cscheib
<ruboto_> Ox0dea # => {4=>2, 2=>1, 1=>1} (https://eval.in/500729)
agent_white has joined #ruby
<Ox0dea> It does feel like there ought to be a nicer way to write that.
scripore has joined #ruby
<Ox0dea> `map { |k, v| [k, v.size] }` is so much noise.
<domgetter> well its because you're preparing it for the to_h
<Ox0dea> As necessary?
kerunaru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<domgetter> well sure, I'm just pointing out *why* it's necessary
dlitvak has quit [Ping timeout: 260 seconds]
karapetyan has quit [Remote host closed the connection]
<cscheib> I need to spend some brain time figuring out the whole &:size thing and how it works. It's a Proc, right?
cpup has joined #ruby
karapetyan has joined #ruby
who42 has quit [Quit: Leaving]
<cscheib> I know it works, and sometimes how/when to use it
<Ox0dea> >> -> &obj { obj.class }[&:size]
<ruboto_> Ox0dea # => Proc (https://eval.in/500730)
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> `&foo` uses foo's definition of #to_proc to convert it to a Proc, which is in turn passed along as a block.
<Ox0dea> That's why you can't just say `&:size` anywhere; blocks are not objects.
<cscheib> gotcha
<[ace]> if you want to get rid of the .to_h and reduce the noisy-ness of the map, you could assign the group_by result to a var and then use update
karapetyan has quit [Ping timeout: 246 seconds]
binaryplease has quit [Quit: WeeChat 1.3]
phantummm has joined #ruby
axl_ has quit [Quit: axl_]
rakm has joined #ruby
ta has joined #ruby
<domgetter> cscheib: here's a quick explanation: https://gist.github.com/domgetter/86ad84366e6b30da4775
FernandoBasso is now known as TheEyeOfTheTruth
whippythellama has quit [Quit: WeeChat 1.4]
<Ox0dea> domgetter: Why "(basically)"?
ta_ has joined #ruby
chimche has quit [Quit: Leaving.]
ellistaa has quit [Quit: ellistaa]
rakm_ has joined #ruby
ellistaa has joined #ruby
dangeranger has joined #ruby
chimche has joined #ruby
binaryplease has joined #ruby
Renich has quit [Quit: leaving]
ta has quit [Ping timeout: 255 seconds]
rakm has quit [Ping timeout: 265 seconds]
hannelita has quit [Remote host closed the connection]
mdw has quit [Read error: Connection reset by peer]
mdw has joined #ruby
braincrash has joined #ruby
jbrhbr has quit [Quit: Leaving.]
mdw has quit [Client Quit]
phantummm has quit [Quit: WeeChat 1.3]
nunchuck has joined #ruby
YourKicks is now known as Channel6
dmr8 has quit [Quit: Leaving]
zotherstupidguy has joined #ruby
<domgetter> Ox0dea: #send will call private methods
<domgetter> but that was outside the scope of the explanation
<Ox0dea> Fair enough.
<Ox0dea> [ace]: Hm?
jbrhbr has joined #ruby
<Ox0dea> The only significant recourse to cleanup would be if Hash#map mapped values and returned a Hash, but of course you sometimes want to map keys too.
<cscheib> domgetter++
chimche has quit [Quit: Leaving.]
<Ox0dea> [[:a, 1], [:b, 2]].reduce({}, :[]=) would be nice, but we can't splat here. :/
kalopsian has joined #ruby
lemur has quit [Remote host closed the connection]
mmercer has joined #ruby
<mmercer> lo all; what is the difference between "ruby" and ":ruby" when referring to variables ?
hannelita has joined #ruby
<cscheib> the second is a symbol
<cscheib> mmercer ^
<Ox0dea> "The building is a symbol, as is the act of destroying it."
<cscheib> I won't try to go any more in depth, the others will take care of that :P
<domgetter> mmercer: when there's a colon before a word, it's not a variable
karapetyan has joined #ruby
<domgetter> it can't refer to a value, it's just itself, like a string
<mmercer> hmmm
<mmercer> kk
aadam21_ has joined #ruby
KineticX has quit [Remote host closed the connection]
Darmani has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
Channel6 has quit [Quit: Leaving]
aadam21 has quit [Ping timeout: 240 seconds]
<mmercer> interesting; ty domgetter
<domgetter> they're also used to associate with values in hashes, but that's for when you learn about Hashes
<mmercer> domgetter: lol, thats ironically what im working through right now; trying to figure out why my Vagrantfile isnt doing what I want it to do XD
aadam21_ has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
dlitvak has joined #ruby
kalopsian has quit [Ping timeout: 240 seconds]
<domgetter> ah okay, well then to be a little more specific, symbols are created once in memory so :hello is the same as a later :hello, so they're efficient in memory to use them to associate with values in hashes
pawnbox has quit [Ping timeout: 240 seconds]
<domgetter> a hash is just an unordered list of key-value pairs where the keys are unique
roshanavand has quit [Remote host closed the connection]
n0xff has quit [Quit: leaving]
<domgetter> so if you use symbols (which are made in memory once), it's easy to use unique keys
agent_white has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
<domgetter> {:a => 3, :b => "hello"} this is a hash where the symbol :a is associated with the value 3, and :b is associated with the string "hello"
casadei has quit [Remote host closed the connection]
<domgetter> we could have used strings, but it would be slower and possibly more buggy {"a" => 3, "b" => "hello"}
<domgetter> so if you just think of them as strings for the sake of hashes, you'll be relatively safe
scrndddy has quit [Quit: Page closed]
<mmercer> * nods *
agent_white has joined #ruby
freerobby has quit [Quit: Leaving.]