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/
ESpiney has quit [Ping timeout: 276 seconds]
tildes has joined #ruby
DarkElement has joined #ruby
ICantCook has quit [Quit: bye]
ellistaa has joined #ruby
<DarkElement> I looked at that already
<DarkElement> Ons ec
<ec> DarkElement: yes?
<ec> oh.
jgpawletko has quit [Quit: jgpawletko]
<drbrain> ec typo of "one sec"
PedramT has quit [Ping timeout: 240 seconds]
nymous has quit [Read error: No route to host]
jam_ has joined #ruby
bronson has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DarkElement> Back and trying.
cschneid_ has quit [Remote host closed the connection]
<DarkElement> Yes, I tried to install zlib
<DarkElement> It also said that was not a package.
Snowy has quit [Remote host closed the connection]
<DarkElement> drbrain, any ideas? perhaps I need to search for packages with similar names
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
ICantCook has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
TomPeed has joined #ruby
<DarkElement> Yea it said I already had zlib installed...
kirillzh has joined #ruby
burbus has quit [Ping timeout: 245 seconds]
<drbrain> DarkElement: and zlib-devel?
<DarkElement> Oh that might have done it
Snowy has joined #ruby
firstdayonthejob has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jam_ has quit [Ping timeout: 265 seconds]
<DarkElement> ermegerd it worked thank you
pdoherty has joined #ruby
Brklyn has quit [Ping timeout: 240 seconds]
bronson has quit [Ping timeout: 265 seconds]
Jardayn has quit [Quit: Leaving]
Abrin has joined #ruby
<DarkElement> All is well now
DarkElement has quit [Quit: Leaving]
dlitvak has joined #ruby
blackgoat has quit [Ping timeout: 240 seconds]
<Abrin> Has anyone used Arcadia before? I was just wondering what people's opinions were.
Ebok has joined #ruby
dlitvak has quit [Ping timeout: 265 seconds]
tyrbo has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
Liquid-- has quit [Quit: Computer has gone to sleep.]
SenpaiSilver has quit [Quit: Leaving]
krobzaur has quit [Ping timeout: 272 seconds]
Brando753 has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ellistaa> how does 5 ^ 6 == 3?
Brando753 has joined #ruby
rehat has quit [Ping timeout: 256 seconds]
sftrabbit has quit [Quit: sftrabbit]
pawnbox has joined #ruby
asccigcc has quit [Quit: asccigcc]
nymous has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
diegoviola has quit [Quit: WeeChat 1.3]
baweaver has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
hays has quit [Ping timeout: 244 seconds]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k13nox has quit [Remote host closed the connection]
alexherbo2 has quit [Ping timeout: 256 seconds]
guacamole has joined #ruby
alexherbo2 has joined #ruby
griffindy has joined #ruby
baweaver has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
unsymbol has quit [Ping timeout: 250 seconds]
akkad has quit [Excess Flood]
<ellistaa> can someone say why this doesnt return the reversed string but the normal string …? https://gist.github.com/ellismarte/39adb3d8e3d57f050863
unsymbol has joined #ruby
ebbflowgo has joined #ruby
dlitvak has joined #ruby
hxegon has joined #ruby
Limix has quit [Quit: Limix]
tyrbo has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Ping timeout: 260 seconds]
<Mon_Ouie> 5 = 0b101, 6 = 0b110, 0b101 XOR 0b110 = 0b011 = 3
<ellistaa> NVM
baweaver has quit [Ping timeout: 240 seconds]
<drbrain> ellistaa: maybe looking for **?
ur5us has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
hays has joined #ruby
pengus has quit [Ping timeout: 250 seconds]
akkad has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<nymous> nah, oj didn't helped much, just 3 minutes less
gr1zzlybe4r has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
<gr1zzlybe4r> Does Ruby have something equivalent to $PYTHONPATH in Python? Or, does one always need to use "load_path.unshift" to get that functionality?
ellistaa has quit [Quit: ellistaa]
cdg has quit [Remote host closed the connection]
weemsledeux has joined #ruby
<drbrain> gr1zzlybe4r: $RUBYLIB
mrsolo_ has joined #ruby
<drbrain> gr1zzlybe4r: also ruby -I /path/to/your/ruby/files
spider-mario has quit [Read error: Connection reset by peer]
dlitvak_ has joined #ruby
Coldblackice has quit []
dlitvak has quit [Ping timeout: 245 seconds]
<gr1zzlybe4r> drbrain: So, that will allow me to `require "my_script"` for all scripts located in the path's specified by $RUBYLIB?
<drbrain> yes
<gr1zzlybe4r> drbrain: Thanks :)
<drbrain> ruby -I is added in front of RUBYLIB is added in front of gems
pdoherty has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
B1n4r10 has joined #ruby
maneco has joined #ruby
Or1on_ has quit [Quit: gone]
jgpawletko has joined #ruby
pawnbox has joined #ruby
maneco has quit [Client Quit]
maneco has joined #ruby
ElFerna has joined #ruby
lyoshajapan has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
Guest34283 is now known as wanderer
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
wanderer is now known as Guest57677
huQeQwdpu47q has joined #ruby
DLSteve has joined #ruby
huQeQwdpu47q has quit [Max SendQ exceeded]
kirillzh has joined #ruby
huQeQwdpu47q has joined #ruby
gruz0 has quit [Quit: This computer has gone to sleep]
jottr_ has joined #ruby
kies^ has joined #ruby
jottr has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 245 seconds]
ElFerna has quit [Ping timeout: 265 seconds]
devbug has quit [Ping timeout: 276 seconds]
kirillzh has quit [Client Quit]
mfb2 has quit [Remote host closed the connection]
_djbkd has quit [Remote host closed the connection]
jottr_ is now known as jottr
stannard has quit [Remote host closed the connection]
x77686d has quit [Quit: x77686d]
stevemackinnon has quit [Remote host closed the connection]
dlitvak_ has quit [Remote host closed the connection]
<Darmani> Hey guys
Guest57677 has quit [Changing host]
Guest57677 has joined #ruby
<Darmani> So I'm building Hangman.
Guest57677 is now known as giraffe
<Darmani> Can you guys tell me what you think of it so far?
<Darmani> It's not finished but tell me if it's okay.
Liquid-- has joined #ruby
dlitvak has joined #ruby
Snowy has quit []
Liquid-- has quit [Client Quit]
elifoster has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
charliesome has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
scottschecter has joined #ruby
scottschecter has quit [Max SendQ exceeded]
sepp2k has quit [Quit: Leaving.]
B1n4r10 has quit [Ping timeout: 240 seconds]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershell has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
giraffe has quit [Quit: bye]
wanderer_ has joined #ruby
Ebok has joined #ruby
wanderer_ has quit [Changing host]
wanderer_ has joined #ruby
wanderer_ is now known as giraffe
stevemackinnon has joined #ruby
musicnode has quit [Quit: musicnode]
lyoshajapan has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
kalopsian has quit [Ping timeout: 240 seconds]
lyoshajapan has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
scripore has joined #ruby
lyoshajapan has quit [Client Quit]
tubuliferous_ has quit [Ping timeout: 264 seconds]
freerobby has joined #ruby
Wizek has quit [Ping timeout: 250 seconds]
musicnode has joined #ruby
usershell has quit [Ping timeout: 240 seconds]
mfb2 has joined #ruby
aspire has joined #ruby
dlitvak has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
Ebok has quit [Ping timeout: 260 seconds]
tyrbo has joined #ruby
mfb2 has quit [Remote host closed the connection]
dlitvak has joined #ruby
aspire has quit [Client Quit]
tildes has quit [Ping timeout: 245 seconds]
tildes has joined #ruby
<baweaver> Darmani: global variables are not recommended
despai has quit [Quit: This computer has gone to sleep]
ebbflowgo has joined #ruby
<baweaver> use a constant instead in that case.
usershell has joined #ruby
bb010g has joined #ruby
<Darmani> baweaver - Done ^.^
ebbflowgo has quit [Client Quit]
<Darmani> Does the logic look okay?
pawnbox has joined #ruby
<Darmani> Or is it sketchy?
<baweaver> 22 needs work
<Darmani> I figured... Was it at least a good try? Lol
<baweaver> for contents: CONTENTS = File.read('name').split
mantas322 has joined #ruby
<baweaver> Look into highline for prompts
<mantas322> Hello
<Darmani> highline...? Is that a gem?
<baweaver> yep
blackgoat has joined #ruby
<Darmani> baweaver - Alright, thanks dude ^^
<baweaver> also avoid mutating variables in display type methods
ascarter has joined #ruby
<baweaver> display_view line 18
<Darmani> Ah.
<baweaver> instead, I would put that in initialize
<Darmani> Okayy.
ascarter_ has joined #ruby
<mantas322> So i've been reading recent articles that the ruby community hates black woman and muslims, is this true?
<mantas322> Well I never!
<baweaver> !troll mantas322
mantas322 was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<Darmani> LOL
<Darmani> Noooooo
<Darmani> Why'd you kick himmm
guacamole has quit [Read error: Connection reset by peer]
<baweaver> meta on trolls is also bannable, feel free to discuss in #ruby-offtopic
n00bdev has joined #ruby
<Darmani> Q.Q I guess... I wanted to have a little fun... lol
<baweaver> No
marr has quit [Ping timeout: 260 seconds]
<baweaver> and that's the end of that, we don't feed trolls
guacamole has joined #ruby
musicnode has quit [Ping timeout: 272 seconds]
<Darmani> Okay boss man.
gr1zzlybe4r has quit [Quit: WeeChat 1.1.1]
casadei has joined #ruby
<graphettion> Stay professional and on-topic. enough said.
pawnbox has quit [Ping timeout: 250 seconds]
<graphettion> There are plenty of other rooms to troll in. :)
<baweaver> Feel free to continue meta-discussion in #ruby-offtopic.
<Darmani> right right right I get it
* Darmani sighs
cpup has quit [Ping timeout: 260 seconds]
<baweaver> anyways, I would mask that hidden input
<Scriptonaut> could anyone suggest either ideas or a resource for basic commandline ruby program ideas for a beginner? I am trying to coach a friend to get started with ruby and to keep him interested I think I need to help him make useful programs that he can actually see in action
<baweaver> OptParser would be simple
<baweaver> I think Gosu might be more hand
<baweaver> y
<baweaver> used for games
<baweaver> otherwise I would look into Wicked Cool Ruby Scripts
<Scriptonaut> baweaver: were you responding to me?
<baweaver> or there was one on building CLIs in Ruby
<baweaver> yeah
guacamole has quit [Read error: Connection reset by peer]
<baweaver> sorry, switching through a few tabs
<Scriptonaut> Oh. Ok so OptParser, wha tis that
B1n4r10 has joined #ruby
<graphettion> Scriptonaut: http://tryruby.org/
guacamole has joined #ruby
cpup has joined #ruby
<Scriptonaut> I just convinced him to compile ruby, so he has it on his system
<baweaver> graphettion: yeah, that too.
<Scriptonaut> baweaver: I'll look at Wicket Cool Ruby Scripts
<baweaver> Most anything by No Starch Press is great on Ruby
<baweaver> There was a Mazes book from Prag Prog earlier
<baweaver> I'd have to find it again
<graphettion> http://rubinius.com/ is a good compiler
CloCkWeRX has quit [Ping timeout: 240 seconds]
nymous has quit [Quit: RAGING AXE! RAGING AXE!]
tyrbo has quit [Ping timeout: 256 seconds]
<baweaver> there it is
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvw has quit [Ping timeout: 245 seconds]
ta has joined #ruby
<baweaver> Really most anything from PragProg and NoStarch are worth a read
newbie22 has joined #ruby
<Scriptonaut> cool, thanks
<graphettion> Pretty much.
<Scriptonaut> I'm mostly looking for just some simple ideas
<Scriptonaut> I'm proficient in ruby, so I can help with the implementation
<Scriptonaut> and he is a poweruser with linux/BSD, so I figured some commandline utilities would be cool
<Scriptonaut> something you can pipe to and it does something useful
<Scriptonaut> or perhaps a hardware monitor (CPU, MEM, battery, etc)
tyrbo has joined #ruby
<baweaver> God, Bluepill, Monit, Eye, and a few others.
<Scriptonaut> cool
hxegon has quit [Ping timeout: 250 seconds]
ta has quit [Ping timeout: 245 seconds]
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
ascarter_ has quit [Quit: Textual IRC Client: www.textualapp.com]
jcdesimp_ has quit [Quit: Leaving...]
ziyadb has quit [Quit: Connection closed for inactivity]
dexter-tzu has joined #ruby
mfb2 has joined #ruby
zeknox has quit [Quit: Leaving.]
Limix has joined #ruby
ElFerna has joined #ruby
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
workmad3 has joined #ruby
newbie22 has quit [Quit: Leaving]
crowell is now known as browell
jcdesimp has joined #ruby
browell is now known as corwell
tyrbo has quit [Ping timeout: 256 seconds]
mfb2 has quit [Ping timeout: 265 seconds]
epi_ has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
tyrbo has joined #ruby
CloCkWeRX has joined #ruby
ebbflowgo has joined #ruby
houhoulis has joined #ruby
pdoherty has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
zoo-zed has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
Musashi007 has joined #ruby
blackmesa has joined #ruby
patrick99e99 has quit [Quit: Page closed]
tlaxkit has quit [Quit: ¡Hasta luego!]
k13nox has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
mattp_ has joined #ruby
Scriptonaut has left #ruby [#ruby]
B1n4r10 has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
tenderlove has quit [Remote host closed the connection]
bronson has joined #ruby
jam_ has joined #ruby
k13nox has quit [Ping timeout: 245 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
epi_ has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
jam_ has quit [Ping timeout: 265 seconds]
bronson has quit [Ping timeout: 265 seconds]
kalopsian has joined #ruby
guacamole has joined #ruby
dstarh has joined #ruby
guacamole has quit [Client Quit]
minimalism has quit [Quit: minimalism]
baweaver has quit [Remote host closed the connection]
sneakerhax has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
guacamol_ has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
zambini has quit [Quit: Leaving.]
hannelita has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 260 seconds]
x77686d has joined #ruby
tyrbo has quit [Ping timeout: 256 seconds]
pontiki has joined #ruby
<pontiki> hi o/
jackjackdripper has quit [Quit: Leaving.]
guacamole has quit [Quit: Textual IRC Client: www.textualapp.com]
<kbni> is there any issue with having labels being mixed-case?
guacamole has joined #ruby
<kbni> :LikeThis?
guacamole has quit [Client Quit]
aeontech has quit [Ping timeout: 265 seconds]
paradisaeidae has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zoo-zed has quit [Quit: Textual IRC Client: www.textualapp.com]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
<Radar> kbni: labels in what context?
victortyau has quit [Quit: Textual IRC Client: www.textualapp.com]
Coldblackice has joined #ruby
tyrbo has joined #ruby
baweaver has joined #ruby
tildes has quit [Ping timeout: 240 seconds]
countryHick has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
ta has joined #ruby
wanderer has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.3]
pdoherty has quit [Ping timeout: 260 seconds]
wanderer is now known as Guest21840
Guest21840 has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 240 seconds]
bryancp has quit [Quit: Connection closed for inactivity]
tenderlove has joined #ruby
ta has quit [Ping timeout: 245 seconds]
n00bdev has quit [Remote host closed the connection]
hannelita has joined #ruby
al2o3-cr has joined #ruby
tyrbo has quit [Ping timeout: 256 seconds]
akem has joined #ruby
basic` has joined #ruby
<basic`> hi all, i'm trying to parse some "csv" style data into an array and having quite a bit of trouble dealing with quotes
<ruby[bot]> basic`: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/8c5d463e0b10052d6f30
<ruby[bot]> basic`: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<basic`> thanks ruby[bot]
<kbni> Radar, in a list of fields to iterate over
<Radar> kbni: Do you have some code you can show us?
<basic`> you can see that first column is getting split even though there are quotes
<kbni> sure
<basic`> if i use double quotes, i get an error "CSV::MalformedCSVError: Illegal quoting in line 1."
<kbni> inside class Foo.. self.fields = [ :id, :name, :ProjectID ]
jbrhbr has quit [Quit: Leaving.]
<kbni> then self.field is iterated over
<Radar> basic`: It's not CSV though
<basic`> i'm not sure how to get this thing to work correctly, or maybe i should give up on csv and use some regex
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> basic`: Look at the ShellWords package. It might get you closer.
<basic`> shellwords? okay
<basic`> thanks, lemme look
akem has quit [Remote host closed the connection]
<Radar> kbni: No, there's no issue with having them like that.]
<Radar> kbni: But I guess if you're asking about it you might be seeing an issue?
hannelita has quit [Remote host closed the connection]
<Radar> I guess if it's an API you don't get to control if they're project_Id instead ProjectID
<Radar> project_id*
<kbni> I'm not seeing an issue - I'm new to ruby and it's nuanced ways, I'm just wondering why the original author has done it like that
<Radar> You could snake case them
<kbni> snake case?
<Radar> kbni: probably just for compat with the API
<Radar> kbni: this_is_snake_case
frem has quit [Quit: Connection closed for inactivity]
<kbni> The problem is the API uses camelcase, and does not change
<kbni> so whilst :resourceid.to_s.camelize.gsub(/ID$/, 'ID') changes it to ResourceID correctly, :projectworktypeid needs to change it to ProjectWorkTypeID
<kbni> I'm wondering why the author simply didn't populate fields with [ :ProjectID, :ProjectWorkTypeID ] etc
chouhoulis has joined #ruby
weemsledeux has joined #ruby
Bloomer has joined #ruby
<basic`> Radar: hm, not seeing how shellsplit helps... i need to create an array out of https://gist.github.com/anonymous/8c5d463e0b10052d6f30 basically (added a comment there)
<Radar> basic`: Sorry, I thought it might but I guess it didn't :(
yqt has quit [Ping timeout: 250 seconds]
<basic`> no worries, i was needing something to help me feel some hopefulness :)
chouhoulis has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kcantwel has joined #ruby
<al2o3-cr> basic`: it does return an array
<kbni> Is it possible to do a case insensitive search for a node in xpath/nokogiri?
govg has quit [Ping timeout: 264 seconds]
k13nox has joined #ruby
System42 has joined #ruby
mrsolo_ has quit [Quit: This computer has gone to sleep]
pawnbox has joined #ruby
arlek has joined #ruby
<basic`> al2o3-cr: ya, but it doesn't split properly with the commas
<al2o3-cr> Yeah, I see that now
aeontech has joined #ruby
<basic`> i'm trying to understand its gsub
mrsolo_ has joined #ruby
n00bdev has joined #ruby
skcin7 has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
usershell has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
Darmani has quit [Ping timeout: 252 seconds]
ljames has quit [Excess Flood]
k13nox has quit [Ping timeout: 276 seconds]
ljames has joined #ruby
govg has joined #ruby
usershell has joined #ruby
ljames has quit [Excess Flood]
ljames has joined #ruby
<basic`> odd, i get a premature end of class if i try and define it myself
devbug has joined #ruby
tenderlove has quit [Remote host closed the connection]
ramfjord has joined #ruby
wheresmyjetpack has joined #ruby
duckpuppy has joined #ruby
devbug has quit [Ping timeout: 245 seconds]
n00bdev has quit [Remote host closed the connection]
A124 has quit [Quit: '']
<basic`> hey, it's really close... need to make sure it doesn't strip quotes from inside of the quotes...
tenderlove has joined #ruby
<basic`> guessin dq == doublequote
mrsolo_ has quit [Quit: This computer has gone to sleep]
Limix has quit [Quit: Limix]
A124 has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pande has joined #ruby
user083 has quit [Quit: leaving]
kies^ has quit [Ping timeout: 250 seconds]
B1n4r10 has quit [Ping timeout: 240 seconds]
A124 has quit [Quit: '']
karmatr0n has quit [Read error: No route to host]
konsolebox has quit [Ping timeout: 265 seconds]
konsolebox has joined #ruby
VeganGreg has joined #ruby
A124 has joined #ruby
mousier has joined #ruby
maneco has quit [Quit: maneco]
workmad3 has joined #ruby
pantato has joined #ruby
SenpaiSilver has joined #ruby
blackgoat has quit [Ping timeout: 276 seconds]
ta has joined #ruby
Musashi007 has joined #ruby
rkazak has joined #ruby
toretore has joined #ruby
underplank has quit [Quit: underplank]
nbdy has joined #ruby
aeontech has quit [Quit: aeontech]
nbdy has quit [Max SendQ exceeded]
ta has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
wonk has quit [Ping timeout: 260 seconds]
VeganGreg has quit [Ping timeout: 256 seconds]
kcantwel has quit [Quit: Computer has gone to sleep.]
<basic`> got it! thanks for the pointer Radar -- i was able to slightly modify that regex and make this work
robbyoconnor has quit [Read error: Connection reset by peer]
<Radar> great :)
CloCkWeRX has left #ruby [#ruby]
robbyoconnor has joined #ruby
TomPeed has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
usershell has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
ss_much has joined #ruby
postmodern has quit [Quit: Leaving]
decaff has quit [Quit: WeeChat 0.4.2]
hannelita has joined #ruby
toretore has quit [Ping timeout: 245 seconds]
Guest49796 has joined #ruby
Guest49796 is now known as vegangreg
hannelita has quit [Ping timeout: 264 seconds]
hlegius has joined #ruby
pawnbox has quit [Remote host closed the connection]
<vegangreg> How good does one need to be at programming to get an entry level developer job? I've been teaching myself ruby/rails/and jquery for about a year and am trying to figure out whether I might be decent enough to start looking for a gig.
blackmesa has joined #ruby
kies^ has joined #ruby
baweaver has joined #ruby
<al2o3-cr> basic`: this should work: options.scan(/(?:\'[^'']*\'|[^,])+/)
<basic`> al2o3-cr: oh fancy
k13nox has joined #ruby
<basic`> al2o3-cr: that's much cleaner
jam_ has joined #ruby
krz has joined #ruby
<al2o3-cr> :P
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<al2o3-cr> yours is a bit OTT
braincrash has quit [Quit: bye bye]
bronson has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
zacts has quit [Quit: leaving]
zacts has joined #ruby
Guest36761 is now known as saneax_AFK
<basic`> huh, oh i see what's happening
<basic`> it almost works al2o3-cr -- it's not escaping / removing some of the inner quotes correctly
jam_ has quit [Ping timeout: 250 seconds]
<basic`> ["from=\"10.1.1.42", "10.1.1.41\"", "no-port-forwarding", -- the quotes inside of the from="ip,ip" need to go away
slackbotgz has joined #ruby
treaki_ has joined #ruby
wheresmyjetpack has quit [Read error: Connection reset by peer]
<al2o3-cr> basic`: options.scan(/(?:\'[^'']*\'|[^,])+/).map { |h| h.tr("'", '') } ?
System42 has quit [Quit: Leaving]
bronson has quit [Ping timeout: 265 seconds]
<basic`> same output it looks like
<basic`> it's okay, i can use the slightly modified shellprint stuff
jackjackdripper has joined #ruby
<al2o3-cr> Ah, is the whole string single quoted?
scripore has quit [Quit: This computer has gone to sleep]
scripore has joined #ruby
duckpuppy has quit [Ping timeout: 245 seconds]
treaki has quit [Ping timeout: 272 seconds]
casadei has quit [Remote host closed the connection]
k13nox has quit [Ping timeout: 260 seconds]
<al2o3-cr> basic`: if it is, use: options.scan(/(?:\"[^""]*\"|[^,])+/).map { |h| h.tr('"', '') }
tjbiddle has joined #ruby
Pande has quit [Ping timeout: 240 seconds]
<Radar> vegangreg: the demand is high enough now that you could probably start applying for jobs and get them
casadei has joined #ruby
<vegangreg> that's definitely encouraging---I've read that the demand is quite high
hlegius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toretore has joined #ruby
scripore has quit [Client Quit]
<vegangreg> I'm moving to Portland next month and am planning on starting to apply for work when I get there
zast has joined #ruby
braincrash has joined #ruby
DarkElement has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
pdoherty has joined #ruby
Renich has joined #ruby
devbug_ has joined #ruby
<Radar> Oh neat. They have a good Ruby group there iirc.
czsr has joined #ruby
<Abrin> I am so glad that someone recommend the book 'Practical Object-Oriented Design in Ruby' it is flippin amazing!
s00pcan has quit [Ping timeout: 250 seconds]
<Abrin> sorry....just got overexcited there for a second and had to share with the group. :)
<Radar> Abrin: that's alright :) Excited sharing is best sharing.
pawnbox has joined #ruby
krz has quit [Ping timeout: 272 seconds]
<Abrin> This group has great book recommendations.
iateadonut has joined #ruby
s00pcan has joined #ruby
psy_ has quit [Ping timeout: 264 seconds]
<vegangreg> Radar: it looks like that's true---also planning on gettin involved with the meetup groups and whatnot
casadei has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblum has quit [Ping timeout: 260 seconds]
<vegangreg> any job hunting advice/things to watch out for in the programming job world would be appreciated
pdoherty has quit [Ping timeout: 250 seconds]
<Radar> never work for equity
jam_ has joined #ruby
<Radar> man, so many things :P
<Abrin> sorry to ask a stupid question, but what is equity?
<Radar> Ask around at the Ruby meetups. They'll give you better advice than an IRC channel can
<Radar> Abrin: A share of the eventual profit of the business.
<eam> you should totally work for equity -- but only if you understand how it works
<Abrin> Oh yes, I can see how one could live to regret that.
<baweaver> eam likes equity right now
<eam> equity sharing is why silicon valley is full of millionaires
wonk has joined #ruby
<eam> (and by full I mean actually full)
<baweaver> eam worked for Square when they went public, and still does.
<Radar> Would be nice if some of that VC money made its way to AU :P)
<Abrin> I heard SF is going through another bubble. I get why the first one existed but the second is a mystery to me.
Musashi007 has quit [Quit: Musashi007]
<eam> baweaver: been a fan of working for an equity mix my whole life
<vegangreg> it seems like there are lots of legal issues surrounding equity compensation that are quite difficult to understand
s00pcan has quit [Ping timeout: 245 seconds]
<baweaver> fair
<Abrin> I actually have no idea what Square is. I've been living in bliss when it comes to anything in the world of business.
<Radar> square.com
<eam> vegangreg: one of the larger angles is that you can push earnings into capital gains
<Abrin> I remember when the first bubble came around all my friends kept talking about vesting. They were millionares overnight and hten lost those millions overnight.
<eam> but there are a ton of complications with doing that
s00pcan has joined #ruby
<baweaver> I'm pretty well pure salary at this point
<eam> Abrin: the key about any investing, whether through your labor or buying stocks for cash, is to be conservative and plan for the worst
<baweaver> though with SIE's formation, I might see about some stock sharing / etc coming up...
<eam> the folks who "lost millions" never really had them
<Abrin> eam: Yes, but everyone always thinks they are going to get out with their money before the worst happens. Hee hee.
<eam> yeah
Musashi007 has joined #ruby
<eam> lots of over-leveraged people in any industry
<Abrin> eam: Oh yes, it was a paper shuffle. I mean Redhat sold for $100 a share at one point.
<vegangreg> and there seem to be a lot of issues with actually being able to sell your shares when you terminate your employment
<vegangreg> lots of restrictions in the contract
<eam> I have a buddy who worked at apple from the late 90s to late 00s. He regularly sold his stock as it vested over the decade he was there
<eam> it would've been worth a LOT more if he had held it, but he's happy he sold it because it fit the risk profile he had at the time
<Abrin> eam: Lucky buddy!
<eam> (and his previos gig was netscape, where he saw a lot of coworkers hold then fold)
RegulationD has joined #ruby
<eam> chickens, hatch, reasonable expectations, etc
<Abrin> I know people who worked for Microsoft as 'non-employees' even though they were employees with that big lawsuit-thingy back in the day
<eam> Abrin: I did that as well
<eam> I was an orange-badge msft temp
<Abrin> netscape...damn I miss that browser. Firefox makes me miserable these days.
<eam> it was immediately after the perma-temp lawsuit, they treated us very well
<baweaver> ah, eam, I have a new employer now
<eam> oh yeah? where'd you hop to?
<baweaver> SIE
<baweaver> Sony Interactive Entertainment :P
<eam> aha
<baweaver> (restructure)
tlarevo has joined #ruby
<eam> I was gonna say, weren't you already at sony?
<baweaver> they have an emergency meeting to tell us about it
duncannz has quit [Remote host closed the connection]
<baweaver> happened some time yesterday
<Abrin> I'd ask why the heck there is a second bubble but I don't want to get too OT in the channel. If anyone is ever in #ruby-offtopic I'd love to hear about it there.
tlarevo has quit [Read error: Connection reset by peer]
<eam> I'm in there, happy to chat
<baweaver> same
<shevy> Abrin is this nostalgia here :D
krz has joined #ruby
ta has joined #ruby
jottr has joined #ruby
ur5us has quit [Remote host closed the connection]
<shevy> "netscape geocities-browsing marquee-tag loving pinkish-homepage fossil visitors"!
czsr has quit [Quit: Leaving]
<Abrin> come with us to #ruby-oftopic shevy. We are getting all nostalgic in there. :)
countryHick has quit [Quit: Connection closed for inactivity]
<shevy> they play unicode hangman there :<
Sucks has quit [Read error: Connection reset by peer]
<eam> bring back the blink tag
rkazak has quit [Quit: Sleep.....ing....]
<al2o3-cr> shevy: not anymore, the bot is brown bread :(
slackbotgz has quit [Remote host closed the connection]
* Abrin snickers....bring back the bling tag.
ta has quit [Ping timeout: 245 seconds]
jottr has quit [Ping timeout: 240 seconds]
<DarkElement> How can I get the html of a page/ use nokogiri or open-uri through a proxy?
benlovell has joined #ruby
DiCablo has joined #ruby
User458764 has joined #ruby
barajasfab has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<al2o3-cr> DarkElement: how do you mean?
krz has quit [Quit: WeeChat 1.2]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hannelita has joined #ruby
<DarkElement> New question, since you can do that with http://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html, can I parse the output of this with Nokogiri?
Renich has quit [Quit: leaving]
<al2o3-cr> DarkElement: yes
<DarkElement> Ok. al2o3-cr, any place you can recommend for proxies? I've not used them in this fashion before.
usershell has joined #ruby
<al2o3-cr> DarkElement: What do you need a proxy for?
<DarkElement> So that craigslist doesn't ip block me when I make a bunch of asynchronous requests with my army of web scrapers.
<DarkElement> :)
jcdesimp has quit [Remote host closed the connection]
tildes has joined #ruby
<al2o3-cr> :P
<DarkElement> Is there a simple website where they are constantly adding new proxies?
<al2o3-cr> DarkElement: I don't know of any off hand
<DarkElement> No problem, not really a #ruby question anyway
<al2o3-cr> DarkElement: btw, open-uri takes a proxy
d10n-work has quit [Quit: Connection closed for inactivity]
hannelita has quit [Ping timeout: 240 seconds]
<DarkElement> I tried that earlier and it wasn't working though
<al2o3-cr> What was you trying?
Ebok has joined #ruby
<DarkElement> Idk, I don't have the code. It resembled the example online, however
<DarkElement> \_:|_/
usershell has quit [Remote host closed the connection]
blackmesa has joined #ruby
usershell has joined #ruby
underplank has joined #ruby
CloCkWeRX has joined #ruby
devbug_ has quit [Ping timeout: 260 seconds]
duncannz has joined #ruby
houhouli_ has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
Musashi007 has quit [Quit: Musashi007]
usershell has quit [Remote host closed the connection]
houhoulis has quit [Ping timeout: 276 seconds]
htmldrum has joined #ruby
yuung has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
usershell has joined #ruby
joneshf-laptop has quit [Ping timeout: 264 seconds]
lemur has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
joneshf-laptop has joined #ruby
yfeldblum has joined #ruby
toretore has quit [Ping timeout: 256 seconds]
lemur has quit [Ping timeout: 250 seconds]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
Ebok has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
pawnbox_ has joined #ruby
tenderlove has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
Limix has joined #ruby
<Radar> Nokogiri::HTML.parse
<Radar> next
<DarkElement> Net::HTTP.new(url, nil, proxy_addr, proxy_port).start{ |http| } is never executing, anyone have any ideas what i'm doing wrong ?
<DarkElement> Wait what
<Radar> DarkElement: HTTParty.get
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
<DarkElement> wat
<DarkElement> What does that do?
<Radar> I'm assuming you want to make HTTP requests easily?
<DarkElement> Yea, with a proxy
<Radar> And you're using Net::HTTP because... you don't want to make them easily?
<DarkElement> I thought that was the way to do it
<Radar> HTTParty has a much nicer API than Net::HTTP.
<DarkElement> This doesn't look any "nicer" than net/http
colegatron has quit [Ping timeout: 245 seconds]
blackgoat has joined #ruby
<DarkElement> But if it's faster, then yea i'm down
<DarkElement> Radar, what does quotaguardstatic have to do with it?
pawnbox_ has quit [Ping timeout: 250 seconds]
<Radar> DarkElement: Why do you fail to read.
<Radar> DarkElement: It's an example of using a proxy with HTTParty in Ruby.
<Radar> The first result on google for "httparty proxy"
<DarkElement> Sorry
<Radar> Rather than messing around with Net::HTTP's frankly awful API
wonk has quit [Quit: Leaving]
pawnbox has joined #ruby
<DarkElement> Thank ya
hakunin_ is now known as hakunin
<droptone> Question: I'm leveraging ActiveRecord in my Ruby project and I've got the class definitions set to mimick a corresponding Rails project, with dependent: :destroy elements set in the classes
<droptone> If, within the Ruby project, I .destroy an object, will ActiveRecord by default destroy all dependent records?
joneshf-laptop has quit [Ping timeout: 250 seconds]
karapetyan has joined #ruby
GinoManWorks_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
GinoManWorks has quit [Ping timeout: 250 seconds]
govg has quit [Ping timeout: 245 seconds]
ReK2 has quit [Quit: Konversation terminated!]
dlitvak has joined #ruby
govg has joined #ruby
ramfjord has joined #ruby
ReK2 has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
GinoManWorks_ has quit [Read error: Connection reset by peer]
tyrbo has joined #ruby
<Radar> ?code droptone
<ruby[bot]> droptone: We can't help you without your code, please post it to https://gist.github.com
karapetyan has joined #ruby
GinoManWorks has joined #ruby
oivoodoo has joined #ruby
dlitvak has quit [Ping timeout: 272 seconds]
jottr has joined #ruby
colegatron has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
oivoodoo has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 276 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
<droptone> Radar: It's a question. I have the same dependent: :destroy declerations in my classes that one would have in a Rails model. If I .destroy a model in my Ruby project, will it automatically destroy the dependent classes like it would in Rails?
<droptone> Do I really need to post code for this?
<Radar> droptone: Yes.
<droptone> Ok, thank you.
<Radar> droptone: I want to know that we're talking about the same things.
<droptone> Ok, hang on.
jackjackdripper has quit [Quit: Leaving.]
DarkElement has quit [Quit: Leaving]
oivoodoo has joined #ruby
<Radar> droptone: ok, thanks.
<Radar> droptone: Yes, ActiveRecord works the same no matter where you use it.
<droptone> Perfect, thank you.
barajasfab has quit [Quit: Leaving]
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper has joined #ruby
mattp_ has quit [Ping timeout: 240 seconds]
terminalrecluse has joined #ruby
hannelita has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
akem has joined #ruby
yoongkang has joined #ruby
ur5us has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
valeri_ufo has quit [Ping timeout: 265 seconds]
mc_fail has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
blackmesa has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
al2o3-cr has quit [Quit: WeeChat 1.3]
bronson has joined #ruby
Brklyn has joined #ruby
al2o3-cr has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
wolffles has joined #ruby
arup_r has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
jam_ has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 265 seconds]
Brklyn has quit [Ping timeout: 276 seconds]
duckpuppy has joined #ruby
marcdel has joined #ruby
Ilyes512 has joined #ruby
sigurding has joined #ruby
valeri_ufo has joined #ruby
eggoez has quit [Ping timeout: 250 seconds]
ohcibi has quit [Quit: No Ping reply in 180 seconds.]
marcdel_ has joined #ruby
al2o3-cr has quit [Ping timeout: 250 seconds]
al2o3-cr has joined #ruby
mc_fail has joined #ruby
mattp_ has joined #ruby
darkf has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
marcdel_ has quit [Ping timeout: 240 seconds]
puria has joined #ruby
betafive has quit [Ping timeout: 252 seconds]
whiteline_ is now known as whiteline
joneshf-laptop has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has joined #ruby
tyrbo has quit [Ping timeout: 240 seconds]
djellemah_ is now known as djellemah
ur5us has joined #ruby
pengus has joined #ruby
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
paradisaeidae has quit [Ping timeout: 265 seconds]
rkazak has joined #ruby
vegangreg has joined #ruby
ta has joined #ruby
aganov has joined #ruby
jottr has joined #ruby
terminalrecluse has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wolffles> another way to do: ary[1]*ary[21]*ary[41]*ary[61]
<wolffles> ?
<flughafen> morning shevy
* flughafen just got back from japan
mdw has joined #ruby
terminalrecluse has joined #ruby
solars has joined #ruby
<shevy> yo flughafen - one day airplanes will fly from berlin again!
kennyfrc has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 272 seconds]
ta has quit [Ping timeout: 240 seconds]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has quit [Client Quit]
<baweaver> wolffles: what have you tried?
<baweaver> and what is the entire problem?
<baweaver> remember arrays start at index 0 as well
<manveru> wolffles:ary.values_at(1,21,41,61).reduce(:*)
usershel_ has joined #ruby
eggoez has joined #ruby
<wolffles> thats what i was looking for
<manveru> i know what you need baby
<wolffles> i was trying to do a splat and inject
terminalrecluse has quit [Client Quit]
usershell has quit [Ping timeout: 240 seconds]
underplank has quit [Quit: underplank]
<manveru> well, there might be another way if you always need it in steps of 20, but right now it would just make stuff longer
rkazak has quit [Quit: Sleep.....ing....]
devlitzi has joined #ruby
<shevy> "<manveru> i know what you need baby" lol, one more IRC quote to add for my epic collection
sigurding has quit [Quit: sigurding]
chouhoulis has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aufi has joined #ruby
yuung has quit [Quit: Leaving]
<wolffles> manveru thanks
jordanm has joined #ruby
ohcibi has joined #ruby
jcdesimp has joined #ruby
graphettion has quit [Remote host closed the connection]
devlitzi has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 250 seconds]
arup_r has quit [Remote host closed the connection]
n00bdev has joined #ruby
TomyLobo has joined #ruby
jcdesimp has quit [Ping timeout: 264 seconds]
stevemackinnon has quit [Remote host closed the connection]
n00bdev has quit [Client Quit]
ledestin has joined #ruby
karapetyan has quit [Remote host closed the connection]
benlovell has joined #ruby
hannelita has joined #ruby
Pupp3tm4st3r has joined #ruby
Limix has quit [Quit: Limix]
haxrbyte has quit [Quit: Leaving...]
ljames has quit []
arup_r has joined #ruby
arup_r has quit [Remote host closed the connection]
blackmesa has joined #ruby
oivoodoo has quit [Remote host closed the connection]
hannelita has quit [Ping timeout: 240 seconds]
zast has quit [Remote host closed the connection]
Pupp3tm4st3r has quit [Ping timeout: 240 seconds]
oivoodoo has joined #ruby
arup_r has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
aeontech has joined #ruby
duncannz has joined #ruby
user has joined #ruby
karapetyan has joined #ruby
grassass has quit [Ping timeout: 256 seconds]
rkazak has joined #ruby
ss_much_ has joined #ruby
tyrbo has joined #ruby
Pupp3tm4st3r has joined #ruby
huQeQwdpu47q_ has joined #ruby
graffix has quit [Ping timeout: 250 seconds]
guacamole has joined #ruby
ReK2GnULinuX has joined #ruby
ss_much has quit [Ping timeout: 240 seconds]
huQeQwdpu47q has quit [Ping timeout: 240 seconds]
guacamol_ has quit [Ping timeout: 240 seconds]
alexherbo2 has quit [Ping timeout: 240 seconds]
pengus has quit [Ping timeout: 240 seconds]
colegatron has quit [Ping timeout: 240 seconds]
ReK2 has quit [Remote host closed the connection]
pengus has joined #ruby
colegatron_origi has joined #ruby
ss_much_ is now known as ss_much
symm- has joined #ruby
andikr has joined #ruby
duncannz has quit [Quit: Leaving]
sigurding has joined #ruby
yoongkang has quit [Remote host closed the connection]
al2o3-cr has quit [Ping timeout: 265 seconds]
alexherbo2 has joined #ruby
amclain has quit [Quit: Leaving]
x77686d has quit [Quit: x77686d]
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Ping timeout: 265 seconds]
jackjackdripper has joined #ruby
marcdel has joined #ruby
benlovell has quit [Ping timeout: 276 seconds]
TomyLobo has quit [Ping timeout: 250 seconds]
kerunaru has joined #ruby
marcdel has quit [Ping timeout: 276 seconds]
Xiti has quit [Quit: Xiti]
karapetyan has quit [Remote host closed the connection]
mdw has joined #ruby
ss_much has quit [Quit: Connection closed for inactivity]
anisha_ has joined #ruby
scepticulous has joined #ruby
whiteline has quit [Ping timeout: 265 seconds]
firstdayonthejob has joined #ruby
Jet4Fire has quit []
Xiti has joined #ruby
al2o3-cr has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
vegangreg has joined #ruby
jottr has joined #ruby
visudo has joined #ruby
Dimik has quit [Ping timeout: 245 seconds]
akem has quit [Read error: No route to host]
tvw has joined #ruby
User458764 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
tildes has quit [Ping timeout: 276 seconds]
CloCkWeRX has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
troulouliou_div2 has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
Jet4Fire has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
PedramT has joined #ruby
duckpuppy has joined #ruby
PedramT_ has joined #ruby
mdw has quit [Ping timeout: 276 seconds]
Azulinho has joined #ruby
tituspull0 has joined #ruby
vegangreg has joined #ruby
govg has quit [Ping timeout: 264 seconds]
arup_r has quit []
anisha_ has quit [Quit: This computer has gone to sleep]
skade has joined #ruby
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha_ has joined #ruby
duckpuppy has quit [Ping timeout: 276 seconds]
PedramT has quit [Ping timeout: 276 seconds]
duncannz has joined #ruby
ta has joined #ruby
<tituspull0> test123
howdoi has joined #ruby
<ddv> test failed
hannelita has joined #ruby
vegangreg has quit [Ping timeout: 256 seconds]
benlovell has quit [Ping timeout: 276 seconds]
aufi has quit [Remote host closed the connection]
Ebok has joined #ruby
pawnbox has quit [Remote host closed the connection]
blackmesa has joined #ruby
TomyWork has joined #ruby
bronson has joined #ruby
hannelita has quit [Ping timeout: 264 seconds]
Waheedi has quit [Quit: Waheedi]
Azulinho has quit [Ping timeout: 264 seconds]
symm- has quit [Ping timeout: 240 seconds]
tyrbo has quit [Ping timeout: 264 seconds]
aufi has joined #ruby
Azulinho has joined #ruby
tjbiddle has joined #ruby
tvw has quit [Ping timeout: 245 seconds]
SCHAAP137 has joined #ruby
drbrain has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
ur5us has quit [Remote host closed the connection]
AlexJakeGreen has joined #ruby
yardenbar has joined #ruby
lkba has joined #ruby
nizmow has quit [Ping timeout: 272 seconds]
ferr has joined #ruby
skade has quit [Ping timeout: 240 seconds]
speaking1ode has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
elifoster has quit [Ping timeout: 256 seconds]
speaking1ode has joined #ruby
PedramT has joined #ruby
yoongkang has joined #ruby
drbrain has joined #ruby
wolffles has quit [Quit: wolffles]
blackms has joined #ruby
visudo has quit [Quit: visudo]
<gregf_> pwd
PedramT_ has quit [Ping timeout: 240 seconds]
kerunaru has quit [Quit: leaving]
aeontech has quit [Quit: aeontech]
<gregf_> oops :| sorry
smileart has joined #ruby
ramfjord has joined #ruby
blur3d has joined #ruby
yoongkang has quit [Ping timeout: 265 seconds]
mark2 has joined #ruby
einarj has joined #ruby
<ddv> gregf_: /Users/ddv/Development
workmad3 has joined #ruby
AlexJakeGreen has quit [Quit: Leaving]
firstdayonthejob has quit [Ping timeout: 240 seconds]
mdw has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
user has quit [Remote host closed the connection]
kerunaru has quit [Client Quit]
kerunaru has joined #ruby
sepp2k has joined #ruby
jottr has joined #ruby
codecop has joined #ruby
ta has quit [Quit: Leaving...]
sftrabbit has joined #ruby
burbus has joined #ruby
juddey has quit [Ping timeout: 256 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
jbrhbr has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
berserk_ren has joined #ruby
workaccounthuehu has joined #ruby
mikecmpbll has joined #ruby
devbug has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
benoror has quit [Quit: Connection closed for inactivity]
ta has joined #ruby
FLeiXiuS` has quit [Quit: Leaving]
atomical has joined #ruby
atomical_ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blaxter has joined #ruby
mdw has joined #ruby
tyrbo has joined #ruby
Burgestrand has joined #ruby
dkam has joined #ruby
atomica__ has joined #ruby
atomica__ has quit [Client Quit]
atomical has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
pcoke_ has joined #ruby
coyo has quit [Remote host closed the connection]
kmckelvi1 has quit [Quit: WeeChat 1.3]
coyo has joined #ruby
jcdesimp has joined #ruby
mdw has quit [Client Quit]
sandstrom has joined #ruby
sandstrom has quit [Client Quit]
Xeago has joined #ruby
atomical_ has quit [Ping timeout: 256 seconds]
duncannz has quit [Remote host closed the connection]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
vegangreg has joined #ruby
jcdesimp has quit [Ping timeout: 272 seconds]
drptbl has joined #ruby
duncannz has joined #ruby
hannelita has joined #ruby
catbusters has quit [Ping timeout: 250 seconds]
vegangreg has quit [Ping timeout: 256 seconds]
duncannz has quit [Client Quit]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duncannz has joined #ruby
catbusters has joined #ruby
kp666 has joined #ruby
mdw has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
duncannz has quit [Client Quit]
kp666 has quit [Max SendQ exceeded]
c0m0 has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
hannelita has quit [Ping timeout: 245 seconds]
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
k13nox has joined #ruby
kp666 has joined #ruby
kp666 has quit [Max SendQ exceeded]
kp666 has joined #ruby
Brklyn has joined #ruby
devlitzi has joined #ruby
kp666 has quit [Max SendQ exceeded]
blackmesa has joined #ruby
kp666 has joined #ruby
duncannz has joined #ruby
yoongkang has joined #ruby
davedev2_ has quit []
tomphp has joined #ruby
UtkarshRay has joined #ruby
DoubleMalt has joined #ruby
Brklyn has quit [Ping timeout: 276 seconds]
Jet4Fire has quit []
rdark has joined #ruby
kirillzh has joined #ruby
ramlem has joined #ruby
Abrin has quit [Ping timeout: 272 seconds]
sftrabbit has quit [Quit: sftrabbit]
devlitzi has quit [Ping timeout: 256 seconds]
PedramT has quit [Remote host closed the connection]
PedramT has joined #ruby
lurch_ has joined #ruby
shredding has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
FooMunki has joined #ruby
tyrbo has quit [Ping timeout: 265 seconds]
Snowy has joined #ruby
rodfersou has joined #ruby
houhouli_ has quit [Remote host closed the connection]
smileart has quit [Ping timeout: 245 seconds]
zarubin has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
govg has joined #ruby
Luna_Moonfang has quit [Remote host closed the connection]
Luna_Moonfang has joined #ruby
benlovell has joined #ruby
tyrbo has joined #ruby
k13nox has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 260 seconds]
k13nox has joined #ruby
k13nox has quit [Remote host closed the connection]
huyderman has joined #ruby
k13nox has joined #ruby
astrobun_ has joined #ruby
Azulinho has quit [Ping timeout: 272 seconds]
hannelita has joined #ruby
chussenot has joined #ruby
jottr has joined #ruby
anisha_ has quit [Quit: Leaving]
CloCkWeRX has quit [Ping timeout: 250 seconds]
Wizek has joined #ruby
konsolebox has quit [Ping timeout: 250 seconds]
tyrbo has quit [Ping timeout: 256 seconds]
jottr has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
einarj has quit []
rkazak has quit [Quit: Sleep.....ing....]
kerunaru has quit [Ping timeout: 264 seconds]
kerunaru has joined #ruby
evidex has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
marr has joined #ruby
sftrabbit has joined #ruby
benlovell has quit [Ping timeout: 256 seconds]
pawnbox has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
FooMunki has joined #ruby
chthon has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
hannelita has quit [Remote host closed the connection]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workaccounthuehu has quit [Quit: Page closed]
CloCkWeRX has joined #ruby
bronson has joined #ruby
pawnbox has joined #ruby
vegangreg has joined #ruby
sandstrom has joined #ruby
Bloomer has quit [Remote host closed the connection]
<sandstrom> I have a global constant named `PIPELINE`, and I don't quite understand where its coming from. Is this a native ruby thing, or just some weirdness in my project or a gem?
zeroDivisible has joined #ruby
skade has joined #ruby
<yorickpeterse> sandstrom: could be that another Gem/file defines it
<sandstrom> yorickpeterse Yes, I guess (that or Ruby, but I couldn't find anything in the Ruby docs)
benlovell has joined #ruby
hannelita has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
<yorickpeterse> I don't think Ruby itself defines PIPELINE anywhere
astrobun_ has quit [Remote host closed the connection]
<yorickpeterse> constants don't have any source location information attached by default, so it's hard to figure out where it comes from
govg has quit [Ping timeout: 240 seconds]
dkam has quit [Quit: Be back later ...]
vegangreg has quit [Ping timeout: 256 seconds]
<sandstrom> yorickpeterse I found a probable suspect via `seek = PIPELINE.to_s.underscore; $".detect{ |load_path| load_path.include?(seek) }`
mr_blue has joined #ruby
dlitvak has joined #ruby
dwfait has joined #ruby
<yorickpeterse> well that doesn't define it, that just references it
tyrbo has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
anisha_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
h99h9h88 has joined #ruby
chipotle has joined #ruby
platzhirsch has joined #ruby
serard has quit [Quit: Leaving]
stamina has joined #ruby
moei has joined #ruby
konsolebox has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea> sandstrom: Why not just redefine it to trick the interpreter into warning you about its previous definition?
h99h9h88 has quit [Remote host closed the connection]
PedramT_ has joined #ruby
joonty has joined #ruby
Cohedrin has joined #ruby
User458764 has joined #ruby
Cohedrin has quit [Max SendQ exceeded]
Cohedrin has joined #ruby
<gregf_> hello, does capistrano execute the .bashrc/.bash_profile always? or do i need to source it explicitly?
the_drow has joined #ruby
dlitvak has quit [Ping timeout: 265 seconds]
PedramT has quit [Ping timeout: 265 seconds]
<sandstrom> Ox0dea clever idea!
dkam has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
PedramT_ has quit [Read error: Connection reset by peer]
PedramT has joined #ruby
benlovell has quit [Ping timeout: 245 seconds]
mdw has quit [Read error: Connection reset by peer]
mdw_ has joined #ruby
dlitvak has joined #ruby
arup_r has joined #ruby
skade has joined #ruby
tyrbo has quit [Ping timeout: 245 seconds]
platzhirsch has left #ruby [#ruby]
Ishido has joined #ruby
<gregf_> hmm
<gregf_> ddv: thanks, i'll just source it in one of the tasks where i restart apache :|
dlitvak has quit [Remote host closed the connection]
<the_drow> Is there a recommended logging library you guys use?
gbgdev has joined #ruby
vegangreg has joined #ruby
benlovell has joined #ruby
Azulinho has joined #ruby
<Ox0dea> >> require 'logger' # the_drow
<ruby[bot]> Ox0dea: # => true (https://eval.in/508689)
<the_drow> I know that ruby has a logging library
k13nox has quit [Quit: Leaving...]
<Ox0dea> I was giving you a recommendation.
govg has joined #ruby
<ddv> you didn't tell us that the_drow
<gregf_> >> require "logger"; logger = Logger.new(STDOUT);logger.debug("Foo")
<ruby[bot]> gregf_: # => D, [2016-01-27T10:35:19.802024 #7438] DEBUG -- : Foo ...check link for more (https://eval.in/508690)
<the_drow> But it's not as good as logbook for python for example
<havenwood> the_drow: What do you not have that you need?
<gregf_> the_drow: what more do you need from a logging library?
srenatus has joined #ruby
gbgdev has quit [Ping timeout: 250 seconds]
sftrabbit has quit [Quit: sftrabbit]
<sandstrom> Is there a way to make an instance pass an `is_a?` check besides subclassing? It's for a thin wrapper / decorator that will delegate most things to its underlying instance.
dlitvak has joined #ruby
<the_drow> I need to direct errors to stderr, I need to be able to emit statistics, I need to be able to provide context and guide developers to use structured logging, colors, I need thread safety, buffered output
<Ox0dea> sandstrom: Are you sure you want that to happen?
<the_drow> statistics = metrics e.g. counters, timers etc.
whiteline has joined #ruby
<sandstrom> Ox0dea I may be making a mistake in my thinking, but I'd like to explore it.
<havenwood> the_drow: Are you suggesting Logger can't output to STDERR or isn't Thread safe, etc?
<Ox0dea> sandstrom: Well, I imagine you don't want to redefine #is_a?, in which case you'll need to poke about in raw memory to adjust your thing's ancestor chain post-facto.
dlitvak has quit [Remote host closed the connection]
<the_drow> Nope. I'm suggesting that a single logger instance can't output to two different streams
sftrabbit has joined #ruby
<sandstrom> Ox0dea it may be a bad idea. I'll ponder it some more
<the_drow> hmm
ldnunes has joined #ruby
<the_drow> So there isn't one goto solution except extending logger?
benlovell has quit [Ping timeout: 240 seconds]
Musashi007 has joined #ruby
<Ox0dea> the_drow: Maybe look at Logging.
<the_drow> I did
<the_drow> It's nice
<the_drow> Still evaluating it's performance
jottr has joined #ruby
<the_drow> I was just wondering if there are other alternatives other than log4r which is pretty old and logging
mrtomme has quit [Ping timeout: 248 seconds]
Meow-J has joined #ruby
karapetyan has joined #ruby
mrtomme has joined #ruby
dlitvak has joined #ruby
karapetyan has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
karapetyan has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
al2o3-cr has quit [Ping timeout: 250 seconds]
dlitvak has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
lurch_ has joined #ruby
Azulinho has quit [Quit: Azulinho]
mr_blue has quit [Ping timeout: 250 seconds]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
Azulinho has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
sigurding has quit [Quit: sigurding]
dkam has quit [Ping timeout: 240 seconds]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has quit []
dlitvak has joined #ruby
tvw has joined #ruby
Burgestrand has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
jcdesimp has joined #ruby
mrtomme has left #ruby [#ruby]
tyrbo has joined #ruby
mr_blue has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
vegangreg has quit [Quit: WeeChat 1.2]
blackmesa has joined #ruby
Yzguy has joined #ruby
jcdesimp has quit [Ping timeout: 260 seconds]
dlitvak has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
kfpratt has quit [Ping timeout: 260 seconds]
codecop has quit [Ping timeout: 264 seconds]
usershel_ has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
usershell has joined #ruby
dlitvak has joined #ruby
chthon has quit [Ping timeout: 245 seconds]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
newbie22 has joined #ruby
benlovell has joined #ruby
lkba has joined #ruby
govg has quit [Ping timeout: 250 seconds]
Musashi007 has quit [Quit: Musashi007]
ferr has quit [Ping timeout: 264 seconds]
Yzguy has quit [Quit: Zzz...]
PedramT has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ebbflowgo has joined #ruby
Anderson69s_Pi has joined #ruby
dlitvak has joined #ruby
Anderson69s_Deb has quit [Ping timeout: 250 seconds]
_joes_ has joined #ruby
jottr has joined #ruby
gruz0 has joined #ruby
ebbflowgo has quit [Ping timeout: 260 seconds]
PedramT has joined #ruby
Ebok has joined #ruby
gbgdev has joined #ruby
CloCkWeRX has joined #ruby
xMopxShell has quit [Ping timeout: 244 seconds]
diego_k has quit [Ping timeout: 244 seconds]
diegok has joined #ruby
benlovell has quit [Ping timeout: 256 seconds]
hyperdri- has quit [Ping timeout: 244 seconds]
chthon has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
eregon_ has joined #ruby
despai has joined #ruby
benlovell has joined #ruby
tabakhase has quit [Ping timeout: 244 seconds]
eregon has quit [Ping timeout: 244 seconds]
tjbiddle has quit [Quit: tjbiddle]
gruz0 has quit [Quit: Leaving]
baweaver has joined #ruby
colegatron_origi has quit [Ping timeout: 256 seconds]
konsolebox has quit [Remote host closed the connection]
hyperdrive has joined #ruby
tabakhase has joined #ruby
xMopxShell has joined #ruby
mr_blue has quit [Ping timeout: 240 seconds]
loren has joined #ruby
waka has quit [Quit: Leaving]
govg has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
tituspull0 has quit [Remote host closed the connection]
binaryplease has joined #ruby
tyrbo has quit [Ping timeout: 240 seconds]
Cohedrin has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
dlitvak has joined #ruby
yoongkang has quit [Remote host closed the connection]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fumk has quit [Remote host closed the connection]
rsc___ has joined #ruby
charliesome has joined #ruby
colegatron_origi has joined #ruby
fumk has joined #ruby
ziyadb has joined #ruby
dionysus69 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Wizek has quit [Remote host closed the connection]
Shaboum has joined #ruby
dlitvak has quit [Remote host closed the connection]
dlitvak has joined #ruby
sigurding has joined #ruby
oivoodoo has quit [Remote host closed the connection]
PedramT has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 245 seconds]
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
benlovell has joined #ruby
artX000 has joined #ruby
usershel_ has joined #ruby
platzhirsch has joined #ruby
yoongkang has joined #ruby
usershell has quit [Ping timeout: 264 seconds]
newbie22 has quit [Quit: Leaving]
codecop has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
usershell has joined #ruby
bronson has joined #ruby
bruce_lee has joined #ruby
sandstrom has joined #ruby
usershel_ has quit [Ping timeout: 245 seconds]
chthon has quit [Ping timeout: 245 seconds]
ElFerna has joined #ruby
dlitvak_ has joined #ruby
newbie22 has joined #ruby
newbie22 has quit [Client Quit]
bronson has quit [Ping timeout: 265 seconds]
dlitvak has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Pupp3tm4st3r has joined #ruby
binaryplease has quit [Quit: WeeChat 1.3]
Xeago has joined #ruby
dlitvak_ has quit [Ping timeout: 250 seconds]
CloCkWeRX has quit [Ping timeout: 276 seconds]
stamina has quit [Quit: WeeChat 1.3]
treaki_ has quit [Ping timeout: 272 seconds]
mark2 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PART #nethunter :PONG :sinisalo.freenode.net"]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
sdothum has joined #ruby
PedramT has quit [Ping timeout: 240 seconds]
darkf_ has joined #ruby
einarj_ has joined #ruby
darkf has quit [Ping timeout: 256 seconds]
chthon has joined #ruby
tvw has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 256 seconds]
solocshaw has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
dlitvak_ has joined #ruby
PedramT has joined #ruby
usershell has quit [Read error: Connection reset by peer]
usershell has joined #ruby
Pumukel has joined #ruby
treaki_ has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershel_ has joined #ruby
CloCkWeRX has joined #ruby
c355e3b has joined #ruby
pawnbox has quit [Remote host closed the connection]
usershe__ has joined #ruby
usershell has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Ping timeout: 240 seconds]
ElFerna has quit [Ping timeout: 264 seconds]
solocshaw has quit [Ping timeout: 264 seconds]
rodfersou is now known as rodfersou|afk
rolfb has joined #ruby
usershel_ has quit [Ping timeout: 256 seconds]
Burgestrand has joined #ruby
Burgestrand has quit [Client Quit]
dlitvak has joined #ruby
pandaant has joined #ruby
aupadhye has joined #ruby
Snowy is now known as SnowyAFK
casadei has joined #ruby
pawnbox has joined #ruby
lucasb has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
usershell has joined #ruby
mfb2 has joined #ruby
hannelita has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
usershe__ has quit [Ping timeout: 272 seconds]
workmad3 has joined #ruby
skade has joined #ruby
mfb2 has quit [Ping timeout: 256 seconds]
PedramT has quit [Remote host closed the connection]
usershell has quit [Ping timeout: 272 seconds]
usershel_ has joined #ruby
einarj_ has quit [Ping timeout: 256 seconds]
sftrabbit has quit [Quit: sftrabbit]
jcdesimp has joined #ruby
marr has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
jcdesimp_ has joined #ruby
kp666 has quit [Remote host closed the connection]
einarj has joined #ruby
gbgdev has quit [Remote host closed the connection]
mdw_ has quit [Quit: Sleeping Zzzzz]
f4cl3y has joined #ruby
ElFerna has joined #ruby
jcdesimp has quit [Ping timeout: 265 seconds]
konsolebox has joined #ruby
benlovell has joined #ruby
crunk_br has quit [Quit: Leaving]
sandstrom has joined #ruby
rolfb has quit [Quit: Linkinus - http://linkinus.com]
konsolebox has quit [Max SendQ exceeded]
PedramT has joined #ruby
synthroid has joined #ruby
konsolebox has joined #ruby
kennyfrc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
loren has quit [Quit: Leaving]
avril14th has joined #ruby
jcdesimp_ has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
konsolebox has quit [Max SendQ exceeded]
jbrhbr has quit [Quit: Leaving.]
usershel_ has quit [Read error: Connection reset by peer]
usershell has joined #ruby
lurch_ has quit [Quit: lurch_]
chipotle has quit [Quit: cheerio]
pdoherty has joined #ruby
lurch_ has joined #ruby
Jardayn has joined #ruby
Xeago has joined #ruby
janoti has joined #ruby
<janoti> iam learning ruby very very new to ruby i was reading some file the content is EM::WebSocket.run(:host => "0.0.0.0", :port => 8080, :debug => false) do |ws|
<janoti> ws.onopen { |handshake|
<janoti> puts "WebSocket opened #{{
<janoti> :path => handshake.path,
<janoti> :query => handshake.query,
<janoti> :origin => handshake.origin,
<janoti> }}"
<janoti> ws.send "Hello Client!"
<janoti> }
<janoti> what is do|ws| doing and from where ws came from
<janoti> i am not able to understand
<rsc___> have you look at eventmachine's docs?
<janoti> yes
griffindy has joined #ruby
<rsc___> xyz do |abc| ... end is a way to pass blocks into a function
<janoti> run is function right
failshell has joined #ruby
<janoti> and then what is ws is it a local variable
<janoti> i am from c++ background
dlitvak_ has joined #ruby
SnowyAFK is now known as Snowy
sandstrom has quit [Quit: My computer has gone to sleep.]
charliesome has joined #ruby
sandstrom has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
sftrabbit has joined #ruby
oivoodoo has joined #ruby
<Ox0dea> janoti: It's local to the block.
failshell has quit [Remote host closed the connection]
<Ox0dea> #run yields a new instance of EM::WebSocket to the block and `|ws|` captures it to be used however.
aupadhye has quit [Ping timeout: 264 seconds]
<Ox0dea> They've used a block for this interface to give you setup and teardown "for free".
<rsc___> janoti: think of `do |ws| ... end` as a function
<rsc___> `ws` is the thing passed to this function as an argument
<rsc___> think of it as `void on_open_handler(handshake) { ... }` and then you pass that to `ws.onopen(&on_open_handler)`... in c++ terms
<janoti> now i got it
<janoti> thanks
newdan has joined #ruby
<Ox0dea> rsc___: It is a little more than that, though; #run can operate "around" the block, so it can do finalization as well.
aupadhye has joined #ruby
<rsc___> Ox0dea: so can functors in C++. but the thing ruby has (that that c++ doesnt) is closures
<Ox0dea> Surely C++ has closures by now?
workmad3 has quit [Ping timeout: 240 seconds]
PedramT has quit [Remote host closed the connection]
darkf_ is now known as darkf
workmad3 has joined #ruby
binaryplease has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
tvw has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
pcoke_ has quit [Quit: Bye]
pcoke_ has joined #ruby
<claw> hello
<claw> i need to .force_encoding("iso-8859-1") on every value in a string in a transforming way
blackmesa has joined #ruby
rodfersou|afk is now known as rodfersou
arup_r has quit [Remote host closed the connection]
<apeiros> claw: if you want to translate from one encoding to another, String#encode is what you need.
the_drow has joined #ruby
<claw> apeiros: actually the encoding is not the problem. i am wondering if there is ruby methods to mutate all the hash values
<apeiros> .force_encoding does not translate. it only informs ruby which encoding the string currently uses (i.e. you're telling ruby that the value in .encoding was wrong and it should use the new one instead)
mary5030 has quit [Ping timeout: 260 seconds]
<apeiros> claw: Hash#each or Hash#map + to_h
zarubin has quit [Ping timeout: 240 seconds]
failshell has joined #ruby
oivoodoo has quit [Remote host closed the connection]
k13nox has joined #ruby
<claw> aaah my fault
zarubin has joined #ruby
oivoodoo has joined #ruby
<claw> i did it right but missed .encode("UTF-8") after the force_encoding
<apeiros> IMO having to use .force_encoding is an indicator that you have bad code earlier
<claw> apeiros: i am connected to mysql 3.23
<apeiros> wherever you are generating those strings, you should generate them with the proper charset already set.
vdamewood has joined #ruby
<apeiros> your database adapter can certainly handle charsets
<claw> mysql 3.23 has no support for utf
<apeiros> that's not necessary. it's sufficient if your db adapter has.
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<apeiros> we too have a db with iso-8859-1 charset as storage, and we have our client library translate it
<claw> my adapter is the mysql gem
workmad3 has quit [Ping timeout: 256 seconds]
<apeiros> then I'd check the docs. I'm not using mysql, so I might be wrong. but it'd surprise me if that's not part of it.
blur3d has quit [Quit: blur3d]
bqscott has joined #ruby
ESpiney has joined #ruby
arup_r has joined #ruby
<claw> same problem
drptbl has joined #ruby
pwnd_nsfw` has joined #ruby
mdw has joined #ruby
<darix> claw: your table is set to utf8 charset too?
<claw> darix: i cant there is not support for utf8
<darix> uhm
<claw> its freakin old
<claw> 3.23 was more than 16 years ago
<darix> claw: maybe start with "run on something that actually gets security fixes still?"
binaryplease has quit [Quit: WeeChat 1.3]
arup_r has quit [Ping timeout: 245 seconds]
<claw> its on customer side all i can do is to advice them to do so
<darix> well do so
pwnd_nsfw has quit [Ping timeout: 240 seconds]
AndChat|80625 has joined #ruby
AndChat|80625 has quit [Client Quit]
AndChat|80625 has joined #ruby
AndChat|80625 has quit [Max SendQ exceeded]
dstarh has joined #ruby
User458764 has joined #ruby
AndChat|80625 has joined #ruby
AndChat|80625 has quit [Max SendQ exceeded]
pcoke_ has quit [Ping timeout: 245 seconds]
arup_r has joined #ruby
Burgestrand has joined #ruby
justinweiss has quit [Quit: Connection closed for inactivity]
chipotle has quit [Quit: cheerio]
sgambino has joined #ruby
benlovell has quit [Ping timeout: 240 seconds]
arup_r has quit [Remote host closed the connection]
failshell has quit []
zarubin has quit [Quit: leaving]
bronson has joined #ruby
kaleido has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
failshell has joined #ruby
scepticulous has quit [Ping timeout: 245 seconds]
valetudo has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
aryaching has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
Pupp3tm4st3r has quit [Quit: Leaving...]
bronson has quit [Ping timeout: 265 seconds]
blackgoat has quit [Quit: WeeChat 1.3]
last_staff has quit [Quit: last_staff]
duckpuppy has joined #ruby
arup_r has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
cdg has joined #ruby
truenito has joined #ruby
workmad3 has joined #ruby
hxegon has joined #ruby
acadavid has quit [Quit: Connection closed for inactivity]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robh71 has joined #ruby
sgambino has joined #ruby
blackms has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 250 seconds]
sigurding has joined #ruby
jottr_ has joined #ruby
truongtc has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
cdg has quit [Ping timeout: 240 seconds]
truongtc has quit [Remote host closed the connection]
truongtc has joined #ruby
s2013 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
<the_drow> how do I replace unicorn's logger with my own?
dopamean_ has joined #ruby
andikr has quit [Remote host closed the connection]
FooMunki has quit [Quit: FooMunki]
dlitvak has joined #ruby
dlitvak_ has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
despai has joined #ruby
arup_r has joined #ruby
dlitvak_ has joined #ruby
colegatron_origi has quit [Ping timeout: 265 seconds]
dlitvak has quit [Ping timeout: 245 seconds]
pdoherty has quit [Ping timeout: 256 seconds]
x0f has quit [Ping timeout: 256 seconds]
TomPeed has joined #ruby
kies^ has quit [Ping timeout: 276 seconds]
platzhirsch has quit [Quit: Leaving.]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
platzhirsch has joined #ruby
krobzaur has joined #ruby
floatingpoint has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has quit [Read error: No route to host]
konsolebox has joined #ruby
jottr has joined #ruby
duckpuppy has joined #ruby
konsolebox has quit [Max SendQ exceeded]
konsolebox has joined #ruby
<[spoiler]> `01/27/16 14:15:43: startLearn: Battery relearn cannot be started due to the following reasons: The BBU is relaxing.`
colegatron_origi has joined #ruby
<[spoiler]> Sorry m8, I didn't know you were chillin'
jottr_ has quit [Ping timeout: 250 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 264 seconds]
aegis3121 has joined #ruby
atomical has joined #ruby
stannard has joined #ruby
aganov has quit [Remote host closed the connection]
shredding has quit [Ping timeout: 250 seconds]
despai has quit [Quit: This computer has gone to sleep]
aryaching has joined #ruby
mephistophocles has quit []
VeryBewitching has joined #ruby
<VeryBewitching> Morning.
avril14th has quit [Ping timeout: 250 seconds]
AlexRussia has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
PedramT has joined #ruby
go|dfish has quit [Ping timeout: 240 seconds]
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
avril14th has joined #ruby
go|dfish has joined #ruby
<Ox0dea> Ahoy.
shoutsid has joined #ruby
uri_ has joined #ruby
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
yoongkang has quit [Ping timeout: 240 seconds]
dml337ira has joined #ruby
PedramT has quit [Remote host closed the connection]
mousier has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
shoutsid has quit []
gbgdev has joined #ruby
atomical has quit [Quit: Textual IRC Client: www.textualapp.com]
Brklyn has joined #ruby
yellowcupeats has joined #ruby
<yellowcupeats> Anyone here familiar with Conway's Game of Life? (https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life#Rules)
<Papierkorb> ?ask
<ruby[bot]> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<yellowcupeats> No question really...just had it in an interview yesterday and totally failed.
<Canar> yellowcupeats: It was the first significant Java code I wrote... hm, would have been close to 20 years ago on old Sun hardware.
<avril14th> yellowcupeats: yups
<Ox0dea> yellowcupeats: What gave you trouble? :/
<aegis3121> one of those things I'm familiar with but can never recall until someone starts talkign about it.
<Papierkorb> yellowcupeats: and 'familiar' enough, but can't think of the rule sets right now
<yellowcupeats> I tried breaking it down but just couldn't do it. I've been developing for 4 years now and now feel like I shouldn't even be a programmer.
workmad3 has joined #ruby
dave23 has joined #ruby
<Ox0dea> 1 or 2 neighbors births a cell (reproduction), 3 or more kills it (overpopulation).
kerunaru has quit [Ping timeout: 256 seconds]
<Canar> 1 maintains, 2 births
<Canar> err, 2/3 actually
<avril14th> yellowcupeats: don't worry it's not cause you failed that that you suck at programming
<Canar> think of the * * * oscillator
<ddv> yellowcupeats: you failed a silly interview question, it happens you move on
<yellowcupeats> I don't know what is missing in my education that didn't allow me to solve it.
<Papierkorb> yellowcupeats: what was the question?
<Ox0dea> Implement Conway's GoL, surely.
<yellowcupeats> Just to TDD the game of life
<yellowcupeats> I tried doing a nested array at first.
lxsameer has quit [Quit: Leaving]
benlovell has quit [Ping timeout: 250 seconds]
vikas027 has joined #ruby
<Ox0dea> "Flat is better than nested."
<Ox0dea> It keeps the operations simpler, if nothing else.
vikas027 has quit [Client Quit]
ilyasov has joined #ruby
<yellowcupeats> Probably should've done flat with Cells that have an x, y attributes
<Papierkorb> Ox0dea: @board[x][y] seems more straight forward than @board[y * WIDTH + x]
<ilyasov> can i simplify this line of code?
<ilyasov> x.to_s(2).count('0') == y.to_s(2).count('0')
<Ox0dea> Papierkorb: I disagree, but all right. :)
<ilyasov> with maybe some comparator that takes block
ilyasov is now known as carella
<Ox0dea> carella: If you're not comparing more than two, no sense complicating it beyond that simple check.
aswen has joined #ruby
Abrin has joined #ruby
dlitvak_ has quit [Ping timeout: 272 seconds]
jcdesimp has joined #ruby
kennyfrc has joined #ruby
rodfersou is now known as rodfersou|lunch
<Papierkorb> carella: I agree with Ox0dea, if it's not a "hot method" (-> Profiling!), that's the code people will understand.
Pumukel has quit [Remote host closed the connection]
<carella> Papierkorb: i just participated in some online challenge where time is of the essence
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<carella> I thought maybe there's a shorter solution
dlitvak has joined #ruby
<Ox0dea> Speedcoding and golfing are quite different things.
<Papierkorb> carella: https://stackoverflow.com/questions/1639723/ruby-count-the-number-of-1s-in-a-binary-number It's less readable and not shorter, but according to the guy in there, much faster.
mfb2 has joined #ruby
<carella> Papierkorb: i meant in terms of typing
themsay has joined #ruby
<carella> Ox0dea: sorry, it don't know what golfing is in this context
<Ox0dea> carella: Short code.
<Ox0dea> Excessively short.
<carella> Ox0dea: thanks
<Ox0dea> No worries.
<Ox0dea> Coding fast is about thinking fast far more than it is about typing.
jcdesimp has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
<carella> Ox0dea: yeah, but after I won and saw that massive chunk of code my opponent wrote in clojure I tried to shorten my solution even more - that's how I ended up with my line
sumark has quit [Remote host closed the connection]
<carella> At this point I decided to do some golfing, guilty as charged :)
baweaver has joined #ruby
aupadhye_ has joined #ruby
aupadhye has quit [Quit: Leaving]
sumark has joined #ruby
Bloomer has joined #ruby
lurch_ has quit [Quit: lurch_]
dionysus69 has quit [Ping timeout: 240 seconds]
despai has joined #ruby
Sucks has joined #ruby
s2013 has joined #ruby
<Papierkorb> carella: this is the same bytecount: [x,y].map{|a|a.to_s(2).count '0'}.inject :==
decoponio has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
<apeiros> I'm not sure that qualifies as "simplify" :D
<Papierkorb> carella: [x,y].map{|a|a.to_s(2).count'0'}.inject:== # 2 bytes saved
s2013 has quit [Client Quit]
<Papierkorb> apeiros: code golfing != simplifying ;)
s2013 has joined #ruby
k13nox has quit [Quit: Leaving...]
<apeiros> ah, they want shorten, not simplify
tenderlove has quit [Quit: Leaving...]
saneax_AFK is now known as saneax
<Ox0dea> Papierkorb: ('%b'%a) to shave a byte. :)
saneax is now known as Guest55429
baweaver has quit [Remote host closed the connection]
lurch_ has joined #ruby
scripore has joined #ruby
<Ox0dea> Shame about not being able to use ?0 to save another.
BTRE has quit [Quit: Leaving]
drPoggs has joined #ruby
hxegon has quit [Ping timeout: 264 seconds]
<Ox0dea> ![x,y].uniq{|a|('%b'%a).count'0'}[1]
shinnya has joined #ruby
B1n4r10 has joined #ruby
<Mon_Ouie> a,b=…;a==b is shorter than using inject (still longer than ^ though)
axl__ has joined #ruby
chouhoulis has joined #ruby
kies^ has joined #ruby
axl__ has quit [Client Quit]
<yellowcupeats> I was stuck trying to implement a 2 dimensional array
zerowaitstate has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<Papierkorb> yellowcupeats: rows = Array.new(HEIGHT){ [] }
idefine has joined #ruby
<Papierkorb> yellowcupeats: or rather this: rows = Array.new(HEIGHT){ Array.new WIDTH }
tenderlove has joined #ruby
marr has joined #ruby
<zerowaitstate> what is the current preferred way of connecting to MySQL from Ruby? The "semi-official" Ruby library written by tmtm seems to be deprecated
<yorickpeterse> zerowaitstate: using the mysql2 gem
marr has quit [Excess Flood]
evidex has quit [Ping timeout: 240 seconds]
rippa has joined #ruby
hxegon has joined #ruby
marr has joined #ruby
Jardayn has quit [Quit: Leaving]
chouhoulis has quit [Ping timeout: 264 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
evidex has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
<Ox0dea> >> [[nil] * 3] * 2 # Papierkorb
<ruby[bot]> Ox0dea: # => [[nil, nil, nil], [nil, nil, nil]] (https://eval.in/508905)
scripore has joined #ruby
<Ox0dea> But probably don't actually do that.
truenito has quit [Ping timeout: 276 seconds]
<Papierkorb> Ox0dea: that doesn't work
<Papierkorb> >> a = [[nil] * 3] * 2 ; a[1][0] = 4; puts a.join
<ruby[bot]> Papierkorb: # => 44 ...check link for more (https://eval.in/508906)
mary5030 has joined #ruby
axl__ has joined #ruby
<Papierkorb> well .. you get the idea
ad has joined #ruby
<Ox0dea> It works if your values aren't reference types.
whippythellama has joined #ruby
BTRE has joined #ruby
<Ox0dea> Er, never mind. I know how you mean.
fbandov has joined #ruby
mary5030 has quit [Remote host closed the connection]
yellowcupeats has quit [Quit: Page closed]
mary5030 has joined #ruby
evidex has quit [Ping timeout: 240 seconds]
lindistock has joined #ruby
centrx has joined #ruby
rodfersou|lunch is now known as rodfersou|afk
TomPeed has quit [Read error: Connection reset by peer]
shredding has joined #ruby
sgambino has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
babblebre has joined #ruby
Jardayn has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
dlitvak has joined #ruby
janoti has quit [Ping timeout: 260 seconds]
kaleido has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mondok has joined #ruby
einarj has quit [Remote host closed the connection]
ponga has joined #ruby
<ponga> hello everybody
Waheedi has joined #ruby
<ponga> I finished my first IRC game !
<ddv> nobody cares
<Ox0dea> I care.
<ponga> ddv: but its written in rub
<ddv> lies
<ponga> ruby
dlitvak has quit [Ping timeout: 264 seconds]
<Ox0dea> ddv: Watch me.
synthroid has quit [Remote host closed the connection]
<ddv> Ox0dea: :)
<Ox0dea> ponga: Is it the card game you invented?
uri_ has quit [Ping timeout: 240 seconds]
<ponga> Ox0dea: more like I borrowed ideas from classic 500, but yeah
<ponga> one i made myself to play with pals when i was at highschool
AlexJakeGreen has joined #ruby
<Ox0dea> Nice! Where do I sign up?
<ddv> ponga: is it on github?
* dave23 is caring vehemently
yoongkang has joined #ruby
Burgestrand has joined #ruby
<ponga> ddv: it will be, not at the moment because its bot msg output in korean at the moment, and some comment lines are in korean too
<ponga> after its organized and translated, it will be on github
<ddv> awesome
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ponga> Ox0dea: its IRC gaming, i don't think you need to sign up, it just needs !start and 3 more people !join
solars has quit [Ping timeout: 276 seconds]
<ponga> and the code is ugly as hell
tjohnson has joined #ruby
sgambino has joined #ruby
<Ox0dea> ponga: Sure, I more meant: which channel should I join to play?
Meow-J has quit [Quit: Connection closed for inactivity]
<ponga> well , i haven't created one for it but its called flossom, so i guess its #flossom maybe?
davedev24 has joined #ruby
evidex has joined #ruby
<ponga> anyway Ox0dea thank you for being nice and pretending to pay attnetion to my work
<ponga> i mean it
<dave23> ponga, can i actually paly it somewhere
truongtc has quit [Quit: Leaving]
<dave23> s/paly/play
skade has quit [Quit: Computer has gone to sleep.]
<ponga> dave23: yes you can , i will update everything to be in English in next 24 hrs
<ponga> sadly the game rule instruction is in korean at the moment
huQeQwdpu47q_ has quit [Quit: Leaving]
<Ox0dea> ponga: You're suggesting I pretended to remember that you were working on a card game of your own design?
yoongkang has quit [Ping timeout: 265 seconds]
<ponga> oh .. that
<ponga> how did you manage to remember that? even i didn't remember I said that in this channel
<ponga> you have a superb memory
mostlybadfly has quit [Quit: Connection closed for inactivity]
ricer2_g4H4 has quit [Ping timeout: 250 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
sgambino has quit [Client Quit]
psy has joined #ruby
aegis3121 has quit [Ping timeout: 250 seconds]
psy has quit [Max SendQ exceeded]
<Ox0dea> I'm trying to figure out why you felt the need to hedge your gratitude with an accusation of pretension.
sgambino has joined #ruby
synthroid has joined #ruby
psy has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hannelita has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
chussenot has quit [Quit: chussenot]
oivoodoo_ has joined #ruby
oivoodoo_ has quit [Remote host closed the connection]
benlovell has joined #ruby
<shevy> ponga you are getting stalked! :D
<ponga> shevy: am i ?!
<ponga> Ox0dea: oh and i was just.. you know, my poor code writing skill
oivoodoo_ has joined #ruby
<ponga> just looking at my cardgame bot code makes me sad
<manveru> welcome to the world of coding
<Ox0dea> ponga: Barney Stinson has something to say about that.
ad has quit [Quit: Leaving]
anisha_ has quit [Quit: Leaving]
<manveru> the crazy/hot equilibrium?
<ponga> lol barney meme
failshell has quit []
synthroid has quit [Ping timeout: 250 seconds]
oivoodo__ has joined #ruby
<dave23> suit up
<shevy> he is not cool because he has no beard
oivoodoo has quit [Ping timeout: 260 seconds]
Liquid-- has joined #ruby
<ponga> I'm just a bit worried that my regex will not work once its translated in English
<ponga> :(
_p0p0pr37 has joined #ruby
<kaleido> nothing really works in english. its a pretty terrible language
<shevy> ponga what do you mean? what does your regex match if not english?
<ponga> shevy: korean
<shevy> ah I see
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
<ponga> like this /첨가\s\w\w$/
<ponga> kaleido: thumbs up for ya
bronson has joined #ruby
<ponga> shevy: my code is built around the cinch function that it catches msg via regex
brahman has joined #ruby
brahman has quit [Changing host]
brahman has joined #ruby
oivoodoo_ has quit [Ping timeout: 250 seconds]
<ponga> so I'd have to test it again after translated
zast has joined #ruby
benlovell has quit [Ping timeout: 250 seconds]
sandstrom has joined #ruby
workmad3 has joined #ruby
FooMunki has joined #ruby
asccigcc has joined #ruby
<Ox0dea> How not to implement Conway's Game of Life, for the curious: https://eval.in/508928
moeabdol has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
ramlem has quit [Remote host closed the connection]
rkazak has joined #ruby
<shevy> ponga ah yes I remember... the IRC bot
<shevy> writing an IRC bot was my first project in ruby :)
<shevy> since then, I broke the old code.... and then tired of it...
tomchapin has joined #ruby
<_p0p0pr37> lol :)
<manveru> shevy: i remember when you built it :)
rkazak has quit [Ping timeout: 265 seconds]
huQeQwdpu47q has joined #ruby
TomPeed has joined #ruby
dlitvak has joined #ruby
<shevy> hehe
benoror has joined #ruby
tvw has quit [Read error: Connection reset by peer]
d0lph1n98 has joined #ruby
synthroid has joined #ruby
heftig has quit [Quit: No Ping reply in 180 seconds.]
Limix has joined #ruby
haasn has quit [Ping timeout: 240 seconds]
lindistock has quit [Remote host closed the connection]
Limix has quit [Client Quit]
workmad3 has quit [Ping timeout: 240 seconds]
kalleth has quit [Quit: No Ping reply in 180 seconds.]
RushPL has quit [Ping timeout: 265 seconds]
jbrhbr has joined #ruby
Hobbyboy has quit [Ping timeout: 240 seconds]
darix has quit [Read error: Connection reset by peer]
darix has joined #ruby
heftig has joined #ruby
parus_ has joined #ruby
contradictioned has quit [Quit: No Ping reply in 180 seconds.]
parus has quit [Remote host closed the connection]
PaulePanter has quit [Remote host closed the connection]
kalleth has joined #ruby
gnarf_ has joined #ruby
gnarf has quit [Excess Flood]
RushPL has joined #ruby
AlexJakeGreen has quit [Remote host closed the connection]
contradictioned has joined #ruby
theslow1 has joined #ruby
chouhoulis has joined #ruby
huyderman has quit [Remote host closed the connection]
evidex has quit [Ping timeout: 240 seconds]
synthroid has quit [Ping timeout: 264 seconds]
arup_r has quit []
<ponga> shevy: when was it?
Hobbyboy has joined #ruby
janoti has joined #ruby
aufi has quit [Quit: Konversation terminated!]
ELGUERRERO has joined #ruby
JDiPierro has joined #ruby
kirillzh has joined #ruby
ELGUERRERO has left #ruby [#ruby]
PaulePanter has joined #ruby
haasn has joined #ruby
kfpratt has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
<shevy> ponga hmmm... 10 years ago or something like that I think...
<ponga> and manveru remembers that??
<shevy> yeah
<ponga> how long have you guys been on IRC?
<ponga> it scares me
<shevy> yeah it scares me as well that he remembers
<bougyman> 23 years.
<manveru> lol
<ponga> wow
hobodave has joined #ruby
<Sou|cutter> I've been on IRC over 20 years too. Scary
<ponga> shevy: but you didn't have cinch gem or equivilant back then did you
<ponga> did you code it from scratch
<manveru> 18 years i think...
<shevy> ponga correct! yeah
<bougyman> was it rbot?
ramfjord has joined #ruby
<bougyman> or just Net::IRC?
<shevy> not even rbot hehe
<ponga> shevy: so you just did HTTP connection?
<shevy> someone told me that line here: select( [$stdin], nil, nil, 1.1 )
<manveru> that was before that existed
<ponga> lol
<Ox0dea> Net::IRC?
<shevy> and I was using that for the bot :)
<ponga> and sending raw commands?
<shevy> ponga the IRC protocol is thankfully quite simple
<shevy> it took me a while before I understood that a PING wants a PONG ...
<ponga> shevy: that's how I named my nick actually
<ponga> ping and pong
vdamewood has quit [Quit: Life beckons.]
<mg^> I first got on IRC in 1996. So that's 20 years this year
<centrx> what network?
<mg^> Undernet
<mg^> I'm still officially a channel admin for #chatzone which was the default for a lot of IRC clients back then. Though I don't really go there often these days.
Musashi007 has joined #ruby
dionysus69 has joined #ruby
dlitvak_ has joined #ruby
s2013 has joined #ruby
s2013 has quit [Client Quit]
<centrx> I was on DALnet until they were attacked/imploded in 2002
<mg^> I wrote an awful lot of mirc code, and later perl code, to deal with that mess when it had thousands of users and there was very little defense by ircd itself from the nefarious activities that go on
<ponga> shevy: I still have one or two automation method to complete tho, its manually driven thru user input at the moment
benlovell has joined #ruby
<ponga> mg^: and you landed on #ruby after perl?
Ox0dea has quit [Quit: WeeChat 1.5-dev]
f4cl3y has quit [Ping timeout: 256 seconds]
<shevy> so many ruby users went through perl
<mg^> yeah I decided a few years ago that I didn't want to wait for perl 6 to be polished when it looked like Ruby had basically everything perl 6 was promising, but already mature
<centrx> perl was all there was until python & ruby
<mg^> and ruby code read really well to me... a lot less write-only code out there
kirillzh has quit [Quit: Textual IRC Client: www.textualapp.com]
<newdan> centrx: What about tcl?
xapak has joined #ruby
<centrx> I've heard horrific stories about tcl
dlitvak has quit [Ping timeout: 240 seconds]
mwlang has joined #ruby
<mg^> heh, I *still* have to use TCL to this day
kirillzh has joined #ruby
<mg^> Becase F5 load balancers use it
<ponga> speaking of python, I still don't understand the need of (self) parameter
pdoherty has joined #ruby
Renich has joined #ruby
shoutsid has joined #ruby
<newdan> ponga: Take it up with #python. They decided to do that to keep it simple, ...or something. I agree with you though ponga I don't like it
<ponga> newdan: I still wonder what benefit they earn from it
<newdan> OOP in Ruby is much cleaner to read
synthroid has joined #ruby
shoutsid has quit [Client Quit]
<xapak> Probably silly question, but do you know why `value` is taking the empty array instead of `projects`? https://gist.github.com/anonymous/bbe498583eadb98882a2
<manveru> xapak: because an empty array is neither nil nor false
<mg^> ^
<centrx> xapak, also it's not an empty array
Snowy has quit [Read error: Connection reset by peer]
<manveru> and everything else is true
<manveru> it's an array full of empty things :)
Snowy has joined #ruby
<mg^> I can't type out that answer fast with a fork on one hand
<ponga> mg^: but you still managed to type ^ , btw you having meal now?
<ponga> different timezone always get me buzzed
Cohedrin has joined #ruby
<the_drow> Is there a way to get the string description of an http status code out of a number?
<ponga> i mean confused
Cohedrin has quit [Client Quit]
<newdan> xapak: Just curious, what language are you used to where [""] is considered false?
<mg^> yeah it's breakfast time
<ponga> do we have any gem to test if there was any variable that is never actually used or referred to?
astrobun_ has joined #ruby
synthroid has quit [Ping timeout: 256 seconds]
despai has joined #ruby
baweaver has joined #ruby
Macaveli has joined #ruby
<manveru> ponga: see rubocop
<mg^> yeah rubocop does a good job at that
<Mon_Ouie> Even ruby -w tells you about that too
<ponga> nice name btw
<ponga> rubo cop
<mg^> it also detects "useless" assignments
<manveru> it detects a shitton of things
<mg^> you should see my git commit messages "Rubocop shot me in the crotch again"
<ponga> lol
<mg^> For the things that require more shiny code, we have it integrated right into the CI system so a build fails if rubocop doesn't like it
Ox0dea has joined #ruby
<Ox0dea> >> require 'webrick/httpstatus'; WEBrick::HTTPStatus::StatusMessage[404] # the_drow
<ruby[bot]> Ox0dea: # => "Not Found" (https://eval.in/508941)
Cohedrin has joined #ruby
<Ox0dea> It's missing 418 "I'm A Teapot", though.
arup_r has joined #ruby
<ponga> mg^: i like that, rubogrammarnazi
yoongkang has joined #ruby
Bloomer has quit [Remote host closed the connection]
Cohedrin has quit [Client Quit]
Cohedrin has joined #ruby
B1n4r10 has quit [Ping timeout: 245 seconds]
[Butch] has joined #ruby
sanguisdex has joined #ruby
uri_ has joined #ruby
rakm has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
TomyWork has quit [Ping timeout: 248 seconds]
<lucasb> Ox0dea: hey, I liked your GoL. why did you said "how *not* to implement it" ?
jottr has quit [Ping timeout: 240 seconds]
<lucasb> would be easy to require 'curses' there and clear the screen for each step, wouldn't?
<Ox0dea> lucasb: Self-deprecation is cruise control for modesty.
<Ox0dea> It's a great implementation. ^_^
yardenbar has quit [Ping timeout: 256 seconds]
<Ox0dea> lucasb: Sure, no need for curses even; just shell out to `clear` or the like.
uri_ has quit [Client Quit]
alexherbo2 has quit [Quit: WeeChat 1.4]
Musashi007 has quit [Quit: Musashi007]
Cohedrin has quit [Ping timeout: 276 seconds]
yoongkang has quit [Ping timeout: 260 seconds]
PedramT has joined #ruby
B1n4r10 has joined #ruby
synthroid has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
<mwlang> what’s a clean way to turn [“A”, “B”, “C”] into this hash: { “V0” => “A”, “V1”, => “B”, “V2” => “C”} basically, the hash key is an indexed variable name assigned the array value at that position.
<Ox0dea> mwlang: But... why?
jottr has joined #ruby
symm- has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
<mwlang> because the hash is what needs to be passed to the rendering template file.
uri_ has joined #ruby
<lucasb> [:a,:b,:c].zip(0..2).map(&:reverse).to_h # how *not* to do it :)
atomical has joined #ruby
<Ox0dea> :P
gnarf_ is now known as gnarf
<Ox0dea> >> %w[A B C].each_with_index.with_object({}) { |(e, i), h| h["V#{i}"] = e } # mwlang
zambini has joined #ruby
<ruby[bot]> Ox0dea: # => {"V0"=>"A", "V1"=>"B", "V2"=>"C"} (https://eval.in/508942)
PedramT has quit [Ping timeout: 240 seconds]
camilasann has quit [Remote host closed the connection]
<ponga> hey I have these two commands, !add and !del, but i want to use 'remove' instead of 'del' but had to keep it 3 characters.. do we have any conventional(programmar-wise) way of doing it
<mwlang> dang. nice…
<ponga> !rem sounds dumb
<Ox0dea> ponga: !rm
* mwlang goes to look up #with_object
<ponga> ah
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ponga> Ox0dea: k thanks
<Ox0dea> No worries.
astrobun_ has quit [Remote host closed the connection]
<ponga> its these things that are hard to find thru google search
<ponga> had to rely this channel
Limix has joined #ruby
<Mon_Ouie> 'rem' even makes me think of 'remember' which is misleading
uri_ has quit [Client Quit]
lurch_ has quit [Quit: lurch_]
<lucasb> or remark, it's a comment
amclain has joined #ruby
<Ox0dea> Somebody's done BASIC programming.
<zambini> I never learned that that's what it was in M$ batching
<zambini> Learn something new every day
<Ox0dea> I thought for a long time that it meant "remove" (from compilation or whatever).
camilasan has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
minimalism has joined #ruby
blackmesa has joined #ruby
howdoi has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
jcdesimp has joined #ruby
<zambini> Me too. My thought was "Wow of course Microsoft would do something dumb like that"
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<Ox0dea> Same. :P
<Ox0dea> Remember to remove your remarks, R.E.M.
govg has quit [Ping timeout: 265 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
DexterLB has quit [Ping timeout: 250 seconds]
jbrhbr has quit [Quit: Leaving.]
jcdesimp has quit [Ping timeout: 245 seconds]
TomSequitur has joined #ruby
DexterLB has joined #ruby
janoti has quit [Ping timeout: 240 seconds]
<mg^> dnl is the one that takes the cake for unintuitive comment markers
ramfjord has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
jottr has quit [Quit: WeeChat 1.4]
baweaver has quit [Remote host closed the connection]
dexter-tzu has quit [Ping timeout: 264 seconds]
aeontech has joined #ruby
baweaver has joined #ruby
govg has joined #ruby
JDiPierro has quit [Remote host closed the connection]
TomSequitur has quit [Quit: Leaving]
lemur has joined #ruby
blackmesa has joined #ruby
chussenot has joined #ruby
pandaant has quit [Remote host closed the connection]
visudo has joined #ruby
SCHAAP137 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ponga has quit [Quit: Leaving...]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
baweaver has quit [Ping timeout: 276 seconds]
uri_ has joined #ruby
sigurding has quit [Quit: sigurding]
cicloid has joined #ruby
mfb2 has quit [Remote host closed the connection]
lemur has quit [Ping timeout: 260 seconds]
<zambini> "Do Not Laser"?
mfb2 has joined #ruby
sdothum has joined #ruby
<Canar> do not learn
<mg^> discard next line
<mg^> I see few of you have had the "privilege" of working with m4
puria has quit [Ping timeout: 240 seconds]
<Canar> goto autohell
<Canar> break
x0f has joined #ruby
synthroid has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oivoodo__ has quit [Remote host closed the connection]
ricer2_g4H4 has joined #ruby
oivoodoo has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershell has quit [Remote host closed the connection]
TomyLobo has joined #ruby
chouhoulis has quit [Remote host closed the connection]
wilbert has joined #ruby
Snowy has quit []
chouhoulis has joined #ruby
dlitvak has joined #ruby
janoti has joined #ruby
uri_ has quit [Quit: --]
TomSequitur has joined #ruby
vondruch has quit [Ping timeout: 265 seconds]
emilford has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
dlitvak_ has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
nofxx has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
nofxx has joined #ruby
<Renich> hello, personas!
<Renich> I need help with this string: items:15:evicted_unfetched 0
uri_ has joined #ruby
sftrabbit has joined #ruby
<Renich> I want it like this items[15][evicted_undfetched] = 0
<Renich> in fact, we could use symbols
<Renich> and there is a big list of those
<Renich> and I am using ruby 2.0
_ht has joined #ruby
puria has joined #ruby
freerobby has joined #ruby
underplank has joined #ruby
maletor has joined #ruby
mdw has joined #ruby
usershell has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
renderfu_ has quit []
duckpuppy has quit [Ping timeout: 250 seconds]
Dimik has joined #ruby
musicnode has joined #ruby
Macaveli has joined #ruby
TomSequitur has quit [Ping timeout: 250 seconds]
Macaveli has quit [Client Quit]
chthon has quit [Ping timeout: 245 seconds]
synthroid has joined #ruby
jbrhbr has joined #ruby
renderfu_ has joined #ruby
<Ox0dea> Hi, Renich. Could you clarify?
symm- has quit [Quit: Leaving...]
uri_ has quit [Quit: --]
<Ox0dea> You want `items` to be an array of hashes?
usershell has quit [Ping timeout: 265 seconds]
Xeago has quit [Remote host closed the connection]
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
Macaveli has joined #ruby
Anderson69s has joined #ruby
<Renich> Ox0dea: sure. I have a text file with lots of lines like this: items:15:evicted_unfetched 0. I'd like to parse that text file with ruby and put the info in a multi-level hash.
<Renich> Ox0dea: so it looks something like: items[:15][:evicted_unfetched] = 0
fbandov has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Renich: Is the first part always going to be numeric, then?
synthroid has quit [Ping timeout: 256 seconds]
IronD has joined #ruby
<Renich> Ox0dea: a hash of hashes. Even, though, 15 is hte index, I have several values that point to 15
<Renich> Ox0dea: can we make it a symbol?
Xeago has quit [Remote host closed the connection]
<Ox0dea> Renich: You'd have to quote it, but sure.
d0lph1n98 has quit [Quit: leaving]
<Ox0dea> What kind of values can be in that first column? Just small numbers?
<Renich> Ox0dea: yes
aef has joined #ruby
tomphp has joined #ruby
<Ox0dea> Well, I don't see why it shouldn't be an array of hashes, then, but a hash of hashes would work too.
<Renich> ok
<Ox0dea> No sense in using numeric Symbols, though. :P
<Renich> ok
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Renich> be it an Array of Hashes then
mikecmpbll has joined #ruby
nofxx has quit [Ping timeout: 245 seconds]
<Ox0dea> Do you know about regular expressions?
Macaveli has quit [Ping timeout: 264 seconds]
<Renich> Ox0dea: yes, I do. Not an expert, though
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
<lucasb> all lines start with "items:"?
scottschecter has joined #ruby
scottschecter has quit [Max SendQ exceeded]
<Ox0dea> Renich: As long as your input file is reasonably clean, `input.scan(/(\d+):(\S+)\s+(\d+)/)` would get you a nested Array of all the results.
<Renich> lucasb: yes
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Renich> Ox0dea: ok, so scan it is
<Ox0dea> Renich: You could also just read the file line-by-line and use #match instead of #scan.
oivoodoo_ has joined #ruby
<Ox0dea> The latter is probably the superior choice if you've got a legitimately big list.
<Renich> Ox0dea: will try both
dfockler has joined #ruby
<Renich> Ox0dea: it could et big... 1000s of lines
<Renich> so match it is
<Ox0dea> Heh.
workmad3 has joined #ruby
elifoster has joined #ruby
joonty has quit [Ping timeout: 264 seconds]
TomSequitur has joined #ruby
sads has joined #ruby
<Ox0dea> As for storing it, a neat trick is to use the `||=` operator to assign to something only if there's not already a value there.
Brklyn has quit [Ping timeout: 265 seconds]
<Ox0dea> >> array = []; array[1] ||= {}; array[1][:key] = :value; array # Renich
<ruby[bot]> Ox0dea: # => [nil, {:key=>:value}] (https://eval.in/508949)
usershell has joined #ruby
zeroDivisible has quit [Ping timeout: 250 seconds]
<Renich> Ox0dea: yeah, I've used ||=. Thanks
<Ox0dea> Sure thing. Seems like you've got all the tools you'll need. :)
centrx has quit [Remote host closed the connection]
oivoodoo has quit [Ping timeout: 240 seconds]
symm- has joined #ruby
sads has quit [Client Quit]
antgel has quit [Ping timeout: 250 seconds]
pietr0 has joined #ruby
x77686d has joined #ruby
Xeago has joined #ruby
gambl0re has joined #ruby
gambl0re has quit [Changing host]
gambl0re has joined #ruby
benlovell has quit [Ping timeout: 272 seconds]
gruz0 has joined #ruby
sgambino has joined #ruby
last_staff has joined #ruby
syk_ has joined #ruby
mrdomino has joined #ruby
firstdayonthejob has joined #ruby
Brklyn has joined #ruby
pdoherty has quit [Ping timeout: 265 seconds]
ElFerna has joined #ruby
<shevy> hmm is there a simple way to just read the first line of a file, until the first "\n"? I have some files that may be big, using File.read() or File.readlines() seems a bit of a waste
<shevy> I only have to fetch a header, which is on the first line always
synthroid has joined #ruby
<Ox0dea> shevy: File#gets
<shevy> aha thanks
symm- has quit [Quit: Leaving...]
jackjackdripper has joined #ruby
<c0m0> File.read("/etc/passwd").split("\n")[0]
<Ox0dea> Don't forget to close it.
<Ox0dea> c0m0: shevy doesn't want to read the entire file into memory.
<Ox0dea> File.open('foo') { |f| header = f.gets }
h99h9h88 has joined #ruby
<Ox0dea> It's ugly, but it'll auto-close the file and only read the first line.
<Ox0dea> You could maybe do something a little nicer with #tap.
duckpuppy has joined #ruby
<shevy> huh... why does this work? does it not have to be terminated manually at the target character?
freerobby has quit [Quit: Leaving.]
<Ox0dea> Hm?
<c0m0> 0x0dea: what is gets method?
hobodave has quit [Quit: Computer has gone to sleep.]
<lucasb> loop.lazy.map { f.gets }.take_while {|l| l =~ /\S/ }.to_a # inside File.open
<Ox0dea> c0m0: It reads a line from any IO-like object.
<c0m0> so I can write too File.open("/etc/passwd").gets
uri_ has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
iateadonut has quit [Ping timeout: 272 seconds]
Ilyes512 has joined #ruby
<shevy> hmmmm
<Ox0dea> c0m0: Yeah, but you'll leave a file handle open.
mjuszczak has joined #ruby
dexter-tzu has joined #ruby
mjuszczak has quit [Max SendQ exceeded]
dwfait has quit [Remote host closed the connection]
speaking1ode has quit [Ping timeout: 276 seconds]
<shevy> aaaaah... gets() by default checks for newline
mjuszczak has joined #ruby
<Ox0dea> Indeed it does.
<c0m0> Ox0dea: ok thanks
JDiPierro has joined #ruby
<Ox0dea> lucasb: The amount of convolution going on there for something so simple is glorious. :P
dave23 has quit [Quit: leaving]
pawnbox has quit [Remote host closed the connection]
<shevy> another soulbrother... now norc, Ox0dea and lucasb are a new weird-code team
<lucasb> Ox0dea: yes. I forgot about f.gets("\n\n")
<shevy> huh what is this
<Xeago> File.open("/etc/passwd") {|e| puts e.gets }
<Xeago> that'll close
<shevy> the double newline is actually funne
<shevy> erm, *funny
<lucasb> it's the separator for 'gets' to search for
<Ox0dea> Xeago: I'm sure shevy needs a reference to the header he just read, though.
troulouliou_div2 has quit [Remote host closed the connection]
<Ox0dea> But yeah, that'd do for just printing it.
<Ox0dea> lucasb: `loop.lazy` is an interesting construct.
<c0m0> how can I read the last line?
<Ox0dea> It's probably never The Right Thing, but it's fun to play with.
nettoweb has joined #ruby
<shevy> yah, it's just fasta files... they contain an identifier, which is the first line, and the rest is just nucleotide or amino acid junk and can be huge
m8 has joined #ruby
<shevy> so much perl code exists... also python code... barely any ruby soulmate out there, there :(
<Ox0dea> shevy: Sure you don't wanna just pipe them into `xargs head -1`?
al2o3-cr has quit [Ping timeout: 240 seconds]
uri_ has quit [Quit: --]
dexter-tzu has quit [Ping timeout: 240 seconds]
dhollinger has joined #ruby
<shevy> dunno, that looks scary non-ruby!
ElFerna has quit [Ping timeout: 240 seconds]
<shevy> let me be in my ruby prison
yonatankoren has joined #ruby
<Ox0dea> Well, all right.
s2013 has joined #ruby
s2013 has quit [Client Quit]
<Ox0dea> c0m0: The optimal approach is usually to seek to the very end, read and store characters until you hit a newline, then reverse the buffer.
oivoodoo_ has quit [Remote host closed the connection]
<Ox0dea> *read backwards, to clarify.
mdw has quit [Ping timeout: 260 seconds]
nettoweb has quit [Client Quit]
baweaver has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
<c0m0> so I need to use the seek method
<c0m0> ?
<Ox0dea> c0m0: To read only the last line of a file without wastefully reading all the others, yes.
pawnbox has joined #ruby
h99h9h88 has quit [Remote host closed the connection]
wilbert has quit [Ping timeout: 265 seconds]
<c0m0> that I would like to know is, there is any method to use like gets, but for the last line
<c0m0> ?
h99h9h88 has joined #ruby
sigurding has joined #ruby
musicnode has quit [Quit: musicnode]
<shevy> hmm
<shevy> peculiar question :)
gruz0 has quit [Quit: Leaving]
<shevy> perhaps we could have add nobu a getslast
<shevy> erm *nobu add a getslast
baweaver has quit [Ping timeout: 240 seconds]
beneills has joined #ruby
<Ox0dea> c0m0: Is your file quite large?
<c0m0> Ox0dea: not, I just asked for curiosity
musicnode has joined #ruby
<Ox0dea> c0m0: Be curious about #seek instead. ^_^
idefine_ has quit [Remote host closed the connection]
<mg^> yeah seek and destroy!
<mg^> or something like that
<c0m0> 0x0dea: ok, tomorrow I will try to use seek :)
c0m0 has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
JDiPierro has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has quit [Quit: This computer has gone to sleep]
hannelita has quit [Ping timeout: 276 seconds]
idefine has joined #ruby
wilbert has joined #ruby
hannelita has joined #ruby
hannelita has quit [Read error: Connection reset by peer]
Ishido has quit [Ping timeout: 256 seconds]
cactuzzz has joined #ruby
hannelita has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
idefine has quit [Remote host closed the connection]
JDiPierro has joined #ruby
hanneli has joined #ruby
hannelita has quit [Read error: Connection reset by peer]
synthroid has quit [Ping timeout: 264 seconds]
treehug88 has joined #ruby
freerobby has joined #ruby
musicnode has quit [Quit: musicnode]
ledestin has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
pdoherty has joined #ruby
<shevy> hehe
ht__ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gnudon has joined #ruby
arup_r has quit []
tomphp has joined #ruby
kirillzh has joined #ruby
beneills has quit [Ping timeout: 264 seconds]
ElFerna has joined #ruby
kirillzh has quit [Max SendQ exceeded]
<dtordable> howdy
nertzy2 has quit [Quit: This computer has gone to sleep]
dlitvak has quit [Ping timeout: 240 seconds]
skcin7 has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ishido has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
speaking1ode has joined #ruby
jackjackdripper has joined #ruby
idefine has joined #ruby
sgambino has joined #ruby
ElFerna has quit [Ping timeout: 250 seconds]
snockerton has joined #ruby
shadoi has joined #ruby
musicnode has joined #ruby
brahman has quit [Quit: Konversation terminated!]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ElFerna has joined #ruby
<snockerton> is it possible to use popen3 and get stdout "streaming" back to the parent thread before the child thread exits?
hobodave has joined #ruby
emilford has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
emilford has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has quit [Quit: Konversation terminated!]
dlitvak has joined #ruby
sepp2k has quit [Quit: Leaving.]
ht__ has joined #ruby
<adaedra> It's the default behavior, just read on stdout and stderr
<adaedra> (the ones passed to you)
speaking1ode has quit [Ping timeout: 256 seconds]
blaxter has quit [Quit: foo]
kennyfrc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
synthroid has joined #ruby
Ebok has joined #ruby
<Mon_Ouie> Also Kernel#spawn allows to set up redirection directly so you don't need to do anything
speaking1ode has joined #ruby
joonty has joined #ruby
wilbert_ has joined #ruby
wilbert has quit [Ping timeout: 250 seconds]
x77686d has quit [Quit: x77686d]
duderonomy has quit [Ping timeout: 240 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDivisible has joined #ruby
<Renich> Well, thanks a lot Ox0dea, for the help. One question, though: http://fpaste.org/315422/45392103/
<Renich> Ox0dea: I have a bunch of nils. Is it because indexes don't start at 0?
<Ox0dea> Renich: It's because they do. :P
<Ox0dea> Arrays are contiguous by definition.
Ebok has quit [Client Quit]
<Ox0dea> >> a = []; a[5] = 1; a
<ruby[bot]> Ox0dea: # => [nil, nil, nil, nil, nil, 1] (https://eval.in/508956)
Burgestrand has joined #ruby
synthroid has quit [Ping timeout: 256 seconds]
<Renich> Ox0dea: so a hash of hashes is what I want, then
<Renich> Ox0dea: thanks a lot, dude
<Ox0dea> Renich: Are the `nil`s going to be a problem, then?
scripore has joined #ruby
Asher has quit [Quit: Leaving.]
lurch_ has joined #ruby
<Renich> Ox0dea: I don't know, but I don't want them there since I don't need them in the list
<Renich> Ox0dea: already turned into a hash of hashes
<Ox0dea> A Hash with small numeric keys wishes it were an Array.
joonty has quit [Ping timeout: 245 seconds]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
<Ox0dea> I suspect it won't much matter for your present purpose, but hashes are generally more expensive than arrays.
<Renich> Ox0dea: yeah, hehe. I'll try to "Rubyise" the script even more. Using a telnet gem or something.
<Renich> Ox0dea: will each skip the nils?
elifoster has quit [Ping timeout: 250 seconds]
<Ox0dea> Well, no, but you could just #compact the Array, only then your indices would be off.
dlitvak has quit [Remote host closed the connection]
uri_ has joined #ruby
idefine has joined #ruby
Xeago has quit [Remote host closed the connection]
<Renich> Ox0dea: yeah, but I'd loose the item ID. I'd have to have a larger array
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Renich> Ox0dea: deeper, that is
<Ox0dea> Renich: Er, no, you'd just have holes.
malconis has quit [Quit: Textual IRC Client: www.textualapp.com]
babblebre has joined #ruby
ht__ has quit [Client Quit]
malconis has joined #ruby
ht__ has joined #ruby
<Ox0dea> If you're gonna integer keys, at least make them actual integers. :P
dfockler has quit [Ping timeout: 265 seconds]
idefine has quit [Remote host closed the connection]
<Renich> Ox0dea: OK
lkba has quit [Ping timeout: 240 seconds]
sgambino has joined #ruby
srenatus has quit [Quit: Connection closed for inactivity]
usershell has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 250 seconds]
<Renich> oh, telnet is part of stdlib
<Renich> cool
lxsameer has quit [Quit: Leaving]
speaking1ode has quit [Ping timeout: 240 seconds]
Ilyes512 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has quit [Client Quit]
wilbert_ has quit [Ping timeout: 245 seconds]
<snockerton> adaedra: i can't get the default behavior of popen3 to work like that - https://gist.github.com/adampats/b1bdb665a133891d3bd7
sgambino has joined #ruby
RobertBirnie has joined #ruby
despai has joined #ruby
workmad3 has joined #ruby
Asher has joined #ruby
speaking1ode has joined #ruby
<snockerton> i've tried all kinds of trickery to read stdout, but it only outputs in the parent thread once the child thread exits!
<newdan> In Python when I have an uncaught exception in the shell, I can do "import pdb; pdb.pm()" and it will let me debug from the exception point, post-mortem. Is there anything like that in Ruby?
hahuang65 has joined #ruby
<snockerton> i use pry-byebug
jcdesimp has joined #ruby
TheDracle has joined #ruby
<snockerton> then put binding.pry in my code / rescue block
xapak has left #ruby [#ruby]
<TheDracle> So, I've installed gems locally on a build system using bundle install --deployment, and all of the gems have been placed underneath vendor/bundle/ruby/1.9.1/gems
<TheDracle> However I can't seem to require the gems after doing this.
dlitvak has joined #ruby
<newdan> snockerton: So if the exception's already happened, you're out of luck?
sgambino has quit [Client Quit]
<TheDracle> I've tried setting GEM_PATH, and other wonky things... But it just seems like bundler ought to have set it up correctly.
uri_ has quit [Quit: --]
sgambino has joined #ruby
<TheDracle> Any ideas on how I can get it so these gems are accessible to ruby?
mdw has joined #ruby
Macaveli has joined #ruby
lurch_ has quit [Quit: lurch_]
centrx has joined #ruby
synthroid has joined #ruby
spider-mario has joined #ruby
chussenot has quit [Quit: chussenot]
<Ox0dea> They even used familiar nomenclature!
<newdan> Ox0dea: Haha, cool thanks
<newdan> I wonder why the builtin Ruby debug feature seems... ...relatively unloved
zast has quit [Remote host closed the connection]
jcdesimp has quit [Ping timeout: 260 seconds]
RegulationD has joined #ruby
<Ox0dea> snockerton: It's not entirely clear what you're going for here. Is test1 not supposed to be connecting to the server you start in test2?
rodfersou|afk is now known as rodfersou
dlitvak has quit [Remote host closed the connection]
robh71 has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak has joined #ruby
<Ox0dea> TheDracle: Try invoking your script as `bundle exec ruby foo.rb`.
<TheDracle> Ox0dea, Seems closer :) Some other error now, thanks :)
<Ox0dea> Happy to help! :)
synthroid has quit [Ping timeout: 265 seconds]
juddey has joined #ruby
blackmesa has joined #ruby
speaking1ode has quit [Ping timeout: 264 seconds]
oivoodoo has joined #ruby
speaking1ode has joined #ruby
TomSequitur has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 264 seconds]
TheDracle has quit [Quit: This computer has gone to sleep]
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
gregf has quit [Quit: WeeChat 1.3]
elricsfate_ has joined #ruby
oivoodoo has quit [Ping timeout: 260 seconds]
<elricsfate_> This would test if ldap_cacert is NOT nil right?
<elricsfate_> I'm not sure if nil should be quoted or not, pretty sure it shouldn't since it would probably be viewed as a string at that point
h99h9h88 has joined #ruby
<sts> Does anyone know why FileUtils.chmod(0750, ['a', 'b']) would throw: fileutils.rb:904:in `block in symbolic_modes_to_i': invalid file mode: 0750 (ArgumentError)
PedramT has joined #ruby
platzhirsch has left #ruby [#ruby]
benlovell has joined #ruby
sftrabbit has quit [Quit: sftrabbit]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
sftrabbit has joined #ruby
Anderson69s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
uri_ has joined #ruby
kies^ has quit [Ping timeout: 250 seconds]
Ilyes512 has joined #ruby
h99h9h88 has quit [Ping timeout: 265 seconds]
Kruppe has quit [Quit: ZNC - http://znc.in]
gruz0 has joined #ruby
<shevy> works here... what is symbolic_modes_to_i hmm
symm- has joined #ruby
ur5us has joined #ruby
<lucasb> I can confirm it works here too. what's your ruby version, sts?
TomSequitur has joined #ruby
mdw has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
Kruppe has joined #ruby
idefine has joined #ruby
TomSequitur has left #ruby [#ruby]
symm-_ has joined #ruby
x77686d has joined #ruby
Jardayn has quit [Ping timeout: 256 seconds]
hanneli has quit [Remote host closed the connection]
hannelita has joined #ruby
<Waheedi> anyone know the javascript function eval?
symm- has quit [Ping timeout: 240 seconds]
<centrx> ?ask
<ruby[bot]> Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<nofxx> Waheedi, which lang doesn't have an #eval thingy?
<Waheedi> if you use this eval('([[[\"1\",\"one\",,,9]],,\"en\"])') it will return array of 5 items 0 and 1 should be 1 and one
Limix has quit [Quit: Limix]
<Waheedi> how can i make that happen with ruby :)
<Waheedi> i feel its a shame to ask the question
<Ox0dea> Wat.
<Waheedi> nofxx: thingy then, lol
synthroid has quit [Ping timeout: 276 seconds]
BTRE has quit [Ping timeout: 250 seconds]
<lucasb> in ruby, consecutive commas are syntax error
<Waheedi> i know
<lucasb> you can type 'nil, nil, nil, etc.' :)
<Waheedi> lol
<Waheedi> i can't control that
<Waheedi> i wish i can
<shevy> to silence all ruby message output from a .rb file, "$stdout = StringIO.new" is in general the recommended way? or are there alternatives
idefine has quit [Ping timeout: 260 seconds]
<newdan> shevy: When running on the terminal you can use 'ruby foo.rb > /dev/null'
<shevy> hmm
hannelita has quit [Ping timeout: 240 seconds]
<Mon_Ouie> redirect to File::NULL in Ruby
<shevy> oh
<Ox0dea> I think you must put me on mute sometimes. :<
<shevy> no... I don't remember that conversation
<drbrain> shevy: $stdout = File.open IO::NULL, "w"
musicnode has quit [Ping timeout: 265 seconds]
<Ox0dea> drbrain: Any reason not to #reopen?
arup_r has joined #ruby
<drbrain> in case you want to output something then STDOUT still holds it
<Waheedi> lucasb: the problem is that there is few thing you need to remove from that string to become a clear array, like replacing ,, with ,nil, and removing the \, but sometime "one" string could be anything including ,, and
gnudon has quit [Read error: Connection reset by peer]
<Waheedi> \
<Waheedi> things*
sigurding has quit [Quit: sigurding]
nofxx has quit [Ping timeout: 265 seconds]
<sts> lucasb: 2.1.5p273
<drbrain> sure, you could get STDOUT back from IO.for_fd
<Ox0dea> sts: Weird filesystem?
<sts> ext4
<drbrain> but I think assigning to $stdout is always best
<Waheedi> maybe i need to use regex but even that might go wrong
<Ox0dea> Yeah, makes sense.
nofxx has joined #ruby
_djbkd has joined #ruby
<shevy> Ox0dea oh I think I now remember that... that was probably for another project ... right now I have something else, similar but different. I also just realized that some other output still appears, from configure... probably system "./configure"
<Ox0dea> Waheedi: Seems like you should just be using JavaScript.
<sts> why does it actually call symbolic_modes_to_i? because its a absolute mode which I'm passing.
idefine has joined #ruby
<Ox0dea> shevy: It's probably going to $stderr, so just redirect that to IO:NULL as well.
<Waheedi> Ox0dea: oh yeah ;)
<shevy> oh
<Waheedi> how can i execute javacasript code inside a ruby method?
valetudo has quit [Remote host closed the connection]
<Waheedi> using v8?
baweaver has joined #ruby
<Waheedi> execjs?
<Waheedi> thanks newdan
ht__ has quit [Quit: Konversation terminated!]
<Ox0dea> snockerton: I'm still not sure what you're up to, but maybe this'll steer you in the right direction: https://gist.github.com/0x0dea/6a06310137042bcb98f0
ht__ has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
platzhirsch has joined #ruby
elifoster has joined #ruby
platzhirsch has left #ruby [#ruby]
kies^ has joined #ruby
<snockerton> Ox0dea: thx, i figured out it was the STDOUT.flush i was missing
<Ox0dea> Aha.
SCHAAP137 has joined #ruby
IronDicideth has joined #ruby
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
casadei has quit [Remote host closed the connection]
sftrabbit has quit [Quit: sftrabbit]
elricsfate__ has joined #ruby
kirillzh has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
skcin7 has joined #ruby
pawnbox has joined #ruby
elricsfate_ has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
IronD has quit [Ping timeout: 264 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
Xeago has joined #ruby
govg has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
synthroid has joined #ruby
<sts> Ox0dea: maybe its just because i use it from a hash key? https://gist.github.com/anonymous/9076a82005cad4ff9b57
Sucks has quit [Remote host closed the connection]
govg has joined #ruby
e4xit has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
leksster has joined #ruby
joonty has quit [Ping timeout: 272 seconds]
<Waheedi> incase anyone interested how to overcome that arr = cxt.eval("arr = eval('([[[\"1\",\"one\",,,9]],,\"en\"])[0][0][0]');")
<Ox0dea> sts: It's because you're using a String.
shredding has quit [Ping timeout: 260 seconds]
petricore has joined #ruby
synthroid has quit [Ping timeout: 272 seconds]
<sts> Ox0dea: ah. I need to convert to octal.
<Ox0dea> sts: Or just use octal from the start.
elifoster has quit [Ping timeout: 256 seconds]
gruz0 has quit [Quit: Leaving]
<Ox0dea> >> '0750'.to_i.to_s 8 # Here's the problem.
<ruby[bot]> Ox0dea: # => "1356" (https://eval.in/508975)
symbol_ has joined #ruby
hannelita has joined #ruby
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
usershell has joined #ruby
<Ox0dea> >> Integer('0750') == '0750'.to_i
Jardayn has joined #ruby
<ruby[bot]> Ox0dea: # => false (https://eval.in/508976)
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
uri_ has quit [Ping timeout: 250 seconds]
FernandoBasso has joined #ruby
uri_ has joined #ruby
usershell has quit [Ping timeout: 264 seconds]
nertzy2 has joined #ruby
elricsfate_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Xeago has quit [Remote host closed the connection]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
ldnunes has quit [Quit: Leaving]
mfb2 has quit [Remote host closed the connection]
karapetyan has joined #ruby
Guest55429 is now known as saneax_AFK
mdw has joined #ruby
tildes has joined #ruby
elricsfate__ has quit [Ping timeout: 250 seconds]
dexter-tzu has joined #ruby
benlovell has quit [Quit: Lost terminal]
BTRE has joined #ruby
yoongkang has joined #ruby
casadei has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sgambino has joined #ruby
TheDracle has joined #ruby
dexter-tzu has quit [Ping timeout: 240 seconds]
hannelita has quit [Remote host closed the connection]
synthroid has joined #ruby
DarkElement has joined #ruby
oivoodoo has joined #ruby
<DarkElement> I am trying to get proxy connections working with HTTParty, as Radar recommended earlier. However, I must be doing something wrong since my code never manages to get the html. Any ideas? https://gist.github.com/DarkElement75/7d9b98429ebc130e8063
yqt has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
choke has quit [Quit: Gone]
mdw has quit [Quit: Sleeping Zzzzz]
colegatron_origi has quit [Ping timeout: 245 seconds]
<Ox0dea> DarkElement: Google is ignoring you.
oivoodoo has quit [Ping timeout: 265 seconds]
<DarkElement> Every link I looked at just gave the same thing that didn't work
h99h9h88 has joined #ruby
<DarkElement> I tried all the things
<DarkElement> What is URI(ENV())?
dlitvak has quit [Remote host closed the connection]
mfb2 has joined #ruby
mdw has joined #ruby
PedramT has quit [Remote host closed the connection]
FernandoBasso has quit [Ping timeout: 264 seconds]
<Ox0dea> Nothing appropriate.
<DarkElement> Are you going to help?
<Ox0dea> No.
<DarkElement> I don't know why I un /ignore'd you
kirillzh has joined #ruby
FernandoBasso has joined #ruby
<DarkElement> Won't make that mistake again.
gregf has joined #ruby
hannelita has joined #ruby
kirillzh has quit [Max SendQ exceeded]
dcunit3d has joined #ruby
nisstyre has quit [Quit: WeeChat 1.3]
tomchapin has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Ebok has joined #ruby
skcin7 has quit [Ping timeout: 250 seconds]
ror15 has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
<ror15> I'm not sure if this is a factory_girl thing or not. I'm trying to use attributes_for and getting a nomethoderror. What am I doing wrong?
Xeago has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
Ebok has quit [Client Quit]
toretore has joined #ruby
h99h9h88 has quit [Ping timeout: 264 seconds]
Shaboum has quit [Quit: WeeChat 1.4]
william3 has joined #ruby
Ebok has joined #ruby
synthroid has joined #ruby
<greenhat> ror15: Also, hardcoding counts (where you expect Contact.count) to equal 1 will eventually bite you. You just just check that Contact.count has gone up by one.
hannelita has quit [Read error: Connection reset by peer]
kirillzh has joined #ruby
colegatron_origi has joined #ruby
<greenhat> With minitest you would use assert_difference. I don't know the rspec equivalent.
ht__ has quit [Quit: Konversation terminated!]
hobodave has quit [Quit: Computer has gone to sleep.]
ht__ has joined #ruby
Asher has quit [Quit: Leaving.]
rodfersou has quit [Quit: leaving]
pdoherty has quit [Ping timeout: 250 seconds]
<ror15> greenhat: That was it, thank you
pawnbox has joined #ruby
<ror15> greenhat: Also just playing with rspec so I'll change that test, cheers
darkf has quit [Quit: Leaving]
Asher has joined #ruby
Asher is now known as Guest27461
synthroid has quit [Ping timeout: 265 seconds]
elricsfate__ has joined #ruby
skcin7 has joined #ruby
Guest27461 has quit [Client Quit]
Pande has joined #ruby
Cohedrin has joined #ruby
sgambino has joined #ruby
hobodave has joined #ruby
baweaver has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
PedramT has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
elricsfate_ has quit [Ping timeout: 256 seconds]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Radar> DarkElement: What is res.status_code?
<Radar> DarkElement: You're not checking if it's a successful request.
<DarkElement> Radar, one sec
cicloid has joined #ruby
<DarkElement> Radar, it never reaches the point where it prints res
kaleido has quit [Quit: Textual IRC Client: www.textualapp.com]
<Radar> At all?
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Radar> is it even making the request?
<DarkElement> It gets right to it
<DarkElement> then never finishes, so it seems
<DarkElement> Also, may be a stupid question but do you need to prepend http:// to the proxy address
<Radar> I don't have any idea.
Ebok has joined #ruby
tvw has joined #ruby
<Radar> Don't think I can debug this one from so far away
agent_white has joined #ruby
elricsfate__ has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 276 seconds]
<agent_white> Afternoon folks
<DarkElement> Radar, want the code?
<Radar> DarkElement: I saw it.
<Radar> I still don't any any idea.
<DarkElement> gr8 m8
agent_white has quit [Read error: Connection reset by peer]
visudo_ has joined #ruby
dionysus69 has quit [Ping timeout: 264 seconds]
nertzy2 has quit [Quit: This computer has gone to sleep]
snguyen has joined #ruby
_djbkd has quit [Quit: My people need me...]
tvw has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
<Radar> DarkElement: My guess is the request isn't even reaching the proxy.
choke has joined #ruby
<DarkElement> So what should I do
tildes has quit [Ping timeout: 240 seconds]
visudo has quit [Ping timeout: 245 seconds]
visudo_ is now known as visudo
snguyen has quit [Max SendQ exceeded]
* Radar wants to snark so badly.
janoti has quit [Ping timeout: 240 seconds]
stannard has quit [Remote host closed the connection]
synthroid has joined #ruby
<Radar> DarkElement: What do you think you should do? Perhaps it'd be a good start to walk through the request process. Find out if the request actually hits the proxy, yeah?
<DarkElement> ayy lmao
<DarkElement> whoops
<Radar> I am disappointed that it doesn't appear that you're doing _any_ thinking of your own on this one.
<DarkElement> I have been trying that with curl
snguyen has joined #ruby
<DarkElement> And it is also not connecting
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has joined #ruby
<Radar> Soooooooooooooo the next logical step is....?
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdw has quit [Quit: Sleeping Zzzzz]
<Radar> (p.s. I just very explicitly told you what it should be. This is a test to see if you're paying attention)
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<DarkElement> I tried other proxies, and other websites, was that what you meant?
<DarkElement> I can ping the proxy?
Ebok has joined #ruby
<Radar> That means that it accepts ping requests. Is port 80 even open on that machine?
tvw has joined #ruby
sandstrom has joined #ruby
<snguyen> i'm trying to load a git repo that contains my *.rb files from another package, but i'm struggling to load them in. i've created a gem for it and added the gem it with my gemfile. when i ran bundle install, i saw the repo get pulled into my rbenv environment. but these attempts didn't work: require 'myrailsapp/app/models/user.rb', require 'myrailsapp/app/models/user'. what am i doing wrong?
synthroid has quit [Read error: No route to host]
Ebok has quit [Client Quit]
TheDracle has quit [Quit: This computer has gone to sleep]
Ebok has joined #ruby
synthroid has joined #ruby
<DarkElement> Radar, I just tried to ping it, it responded from a different ip saying it was Unreachable. I guess it is not open since I had to ping it without the :80
yoongkang has quit [Remote host closed the connection]
TheDracle has joined #ruby
sgambino has joined #ruby
<Radar> DarkElement: So you're using a "proxy" which you don't have any control over?
sgambino has quit [Client Quit]
sgambino has joined #ruby
mary5030 has quit [Remote host closed the connection]
<Radar> DarkElement: I cannot help you with this. It's impossible.
<Radar> You're not understanding at all how proxies work and I don't have the time to explain it to you.
symbol_ has quit [Ping timeout: 240 seconds]
s2013 has joined #ruby
mary5030 has joined #ruby
antgel has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 260 seconds]
synthroid has quit [Ping timeout: 250 seconds]
lkba has joined #ruby
gbgdev has quit [Remote host closed the connection]
nertzy2 has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lkba has quit [Remote host closed the connection]
<DarkElement> I chose a proxy from a large list. K.
tomphp has joined #ruby
<Radar> And the list shows that this proxy is currently active?
mary5030 has quit [Ping timeout: 240 seconds]
codecop has quit [Remote host closed the connection]
Xeago has quit [Read error: Connection reset by peer]
<DarkElement> Yep.
<Radar> ./shrug
jcdesimp has joined #ruby
Shaboum has joined #ruby
blackgoat has joined #ruby
einarj has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
FernandoBasso has quit [Quit: Leaving]
ht__ has quit [Quit: Konversation terminated!]
pawnbox has joined #ruby
oivoodoo has joined #ruby
jcdesimp has quit [Ping timeout: 240 seconds]
<Ox0dea> No such file or directory
idefine has joined #ruby
ur5us_ has joined #ruby
Shaboum has quit [Client Quit]
uri_ has quit [Read error: Connection reset by peer]
vF3hNGxc47h8 has joined #ruby
ht__ has joined #ruby
DarkElement has quit [Quit: Leaving]
sftrabbit has joined #ruby
futilegames has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
moeabdol1 has joined #ruby
wilbert_ has joined #ruby
futilegames has quit [Client Quit]
gruz0 has joined #ruby
idefine has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
baweaver has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruce_lee has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
DarkElement has joined #ruby
aswen has quit [Quit: WeeChat 1.4]
babblebre has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
stannard has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
agent_white has joined #ruby
ht__ has joined #ruby
einarj has quit [Read error: Connection reset by peer]
arup_r has quit []
einarj has joined #ruby
FooMunki has quit [Quit: FooMunki]
idefine has quit [Remote host closed the connection]
speaking1ode has quit [Ping timeout: 265 seconds]
synthroid has joined #ruby
FooMunki has joined #ruby
newdan has quit [Remote host closed the connection]
idefine has joined #ruby
baweaver has quit [Remote host closed the connection]
Pande has quit [Ping timeout: 265 seconds]
speaking1ode has joined #ruby
tomphp has quit [Client Quit]
<shevy> lol
choke has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has quit [Remote host closed the connection]
tomphp has joined #ruby
synthroid has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
cpup has quit [Ping timeout: 250 seconds]
jackjackdripper1 has joined #ruby
tomphp has joined #ruby
PaulCapestany has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Ping timeout: 256 seconds]
cpup has joined #ruby
<Ox0dea> $ pkgfile lol; echo $?
<Ox0dea> 1
<Ox0dea> I'm genuinely surprised.
snguyen has quit [Read error: Connection reset by peer]
tomphp has quit [Client Quit]
PaulCapestany has joined #ruby
idefine has quit [Remote host closed the connection]
tomphp has joined #ruby
loophole_ has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
idefine has joined #ruby
freerobby1 has joined #ruby
loophole_ is now known as loophole
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpup has quit [Ping timeout: 250 seconds]
tomphp has quit [Client Quit]
pawnbox has joined #ruby
tomphp has joined #ruby
cpup has joined #ruby
ruby-lang310 has joined #ruby
duckpuppy has quit [Ping timeout: 265 seconds]
gruz0 has quit [Quit: Leaving]
yfeldblum has quit [Remote host closed the connection]
nertzy2 has quit [Quit: This computer has gone to sleep]
tvw has quit [Remote host closed the connection]
BSaboia has joined #ruby
vishwa has joined #ruby
william3 has quit [Remote host closed the connection]
<vishwa> How do you make an array of arrays? I'm trying to add arrays as an element of another array
saneax_AFK is now known as saneax
pawnbox has quit [Ping timeout: 260 seconds]
hxegon is now known as hxegon_AFK
<vishwa> But it prints individual elements
s2013 has joined #ruby
saneax is now known as Guest86744
TomyLobo has quit [Ping timeout: 240 seconds]
baweaver has joined #ruby
ruby-lang310 has quit [Ping timeout: 252 seconds]
<Radar> vishwa: show us what you're trying please
volty has joined #ruby
BrunoSaboia has joined #ruby
dexter-tzu has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
aupadhye_ has quit [Ping timeout: 256 seconds]
<vishwa> Radar: Here's the whole thing - https://gist.github.com/anonymous/f49fd41c16f9a2f0bcfa
idefine has quit [Read error: Connection reset by peer]
ht__ has joined #ruby
<vishwa> Trying to add arrays to the global array $training
<Ox0dea> That's too much thing.
<Radar> ^
<vishwa> haha ok
<Ox0dea> >> [1] + [2] # vishwa: This is the "problem", right?
<ruby[bot]> Ox0dea: # => [1, 2] (https://eval.in/509022)
<Radar> Small reproducable example please
<Radar> I don't want to read through nearly 200 lines of someone else's code this early in the AM
jgpawletko has quit [Quit: jgpawletko]
emilford_ has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
duckpuppy has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
emilford has quit [Ping timeout: 256 seconds]
<vishwa> https://gist.github.com/anonymous/68486c202b4424fb841b, this isn't runnable though. Too many custom functions
Trynemjoel has quit [Ping timeout: 250 seconds]
synthroid has joined #ruby
<vishwa> the local array prints fine, [...], the global array prints one element on each line
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has quit [Client Quit]
<vishwa> Radar:
<Radar> vishwa:
<Radar> [08:45:14] <Radar>Small reproducable example please
choke has joined #ruby
<Radar> I know that I can sometimes not communicate clearly, but in that instance I think I was very clear.
<Radar> 44 lines is not small. It is "medium".
<vishwa> Oh yeah sure man
<vishwa> my bad
ecksit has joined #ruby
<Synthead> is there a way I can use IniFile to read a string that contains "inifile" data?
maletor has quit [Read error: Connection reset by peer]
symm-_ is now known as symm-
<Synthead> seems really dumb to write it to a file then read it
ht__ has joined #ruby
kobain has joined #ruby
Trynemjoel has joined #ruby
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
maletor has joined #ruby
ramfjord has joined #ruby
<Synthead> Radar: that loads a file. I'm looking to load a string
cactuzzz has quit [Quit: cactuzzz]
<Ox0dea> Synthead: Is that the library?
Eiam_ has joined #ruby
<Synthead> Ox0dea: yeah
synthroid has quit [Ping timeout: 240 seconds]
<Ox0dea> Synthead: Doesn't seem to support reading from an actual String; you should be able to pass it a StringIO.
emilford_ has quit [Ping timeout: 240 seconds]
<Ox0dea> >> s = StringIO.new 'ohai im a file'; s.read
<ruby[bot]> Ox0dea: # => "ohai im a file" (https://eval.in/509028)
duckpuppy has quit [Ping timeout: 272 seconds]
<Synthead> Ox0dea: interesting
emilford has joined #ruby
<lucasb> interestring
ESpiney has quit [Ping timeout: 250 seconds]
IronReaver has joined #ruby
<baweaver> interesting
<Synthead> Ox0dea: maybe not http://pastie.org/10698424
<Ox0dea> That's lame. :/
<vishwa> Radar: I have a refined question: How do I print an array of arrays?
ht__ has quit [Client Quit]
<loophole> vishwa: i don't read your code; a = []; a.push([1,2]); a.each {|e| print "#{e}\n"}
<Radar> >> p [[1],[2]]
<ruby[bot]> Radar: # => [[1], [2]] ...check link for more (https://eval.in/509030)
<Radar> vishwa: ^
<Synthead> vishwa: might look into awesome_print too
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<vishwa> If I have [[1,3,5], [2,4,6]] thanks guys
<vishwa> Ugh. Thanks. Lol
vishwa has left #ruby [#ruby]
IronDicideth has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
emilford has quit [Ping timeout: 264 seconds]
wilbert_ has quit [Ping timeout: 276 seconds]
<DarkElement> So Radar I got it working with curl so now it's only a matter of getting it working in ruby
hxegon_AFK is now known as hxegon
<Synthead> Ox0dea, Radar: I'm gonna use this instead: https://github.com/antw/iniparse thanks for the help!
TeresaP has joined #ruby
emilford has joined #ruby
wilbert_ has joined #ruby
Jackneill has quit [Remote host closed the connection]
<Ox0dea> Synthead: Sure thing.
joonty has quit [Ping timeout: 245 seconds]
emax has joined #ruby
<emax> hello rubyists! Beginner here looking to trim down a method.
h99h9h88 has joined #ruby
<DarkElement> It works never mind bye
DarkElement has left #ruby ["Leaving"]
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
yoongkang has joined #ruby
<baweaver> Is it in that order by requirement?
<emax> Wondering if anyone could help me with that. Too many if/elsifs there.
<emax> Yes, basically want to search through that array and take the first possible board position
<emax> If it is not already taken
<Mon_Ouie> emax: Enumerable#find on an array with all the possible strings in the right order
<baweaver> %w(5 1 3 7 9 2 4 6 8).find { |i| !board.taken?(i) }
jcdesimp has joined #ruby
devgiant has joined #ruby
<Ox0dea> *'513792468'.chars
<Ox0dea> FTFY, to clarify.
<baweaver> not very readable though
Ebok has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> what if there's a 2-digit?
<Mon_Ouie> Also rename board to b and basic_move to _
mfb2 has quit [Remote host closed the connection]
<baweaver> that I disagree with
TheDracle has quit [Quit: This computer has gone to sleep]
<lucasb> in 1..9 there's no 2-digit :)
<baweaver> single letter names breed more confusion
<emax> Ok thanks guys, let me play with that. brb
<Ox0dea> baweaver: Mon_Ouie was poking fun at me.
<Mon_Ouie> I thought we were golfing :(
<baweaver> there's not, but if there are in the future
<baweaver> ah
<baweaver> makes sense
<baweaver> was thinking in the newbie context
<baweaver> golfing makes sense to us, but to them it might appear legit
<Mon_Ouie> Also tic-tac-toe is usually played on a 3×3 grid
yoongkang has quit [Ping timeout: 250 seconds]
<Ox0dea> 3x3x3 for an actual game, though.
<Ox0dea> Er, 3x3x3x3, rather.
dcunit3d has quit [Quit: WeeChat 1.3]
<Ox0dea> 9 boards simultaneously, is the point I mean to make.
<baweaver> hypercube
<emax> wow you guys are awesome
gbgdev has joined #ruby
stevemackinnon has joined #ruby
<Waheedi> any idea <class:SoftReference>': uninitialized constant Ref::SoftReference::Monitor (NameError)? from /opt/ruby-1.9.3-p125/lib/ruby/gems/1.9.1/gems/therubyracer-0.12.2/lib/v8/weak.rb:2:in `<module:V8>'
gbgdev has quit [Remote host closed the connection]
gbgdev has joined #ruby
<Waheedi> how to install this gem libv8 (3.16.14.7 x86_64-linux)?
Burgestrand has joined #ruby
cicloid has joined #ruby
<Waheedi> gem install libv8 -v 2.16.14.7?
<Ox0dea> Almost.
<shevy> ERROR: Could not find a valid gem 'libv8' (= 2.16.14.7) in any repository
<Waheedi> 3
<Ox0dea> 2
<lucasb> 1
theslow1_ has joined #ruby
<shevy> ERROR: Possible alternatives: libv8
<Waheedi> lol
<shevy> what the
<Radar> o
<Ox0dea> shevy: Great timing. :P
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
<shevy> oh
yfeldblum has joined #ruby
<shevy> lol
idefine has joined #ruby
<shevy> that always reminds me of the monty python life of brian
tomphp has joined #ruby
<TeresaP> If I have a class Foo with a method "abc" and it calls another method also called "abc" in the Bar class, is there another way to force it to use the other class other than @core = Object.extend(Bar) and doing @core.abc?
pdoherty has joined #ruby
scripore has joined #ruby
kirillzh has joined #ruby
theslow1 has quit [Ping timeout: 250 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
<Mon_Ouie> If you don't care what object the abc method is called on, it probably shouldn't be an instance method in the first place. If you make it a class method you can just use Bar.abc.
<TeresaP> I don't have control over Bar
VeryBewitching has quit [Quit: Konversation terminated!]
<lucasb> is Bar a class or a module?
<shevy> must be a module I guess
<TeresaP> Good point. One sec.
<TeresaP> Foo is a class, Bar is a module
<shevy> \o/
<TeresaP> haha
ElFerna has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
glcx has joined #ruby
mjuszczak has quit []
<Ox0dea> >> String.is_a? Module # What the!
<ruby[bot]> Ox0dea: # => true (https://eval.in/509044)
<Ox0dea> Classes are just instantiable modules, you say?
cicloid has quit [Quit: zzZZzzzZzzzzzZZZz]
<baweaver> classy
<Ox0dea> Modular.
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucasb> I don't know if this works, but I would guess you can include Bar in your Foo class, then to 'alias bar_abc abc', then define your own Foo's abc method
<lucasb> *then do 'alias ...'
<Mon_Ouie> They're instanciable inheritable non-includable non-extendable modules
<Ox0dea> 60% of the time, classes are modules 100% of the time.
<TeresaP> :-P
<shevy> now TeresaP is wiser
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has joined #ruby
baweaver has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
cajone is now known as cajone_afk
musicnode has joined #ruby
TheDracle has joined #ruby
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
Ilyes512 has quit [Quit: Textual IRC Client: www.textualapp.com]
finisherr has joined #ruby
PedramT_ has joined #ruby
baweaver has joined #ruby
matp has joined #ruby
glcx has quit [Quit: Quitte]
pawnbox has joined #ruby
whippythellama has quit [Ping timeout: 240 seconds]
PedramT has quit [Ping timeout: 250 seconds]
frem has joined #ruby
ElFerna has quit [Ping timeout: 272 seconds]
<emax> can I chain a .sort and .find together for an array?
emilford has quit [Ping timeout: 276 seconds]
<emax> i mean a .sample and .find
<emax> i want to randomize an array and then search from it
<toretore> why?
baweaver has quit [Ping timeout: 240 seconds]
<toretore> ?try
<ruby[bot]> Why don't you try it and see for yourself?
emilford has joined #ruby
<Ox0dea> &ri Array#shuffle emax
<emax> damn, ruby has so many useful methods!
<Ox0dea> <3
<emax> Thanks guys!
pawnbox has quit [Ping timeout: 260 seconds]
<adaedra> I will go with toretore and wonder why.
<adaedra> Because this makes no sense.
<Ox0dea> How come not?
nerium has joined #ruby
leksster has quit [Remote host closed the connection]
<Ox0dea> >> [1,2,3,4,5].sample(&:even?)
<ruby[bot]> Ox0dea: # => 4 (https://eval.in/509047)
<Ox0dea> Well, you got lucky there.
<adaedra> you'll get, for the most cases, the same result
<Ox0dea> But #sample doesn't take a block.
dml337ira has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: Leaving]
<shevy> are you playing roulette again
last_staff has quit [Quit: last_staff]
<Ox0dea> I'm defending emax from the baddies.
<emax> haha
<Ox0dea> As I understand it, they want to grab a random element that meets some predicate.
<adaedra> >> %w[shevy Ox0dea].sample # next unfair kick
<ruby[bot]> adaedra: # => "Ox0dea" (https://eval.in/509050)
<emax> thank you Ox0dea!
<shevy> emax makes me want to find the meme with the beard dude
<Ox0dea> No worries. <3
<Mon_Ouie> In this case, probably to randomize the AI (instead of having one that, say, plays optimally)
<emax> Exactly
<shevy> drunk AI!
<emax> have an easy mode and a hard mode
TheDracle has quit [Quit: This computer has gone to sleep]
zodoz has joined #ruby
ccaffeini has quit [Remote host closed the connection]
baweaver has joined #ruby
Cohedrin has joined #ruby
<adaedra> shevy: I think we were doing AIs so they can do our work while we get drunk. If they got drunk too, it defeats the purpose?
Cohedrin has quit [Max SendQ exceeded]
<shevy> good point
Cohedrin has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
Burgestrand has joined #ruby
TheDracle has joined #ruby
snguyen has joined #ruby
Mia has quit [Read error: Connection reset by peer]
emax has quit [Quit: Page closed]
symm- has quit [Ping timeout: 256 seconds]
ccaffeini has joined #ruby
harly_ has joined #ruby
whippythellama has joined #ruby
marienz has quit [Ping timeout: 619 seconds]
harly has quit [Ping timeout: 260 seconds]
zenlot1 has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
krobzaur has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
JDiPierro has quit [Remote host closed the connection]
zenlot has quit [Ping timeout: 250 seconds]
<lucasb> Let's say one object include Enumerable, and it's each method yields more than one value at a time
<lucasb> like, 'yield a, b'
theslow1_ has quit [Quit: Leaving]
<lucasb> some Enumerable methods that uses blocks like {|x| ... }, will have x be a, and others methods will have x be [a,b]
<volty> { |*args| ?
B1n4r10 has joined #ruby
<Ox0dea> lucasb: Do you have Lisp's multiple value semantics in mind?
<adaedra> lucasb: like Hash?
<lucasb> for example: map {|x| ... } # x is a
<lucasb> select {|x| ... } # x is [a,b]
<lucasb> I know I can do |*x| and get an array
idefine has quit [Remote host closed the connection]
<lucasb> I just wonder if there's some convention I'm missing
Renich has quit [Quit: leaving]
<lucasb> If I do map {|*x| ... } I get [a,b]
<lucasb> If I do select {|*x| ... } I get [[a,b]]
<Ox0dea> lucasb: Is this for a Hash?
<lucasb> Ox0dea, adaedra: it's for a custom method I created
<adaedra> >> {a:1}.each{|n|p n}
<ruby[bot]> adaedra: # => [:a, 1] ...check link for more (https://eval.in/509053)
<adaedra> >> {a:1}.each{|n, m|p [n, m]}
<ruby[bot]> adaedra: # => [:a, 1] ...check link for more (https://eval.in/509054)
<lucasb> *custom object
baweaver has quit [Remote host closed the connection]
<adaedra> Hash (kind of) do what you want, yielding two values
<adaedra> (Not sure if it's yielding two values or yielding an array of two)
TheDracle has quit [Quit: This computer has gone to sleep]
<adaedra> (Oxpedantea may complete me on this one)
nertzy2 has joined #ruby
<Ox0dea> That is kinda weird.
marienz has joined #ruby
<Ox0dea> #map and #select do indeed receive Array arguments differently.
<lucasb> Ox0dea: so, you confirm the weirdiness?
<adaedra> damn, I thought I was doing a predictable language.
<Ox0dea> Rather, it actually depends on how you yield them!
<Ox0dea> adaedra: Ha!
<adaedra> >> {a:1}.select{|n, m|p [n, m]}
<ruby[bot]> adaedra: # => [:a, 1] ...check link for more (https://eval.in/509056)
<adaedra> no.
<adaedra> >> {a:1}.select{|n|p n}
<ruby[bot]> adaedra: # => :a ...check link for more (https://eval.in/509057)
<adaedra> fun.
<lucasb> class C; include Enumerable; def each; yield 1, 2; yield 3, 4; end; end
<lucasb> ^^ I just did this
solocshaw has joined #ruby
<lucasb> I just have to watch out which way should I write the block arguments
Cihan has quit [Quit: Connection closed for inactivity]
CihanKaygusuz has quit [Quit: Connection closed for inactivity]
dhollinger has quit [Quit: WeeChat 1.4]
<adaedra> At least it seems constant between ruby implementations.
idefine has joined #ruby
<Ox0dea> It's still really weird that `yield` actually does do "multiple values", but only for #map and not #select.
<adaedra> I would say better be sure and use |n, m| each time
<adaedra> every time* ?
<Ox0dea> Yeah.
<Ox0dea> Just to clarify, this is definitely weird, yeah? https://eval.in/509061
pawnbox has joined #ruby
sanguisdex has quit [Ping timeout: 240 seconds]
<adaedra> I
Darmani has joined #ruby
<Darmani> Hey kids<3
RobertBirnie has quit [Ping timeout: 264 seconds]
zodoz_ has joined #ruby
zodoz_ has quit [Remote host closed the connection]
B1n4r10 has quit [Ping timeout: 256 seconds]
visudo has quit [Quit: visudo]
idefine has quit [Remote host closed the connection]
zodoz has quit [Quit: Ex-Chat]
idefine has joined #ruby
<lucasb> ok, I try to be careful with my blocks arguments signature. thanks everybody for acknowledging the situation.
replay has joined #ruby
<Ox0dea> lucasb: Thanks for bringing the situation to our attention. :P
karapetyan has joined #ruby
<Ox0dea> There must be some logic behind it, but I can't see it.
Asher has joined #ruby
RobertBirnie has joined #ruby
<Ox0dea> It's the same weirdness as for Hash#select/reject, though.
visudo has joined #ruby
<lucasb> maybe some core code is considering the arity of the block for some methods and not for others
emilford has quit [Ping timeout: 272 seconds]
kappy has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 260 seconds]
<adaedra> after this weirdness it's time for bed
sgambino has quit [Ping timeout: 276 seconds]
TheDracle has joined #ruby
<Mon_Ouie> I haven't followed the referenced tickets to see the rationale behind doing this
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
PedramT_ has quit [Ping timeout: 276 seconds]
mfb2 has joined #ruby
karapetyan has quit [Ping timeout: 245 seconds]
[Butch] has quit [Quit: I'm out . . .]
idefine has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 250 seconds]
Azure|dc has quit [Quit: Oops.]
sandstrom has quit [Quit: My computer has gone to sleep.]
<Ox0dea> It's very strange.
<lucasb> oh, so there was designs decision behind that. I'll try do dig some discussion on it. thanks for the note Mon_Ouie.
Dimik has joined #ruby
emilford has joined #ruby
Azure has joined #ruby
TeresaP has quit [Quit: Page closed]
Azure has quit [Client Quit]
baweaver has joined #ruby
usershell has joined #ruby
_ht has quit [Quit: Konversation terminated!]
<volty> select works on the whole iteration data
<volty> while map transforms it
<volty> nothing strange
<volty> imho
zerowaitstate has quit [Quit: leaving]
h99h9h88 has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 250 seconds]
freerobby1 has quit [Quit: Leaving.]
<volty> i meant select HAS to return everything from the iteration (that passes)
pwnd_nsfw` is now known as pwnd_nsfw
kalopsian has joined #ruby
<volty> while map transforms what it receives
eregon_ is now known as eregon
h99h9h88_ has joined #ruby
<volty> we have a map that receives & returns partial iteration data
usershell has quit [Ping timeout: 245 seconds]
<Ox0dea> Huh?
victortyau has joined #ruby
JDiPierro has joined #ruby
kfpratt has left #ruby [#ruby]
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
PaulCapestany has quit [Quit: .]
<volty> select (as well as first) has to return the original yield (when test passes), while map returns whatever you tell it to
h99h9h88_ has quit [Ping timeout: 250 seconds]
TomPeed has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
jackjackdripper has joined #ruby
triangles has joined #ruby
choke has quit [Quit: Textual IRC Client: www.textualapp.com]
<Ox0dea> Why should that have any bearing on what either method is given to work with?
Ebok has joined #ruby
<volty> I do not get it.
TomPeed has quit [Client Quit]
JDiPierro has quit [Ping timeout: 245 seconds]
TheDracle has quit [Quit: This computer has gone to sleep]
<toretore> https://eval.in/509090 seems to be an arity thing
speaking1ode has quit [Quit: fuckit]
<volty> I am saying that map & select & first are consistent as long as inside the closure the args are distributed in the same way.
<volty> and I bet they are
jackjackdripper has quit [Client Quit]
ror15 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
jackjackdripper has joined #ruby
<baweaver> that word, I do not think it means what you think it means
<baweaver> function, or block.
<volty> ok, block
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oivoodoo has quit [Remote host closed the connection]
<toretore> https://eval.in/509091 it has to do with how yield works specifically
PaulCapestany has joined #ruby
decoponio has quit [Quit: Leaving...]
ropeney has joined #ruby
<volty> the question should be if yield does it differently
kerunaru has joined #ruby
kerunaru has quit [Client Quit]
<toretore> >> proc{|a| a }.call(1,2,3)
<ruby[bot]> toretore: # => 1 (https://eval.in/509094)
syk_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kerunaru has joined #ruby
<Ox0dea> That's different.
<toretore> how so?
kerunaru has quit [Client Quit]
<Ox0dea> `yield a, b` is an Array.
<Ox0dea> *Except* in a call to #map with a block declared to take a single parameter.
<volty> ops, sorry, it yield differently
<baweaver> lambdas are fun!
<volty> *it does
<Ox0dea> That's the *only* place Ruby has what might be called "real" multiple values.
despai has quit [Quit: This computer has gone to sleep]
<Ox0dea> The asymmetry with the rest of the system means it's wrong.
<toretore> >> def y; yield 1,2; end; y{|a| a }
floatingpoint has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby[bot]> toretore: # => 1 (https://eval.in/509095)
<toretore> >> def y; yield [1,2]; end; y{|a| a }
<ruby[bot]> toretore: # => [1, 2] (https://eval.in/509097)
pawnbox has joined #ruby
<volty> yap, I was wrong because not tested, the examples were wrong too because didn't show what was entering the block
einarj has quit [Remote host closed the connection]
<Ox0dea> toretore: Does that mean all the other Enumerable methods are doing it wrong?
<toretore> it's not about Enumerable, it's just how yield works afaict
<toretore> your each is yielding (1,2) but the block (whichever one it is) receives only (1)
<Darmani> "Error install jumpstart_auth, the 'http_parser.rb' native gem requires installed build tools"
<Darmani> Can someone explain this to me in English?
<toretore> Darmani, os?
<Darmani> Windows
<Ox0dea> lol
<toretore> count me out
<Darmani> Lulz
jackjackdripper1 has joined #ruby
<Mon_Ouie> It is about how Enumerable implements them, #map enum_yield(argc, argv) (which is like Ruby's yield(*args)), most other methods use rb_yield(arg) (which is like yield(arg))
arlek_ has joined #ruby
<volty> why then map and select 's block receive different args ?
<Ox0dea> Mon_Ouie just said...
<Mon_Ouie> No idea, I can't read Japanese
<Ox0dea> Oh.
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
arlek has quit [Ping timeout: 250 seconds]
<Ox0dea> Maybe it's a philosophical thing.
kies^ has quit [Ping timeout: 276 seconds]
jackjackdripper has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 240 seconds]
agent_white has quit [Ping timeout: 240 seconds]
<Darmani> Ox0dea - Is there another gem I could use that does the same thing?
<Darmani> Don't leave me hanging Q.Q
<Ox0dea> Darmani: gem install gentoo
<Darmani> could not find valid gem in any repository.
<toretore> Estimated time until install completed: 34 years 2 months 3 days
Azure has joined #ruby
<Darmani> Ox0dea - Are you sure that's the name?
elifoster has joined #ruby
mwlang has quit [Quit: mwlang]
visudo has quit [Quit: visudo]
despai has joined #ruby
<toretore> Darmani, it was a joke, there is no alternative if it's a dependency
<Darmani> That's mean :[ I thought he was serious
<Darmani> Q.Q
lucasb has quit [Quit: leaving]
visudo has joined #ruby
m8 has quit [Quit: Sto andando via]
<volty> stranger & stranger
Eiam_ has joined #ruby
arlek_ is now known as arlek
TomPeed has joined #ruby
agent_white has joined #ruby
snguyen has quit [Read error: Connection reset by peer]
<Ox0dea> # => stranger
pdoherty has quit [Ping timeout: 260 seconds]
<dtordable> /n
despai has quit [Ping timeout: 272 seconds]
<Ox0dea> It's high time somebody wrote a script to prevent that.
<Ox0dea> Anybody know any programmers?
<volty> only you uu uu uuuuuuu, only you ....
<dtordable> Ox0dea: tell me
<Ox0dea> dtordable: ?
<volty> :), it would be easier to inject a rewritten select into Enumerable, wouldn't ?
rikkipitt has joined #ruby
s2013 has joined #ruby
ta has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<Ox0dea> Well, Array doesn't actually use Enumerable's implementations for the most part.
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Waheedi> I'm receiving this error /usr/local/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.2/lib/v8/object.rb:69:in `method_missing': undefined method `empty?' for #<V8::Array:0x007f6b078913a8> (NoMethodError)
loophole has quit [Ping timeout: 256 seconds]
s2013 has quit [Client Quit]
idefine has joined #ruby
<Ox0dea> >> [].methods.group_by { |m| [].method(m).owner }.map { |c, m| [c, m.size] }
<ruby[bot]> Ox0dea: # => [[Array, 93], [Enumerable, 34], [Kernel, 42], [BasicObject, 7]] (https://eval.in/509119)
axl__ has quit [Quit: axl__]
idefine has quit [Remote host closed the connection]
<Mon_Ouie> >> Enumerable.instance_methods.size
B1n4r10 has joined #ruby
<ruby[bot]> Mon_Ouie: # => 53 (https://eval.in/509122)
<Ox0dea> 18>> Enumerable.instance_methods.size
<ruby[bot]> Ox0dea: # => 44 (https://eval.in/509124)
<Ox0dea> Progress!
idefine has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
nfk has joined #ruby
scripore has quit [Quit: Leaving]
IronDicideth has joined #ruby
<Waheedi> hmm in know what going on !!!
TomPeed has joined #ruby
<Waheedi> i*
robbyoconnor has quit [Read error: Connection reset by peer]
hobodave has quit [Ping timeout: 272 seconds]
idefine has quit [Remote host closed the connection]
IronReaver has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
<Mon_Ouie> Hey, since when do we have grep_v!
TomPeed has quit [Client Quit]
musicnode has quit [Read error: Connection reset by peer]
joonty has joined #ruby
aryaching has quit [Ping timeout: 272 seconds]